History log of /external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
78222e63630280b96488de0d51d1b2578e26f814 30-Jan-2013 Jerome Glisse <jglisse@redhat.com> r600g: add cs memory usage accounting and limit it v3 (backport for mesa 9.0)

We are now seing cs that can go over the vram+gtt size to avoid
failing flush early cs that goes over 70% (gtt+vram) usage. 70%
is use to allow some fragmentation.

The idea is to compute a gross estimate of memory requirement of
each draw call. After each draw call, memory will be precisely
accounted. So the uncertainty is only on the current draw call.
In practice this gave very good estimate (+/- 10% of the target
memory limit).

v2: Remove left over from testing version, remove useless NULL
checking. Improve commit message.
v3: Add comment to code on memory accounting precision

This version is a backport for mesa 9.0

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
8b2922ff5aa68b5dca90d5b83d1e31da48b069b3 23-Nov-2012 Marek Olšák <maraeo@gmail.com> r600g: fix broken streamout if streamout_begin caused a context flush

This fixes graphics corruption in the case where the DISCARD_RANGE flag
is used to map a buffer.

NOTE: This is a candidate for the stable branches.
(cherry picked from commit cff4c948ed2708a6eb4b090ae87443a707cbd67f)
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
1106bbc7d6cd024d1e20573e281ea4c48c5eaf19 25-Sep-2012 Marek Olšák <maraeo@gmail.com> r600g: fix streamout on RS780 and RS880

The latest kernel from git is required. Transform feedback (along with GL3.0)
is turned off on older kernels.
(cherry picked from commit d063c7b1421a6e8ad4e2efc1bf913920766cc5ee)
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
8698a3b85dd89c5d2fa473e7942b7dc8d25f3c8f 02-Aug-2012 Marek Olšák <maraeo@gmail.com> r600g: implement MSAA for r700

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
a01791add08fbcb5386e0e9209ba21ed58fbdc42 22-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: implement set_sample_mask
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
6517225078a6a56c9fb3c1ea9f310992e6400b77 22-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: implement alpha-to-coverage
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
2df399c34bb39122a45bdd5b430b48346542e1cb 01-Aug-2012 Jerome Glisse <jglisse@redhat.com> r600g: atomize sampler state v2

Use atom for sampler state. Does not provide new functionality
or fix any bug. Just a step toward full atom base r600g.

v2: Split seamless on r6xx/r7xx into it's own atom. Make sure it's
emited after sampler and with a pipeline flush before otherwise
it does not take effect.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
1cfb55c5098e17cd8e6188fc6382b393a9013e4c 18-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: remove debug code for streamout
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
ff9a49328e5d8b647aeb7511a01e5a41592a2799 18-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: inline r600_context_draw_opaque_count
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
bc2f5fc01e678ecd19f921e5bc7bd55c131dde66 18-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: atomize alphatest state
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
c26fadf195876271e559f844c1fc88effa6a60c1 15-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: remove unused code after conversion of sampler views
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
5d8d4252f2f6632fc455dcf1079c95495ef445ac 14-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: convert sampler view emission into atoms

Vertex and constant buffers are emitted in the same way.
This is mainly a simplification of the code. The cleanup is in another patch.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
585baac652ffa172fb3fbbdd4c7559d03b7c27ef 06-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: do fine-grained vertex buffer updates

If only some buffers are changed, the other ones don't have to re-emitted.
This uses bitmasks of enabled and dirty buffers just like
emit_constant_buffers does.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
f4f2e8ebe1bad91b2c4339a8280d516738bd27d2 14-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: don't call inval_shader_cache in r600_context_flush twice

It's already called in r600_constant_buffers_dirty.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
c2f444c54db82a53f63fa7a103770ee5eedc3559 12-Jul-2012 Tom Stellard <tstellar@gmail.com> r600g: Emit vertex buffers using the same method as constant buffers

Signed-off-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
4fe74412cfdba9af6ce878aebbb0c367f19cbb4b 07-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: move CB_SHADER_MASK setup into cb_misc_state

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
a1a1ff5ec09acda0c4849c9e41a37ae82a80f000 07-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: move MULTIWRITE setup into cb_misc_state for r6xx-r7xx

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
0ea76916e63f8fc556f5e8f5a46c196d317cd5ad 07-Jul-2012 Marek Olšák <maraeo@gmail.com> r600g: move CB_TARGET_MASK setup into new cb_misc_state

to remove some overhead from draw_vbo. This is a derived state.

BTW, I've got no idea how compute interacts with 3D here, but it should
use cb_misc_state, so that 3D and compute don't conflict.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
3d3194e93cbfe0fc42dd96218e8e999f5ccfe726 26-Jun-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Add r600_context_pipe_state_emit()

This function is used when dispatching compute shader in order to avoid
mixing compute and 3D registers in the context's dirty list. This
allows the compute code to resuse 3D functions like evergreen_cb, which
return a struct r600_pipe_state and still have control over when and how
the register writes are emitted.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
e00e1586dd94c1bbcd1ecfd9649fde9281be1977 25-Jun-2012 Tom Stellard <thomas.stellard@amd.com> r600g: Add pkt_flag parameter to r600_context_block_emit_dirty()

This allows the shader type bit to be set in the pm4 header when
emitting registers for compute shaders.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
cb4d1d377d7a1143db48feb48ef54dfa3b29487d 14-Jun-2012 Marek Olšák <maraeo@gmail.com> r600g: fix lockups with streamout on r7xx

This requires the latest streamout kernel patches.

Streamout is disabled by default on r7xx, so this patch is safe for regular
users.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
f01594be0ee34758fc62274b9e967a2a4c3595df 14-Jun-2012 Marek Olšák <maraeo@gmail.com> r600g: compute CS space for streamout correctly, add comments

SET_CONTEXT_REG was not counted in.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
bb07e251318d1b224fb78fc0bd4200216c42a5cf 14-Jun-2012 Marek Olšák <maraeo@gmail.com> r600g: set SMX_ACTION_ENA to fix streamout cache flushes on some chipsets

It helps on R7xx.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
0a6120244e66494db070ce875c0a464fbc5b15a1 26-Apr-2012 Marek Olšák <maraeo@gmail.com> winsys/radeon: simplify buffer map/unmap functions

The idea is not to use pb_map and pb_unmap wrappers, calling straight
into the winsys.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
a52b3338c6e51421e3836ae210cd98d9c1ec337b 10-Apr-2012 Marek Olšák <maraeo@gmail.com> u_vbuf: remove u_vbuf_resource
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
c7d0e9ec32edfbb6c77715d51170608deb41f1b7 02-Apr-2012 Marek Olšák <maraeo@gmail.com> r600g: invalidate caches at the beginning of CS

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
a633d82ce352a69fd54a2b0e262a91f27f478119 02-Apr-2012 Marek Olšák <maraeo@gmail.com> r600g: remove dead code after the rework

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
68bbfc1afe210d82acfb14a78b0fd8c436a8f78c 01-Apr-2012 Marek Olšák <maraeo@gmail.com> r600g: rework state emission of constant buffers

Framerate in ipers:
before: 43.6 FPS
after: 46.6 FPS

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
c76462b45f1e3a0aa2ee7971191e30e8a5f52015 30-Mar-2012 Marek Olšák <maraeo@gmail.com> r600g: rework state emission of vertex buffers

This reduces a little of CPU overhead.
The idea is to translate pipe vertex buffers directly into the CS
and not using any intermediate representations.

Framerate in Torcs:
before: 32.2
after: 34.6

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
42bc0b9b9dc31a15c08d409d14d25ccf19501255 01-Apr-2012 Marek Olšák <maraeo@gmail.com> r600g: unduplicate code for PS partial flush
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
bc95152f1d3bf0dbf79d81e6b9956fd60198e3df 31-Mar-2012 Marek Olšák <maraeo@gmail.com> r600g: determine in advance if hw has vertex cache
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
b4082f492b4b55df4c636445e47b97d1f1e4b5b2 21-Mar-2012 Alex Deucher <alexander.deucher@amd.com> r600g: add support for TN (trinity) APUs

Note: this is a candidate for the stable branches.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
91ddfa72b4384d04e4d84e60b4cdf3efee7ef49b 19-Mar-2012 Alex Deucher <alexander.deucher@amd.com> r600g: fix r600_get_backend_mask() for virtual addresses

I don't think we should hit this path for virtual addresses,
but just in case.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
f6546535c9c8ce001e081487b8cd30b6703c0f4d 07-Mar-2012 Marek Olšák <maraeo@gmail.com> r600g: use SX_MISC to implement rasterizer discard

Yeah I am reworking it again. This is way simpler than the other methods.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
c7eaf274a9b7e3e5f4b060be2320eb605464ba5c 08-Mar-2012 Marek Olšák <maraeo@gmail.com> Revert "r600g: fix and improve rasterizer discard for r600-r700"

I will use SX_MISC instead.

This reverts commit 597fd6dc8c424a35f8442d5fd9de708013a69830.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
80e4d18f84748f903cea07b9bba2d519cfa4163a 08-Mar-2012 Marek Olšák <maraeo@gmail.com> Revert "r600g: rework rasterizer discard for evergreen"

I will use SX_MISC instead.

This reverts commit 734792e83fdc526623d8fe0a60479648c936bd53.

Conflicts:

src/gallium/drivers/r600/evergreen_hw_context.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_pipe.h
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
e363dd5c7d8ba40984d937ad7487abbb5be439bc 05-Mar-2012 Marek Olšák <maraeo@gmail.com> r600g: replace atom_ prefix with _state and _cmd suffixes
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
330b6c85c961b32f704ce8ec7dbf8cb7fc0b80a8 05-Mar-2012 Marek Olšák <maraeo@gmail.com> r600g: cleanup includes
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
45d731fdf9e469011a071a101b510e5b1578215f 05-Mar-2012 Marek Olšák <maraeo@gmail.com> r600g: remove unused function r600_context_reg_bo
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
8a56ed8d6dc37c23d4695d0fc292d7bcc2976f08 05-Mar-2012 Marek Olšák <maraeo@gmail.com> r600g: remove unused definitions
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
428146c14fed5b41e3da9e72488396f214b23b0d 27-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: initialize VS_GS_OUT_PRIM_TYPE

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
597fd6dc8c424a35f8442d5fd9de708013a69830 26-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: fix and improve rasterizer discard for r600-r700

For polygons, we have been using face culling with success, but that doesn't
work for points and lines.

Setting the point size and line width to 0 fixes it.

Also improve it even more by setting SCREEN_SCISSOR to a zero area.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
734792e83fdc526623d8fe0a60479648c936bd53 24-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: rework rasterizer discard for evergreen

Implement it right using STRMOUT_CONFIG.RAST_STREAM. This fixes rasterizer
discard with points and lines.

This also adds another derived state. It's a combination of rasterizer discard
and streamout enable.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
ca78a47b056b5a4589933492db364f6e418abb0f 26-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: make some scissor regs invariant on r600-r700

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
aacd653834264b70a2537aff7914762b39f0683f 26-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: rework scissor for r600-r700

We must use VPORT_SCISSOR, because that's the only one we can use for multiple
scissor rectangles in ARB_viewport_array.

R700 can use the VPORT_SCISSOR_ENABLE bit, but R600 doesn't have that and must
emit a 8192x8192 rectangle if scissor is disabled.

This commit also cleanups magic numbers in create_rs_state.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
09ec30f02830b3cbf9d6ac04d9497634dca86846 23-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: don't suspend timer queries for u_blitter

Timer queries should be able to measure the time spent in u_blitter as well.

Queries are split into two groups: the timer ones and the others (streamout,
occlusion), because we should only suspend non-timer queries for u_blitter,
and later if the non-timer queries are suspended, the context flush should
only suspend and resume the timer queries.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
83667acfd9feed932f6864092382e752466975ed 23-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: move all query code into r600_query.c

And rename or inline functions where appropriate.
There is no reason to keep this stuff in r600_hw_context.c.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
4c02baade9d590787acae157ce9b2d09c6a9bf55 26-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: fix streamout cache flush for r600

Figured out by trial and error.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
df00dc3c817771ac5034a44dff2b14cd7759b207 22-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: rework queries

We always mapped the query buffer in begin_query, causing stalls
if the buffer was busy.

This commit reworks it such that the query buffer is only mapped
in get_query_result as it's supposed to be.

The query buffer is no longer treated as a ring buffer. Instead, the results
are just appended and when the buffer is full, we create a new one. One query
can have more than one query buffer, though that's a very rare case.
Begin_query releases all query buffers.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
5b84a8c3c3f85cd6b109861c6eebe3ece29d664e 21-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: cleanup magic numbers in set_xx_sampler

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
89293287b8f1a24c1405750007ca20bd32e02eab 21-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: remove duplicated evergreen_context_ps_partial_flush

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
84db8f9a2289f3ae7eb0af4825f4370e31e4ae11 21-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: remove duplicated evergreen_context_pipe_state_set_sampler

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
985bd5487edc974f1ed7a9c50456478d959b51e2 21-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: remove duplicated function r600_state_sampler_init

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
6a94c9dde0d62b5ccfcbe3dbafdadeab37fd48a6 21-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: fix possible crashes in destroy_context when failing in create_context

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
9670e72f6ef85f0e6f6c9afe136dc67c017e3fae 21-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: consolidate common context init code

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
f841b8a833f32074c79724c66c85cdc7b48087e2 21-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: define GROUP_FORCE_NEW_BLOCK in common header

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
fbebd431ec4e2e461a0cbcd5f3a04a000b8f6bbf 03-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: move invariant register updates into start_cs for r6xx-r7xx
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
e2809849ecac69615ece294a55ee355afaac33d3 02-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: add a depth misc state which depends on occlusion queries

This is a state which is derived from other states and is actually the first
state which doesn't correspond to any gallium state.

There are two state flags:
bool occlusion_query_enabled
bool flush_depthstencil_enabled

Additional flags can be added later if needed, e.g. bool hiz_enabled.
The emit function will have to figure out the register values by itself.

It basically just emits the registers when the state changes.
This commit also adds a few helper functions for writing registers directly
into a command stream.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
8f5c172c854a52b2a69b8383a55c76f1faa5f704 02-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: consolidate the main draw code

The code was almost the same for r600 and eg. What can't be consolidated is
in the *_prepare functions.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
182fd4c54476ced92b61412b0cac5be32e257b53 02-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: move all invariant state from draw_vbo into start_cs
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
f126253040654d52db134063a69ebaf0c417d410 31-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: turn init_config into a command buffer for starting a CS

This is the first pure command buffer. It contains CS initialization
packets and emits invariant state (i.e. the registers which never or rarely
change).

The affected registers are removed from *_hw_context.c, so that both ways
of emitting commands can co-exist.

v2: emit context_control in cayman's start_cs too
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
73191026b4198a3dce86dac015f973616f76363a 02-Feb-2012 Marek Olšák <maraeo@gmail.com> r600g: remove redundant r600_context::vs_so_stride_in_dw
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
c0c979eebc076b95cc8d18a013ce2968fe6311ad 30-Jan-2012 Jerome Glisse <jglisse@redhat.com> r600g: add support for common surface allocator for tiling v13

Tiled surface have all kind of alignment constraint that needs to
be met. Instead of having all this code duplicated btw ddx and
mesa use common code in libdrm_radeon this also ensure that both
ddx and mesa compute those alignment in the same way.

v2 fix evergreen
v3 fix compressed texture and workaround cube texture issue by
disabling 2D array mode for cubemap (need to check if r7xx and
newer are also affected by the issue)
v4 fix texture array
v5 fix evergreen and newer, split surface values computation from
mipmap tree generation so that we can get them directly from the
ddx
v6 final fix to evergreen tile split value
v7 fix mipmap offset to avoid to use random value, use color view
depth view to address different layer as hardware is doing some
magic rotation depending on the layer
v8 fix COLOR_VIEW on r6xx for linear array mode, use COLOR_VIEW on
evergreen, align bytes per pixel to a multiple of a dword
v9 fix handling of stencil on evergreen, half fix for compressed
texture
v10 fix evergreen compressed texture proper support for stencil
tile split. Fix stencil issue when array mode was clear by
the kernel, always program stencil bo. On evergreen depth
buffer bo need to be big enough to hold depth buffer + stencil
buffer as even with stencil disabled things get written there.
v11 rebase on top of mesa, fix pitch issue with 1d surface on evergreen,
old ddx overestimate those. Fix linear case when pitch*height < 64.
Fix r300g.
v12 Fix linear case when pitch*height < 64 for old path, adapt to
libdrm API change
v13 add libdrm check

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
b0337b679ad4c2feae59215104cfa60b58a619d5 31-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: shorten expressions accessing family and chip_class
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
f661405637bba32c2cfbeecf6e2e56e414e9521e 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: use the new code for streamout flush as well
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
70d40fc6755a2e4b23c831143cb02133f30fbb02 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: rename r600_reg::flush_flags -> sbu_flags

There is no other use for that.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
6d0a011acbea90537d142c86b8dd5aecd1e14390 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: fix computation of how many dwords is needed for a flush at the end of CS
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
1c5625cdb96332a746c9eebe042a3a9dbe844351 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: remove unused r600_reg::flush_mask
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
0671400dcc72553b5f9719639e86069a1734dbe5 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: remove more dead code
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
74027a9ba250f07a77ee40e105c50c27e4fc3bc0 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: remove dead code for tracking relocations
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
4fd97b46a071a8dcec6ec6658dfc835e08f4e2c6 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: remove unused flush code
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
0813e58a3e41faf6f2072d034dfdc6198a3a1fee 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: rework cache flushing

This also significantly improves the RV670 flush by using the CB1 flush
*always* and also DEST_BASE_0_ENA, which appears to magically fix some tests.
I am not entirely sure, but it's possible that RV670 flushing is fixed
completely.

v2: fix cayman by flushing texture cache instead of vertex cache

Thanks to Dave Airlie for testing Cayman.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
2fe521fa419ee153afb6295289dc5e95d3229858 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: add a new simple API for state emission
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
621e0db71c5ddcb379171064a4f720c9cf01e888 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: remove redundant pm4 and pm4_cdwords in r600_context

These only mirrored radeon_winsys_cs.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
3b0467192057cc561b6d495d6445b2ed04fc3ebf 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: consolidate some context_draw code
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
302862defa61b2cee1ae24159aca306f090ca854 29-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: remove the now-useless internal flush callback
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
bc70bcfc6915883bd5c60712b70e9ed7e1d80ea8 29-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: don't initialize the screen and winsys pointer twice
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
e4340c1908a6a3b09e1a15d5195f6da7d00494d0 29-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: merge r600_context with r600_pipe_context

The split made no sense.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
78293b99b23268e6698f1267aaf40647c17d95a5 29-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: remove u8,u16,u32,u64 types
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
bed20f02a771f43e1c5092254705701c228cfa7f 29-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: get rid of r600_context_reg

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
85db52025189c88437f82369716ffe88429dc08b 29-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: don't use r600_context_reg on r6xx-r7xx

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
9344ab382a1765c1a7c2560e771485edf4954fe2 29-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: get rid of the mask in r600_pipe_reg

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
f9f8ce3ead04b5334bb323c37ec1f905ca5f58b2 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: remove unused streamout code
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
ce816dd831ba4e57b024631ff39591efae50ce14 30-Jan-2012 Marek Olšák <maraeo@gmail.com> r600g: disable printing debug info for streamout
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
3d993aff258378e0ca3246577198066317e82a5b 27-Jan-2012 Marek Olšák <maraeo@gmail.com> Revert "r600g: use S_028B20_BUFFER_0_EN macro for streamout buffer enable"

This reverts commit d6cd514edbeca0de38561f66189748078d0dc602.

It broke multiple streamout buffers, because it only enabled the first one.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
54e8dcaad65cbe3603730414fd8d76ac53f89a86 20-Jan-2012 Vadim Girlin <vadimgirlin@gmail.com> r600g: implement clip vertex v2

Clip planes are uploaded as a constant buffer and used by the vertex
shader to produce corresponding clip distances for hw clipping.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
d6cd514edbeca0de38561f66189748078d0dc602 21-Jan-2012 Alex Deucher <alexander.deucher@amd.com> r600g: use S_028B20_BUFFER_0_EN macro for streamout buffer enable

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
90b36b50f51fd2ea906b609ae0270b9eff7a1848 21-Jan-2012 Alex Deucher <alexander.deucher@amd.com> r600g: update streamout support for virtual addresses

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
2449695e822421fdcaf1c66dffc12d7d705ea69d 17-Dec-2011 Marek Olšák <maraeo@gmail.com> gallium: improve the pipe_stream_output_info struct (v2)

There are 3 changes:

1) stride is specified for each buffer, not just one, so that drivers don't
have to derive it from the outputs

2) new per-output property dst_offset, which specifies the offset
into the buffer in dwords where the output should be stored,
so that drivers don't have to compute the offsets manually;
this will also be useful for gl_SkipComponents
from ARB_transform_feedback3

3) register_mask is removed, instead, there is start_component
and num_components; register_mask with non-consecutive 1s
doesn't make much sense (some hardware cannot do packing of components)

Christoph Bumiller: fixed nvc0.

v2: resolve merge conflicts in Draw and clean it up
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
bb1f0cf3508630a9a93512c79badf8c493c46743 02-Dec-2011 Jerome Glisse <jglisse@redhat.com> r600g: add support for virtual address space on cayman v11

Virtual address space put the userspace in charge of their GPU
address space. It's up to userspace to bind bo into the virtual
address space. Command stream can them be executed using the
IB_VM chunck.

This patch add support for this configuration. It doesn't remove
the 64K ib size limit thought this limit can be extanded up to
1M for IB_VM chunk.

v2: fix rendering
v3: fix rendering when using index buffer
v4: make vm conditional on kernel support add basic va management
v5: catch the case when we already have va for a bo
v6: agd5f: update on top of ioctl changes
v7: agd5f: further ioctl updates
v8: indentation cleanup + fix non cayman
v9: rebase against lastest mesa + improvement from Marek & Michel
v10: fix cut/paste bug
v11: don't rely on updated radeon_drm.h

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
543b2331d7b45a29ccd3530daa2389e87e65d89b 08-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: implement transform feedback

r600: DONE.
r700: MOSTLY (done but locks up).
Evergreen: MOSTLY (done but doesn't work for an unknown reason).

The kernel support will come soon.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
b8428e63353373e769a9ba787875b49fdd25a1ee 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: don't set the query result to 0 after a call to get_query_result

get_query_result doesn't reset the result. Only begin_query does.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
72c1658554b2d1e90e687340c5db4fec939b3901 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: the type of OCCLUSION_PREDICATE result should be boolean
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
b999be83744c9419fa3134201006451db119b81d 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: implement PIPE_QUERY_OCCLUSION_PREDICATE
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
ec3d2c7f089e0a4750dc42f10da914b58858499e 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: flush the whole context when CS is full, not just hw_context

Because we disable render condition in r600_flush, but not in r600_context_flush.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
6a490149d9b8b77ead81b4227f2860ec22095217 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: turn some CS overflow checks into assertions

They're not really exhaustive and not so useful either.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
5222e16e2b611064c0add9eef7f56488c9b8fbe6 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: put the rest of CS overflow checks in r600_need_cs_space
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
30a570e450da30fa73546c0ff54b4757678a5663 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: flush caches regardless of render condition

What if somebody enables render condition just before we flush...
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
578b211be6a1466eea00fc4a8fc5d4efa4bfd62c 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: disable render condition at the end of CS, re-enable at the beginning
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
9564185b0a1ac54e7188f88e57ed1a8d09d4e7bb 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: don't suspend queries if they have already been suspended by blitter

And add some assertions.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
cb7c6c30d02ab46efc4ed711b2a632de50157347 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: properly reserve CS space for queries_suspend
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
1d09831253b82374774daee772e90a83de17517a 10-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: reserve CS space for a draw command in begin_query and render_condition

There's no point in emitting those if you can't emit a draw command too.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
11bdd28796e303eda70f1d73bd2469597bd561bc 09-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: consolidate checking whether CS is full

This adds a new function r600_need_cs_space. Currently, it's easy to overflow
the CS - queries are not counted in. I guess that's not the only case where
the driver may crap out.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
1b375f8413d898a18c989c20d0dc16d3b1be33bc 08-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: cosmetic changes in query code

Mainly updating comments and removing one use of a magic number.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
8187ad07546cae0ae91255c665315f86b03367a9 08-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: use modulo for computing index into query (ring) buffers
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
552e90bd6ae315ba7e0a331c6f66f8b5f1542631 08-Nov-2011 Marek Olšák <maraeo@gmail.com> r600g: make r600_query_result more generic

We'll soon start adding new query types, maybe even querying more than
one value per query.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
b40edc63d7d272ac132fded52f3119f4780c7e6b 29-Oct-2011 Marek Olšák <maraeo@gmail.com> r600g: shortcut ctx->screen->ws to ctx->ws
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
7684808f9ce2da944be3ca9cc1ac4661d9b167fb 28-Oct-2011 Marek Olšák <maraeo@gmail.com> r600g: remove one pointless flush

It's not useful for anything.
The rest of the patch is just a cleanup resulting
from some of the variables being no longer used.

There are no piglit regressions.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
bbad5103e61806ef6d6a0d5e53abc4b9e77a7fe9 28-Oct-2011 Marek Olšák <maraeo@gmail.com> r600g: get backend mask after the context is fully set up
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
1e1a7011ee8f7e954b9f77985665495e53efae22 28-Oct-2011 Marek Olšák <maraeo@gmail.com> r600g: don't flush before reading query results

Taken care of by the winsys.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
e9b6f21a5054b2639a1dfc6401e4e9053dce5394 28-Oct-2011 Marek Olšák <maraeo@gmail.com> r600g: only maintain the list of active queries

And not all existing queries. The only reason we have that list is to be able
to suspend and resume the active ones.

This reduces looping over queries when suspending and resuming.
The queries no longer have to track some of their states.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
b70a51318a43f489611f4fc2f93887a362f5c99f 28-Oct-2011 Marek Olšák <maraeo@gmail.com> r600g: cleanup r600_query_result
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
1de02d7364fe7a2ea51848e67b65144fe4a8c7f4 28-Oct-2011 Marek Olšák <maraeo@gmail.com> r600g: don't flush in r600_get_backend_mask

The winsys does the flush in buffer_map.
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
6e79127e79e6ff80e3715a2190e437cfa92b4e96 28-Oct-2011 Marek Olšák <maraeo@gmail.com> r600g: remove redundant variable r600_query::buffer_size
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
aae342cff098034b6f685a81ecb4cd5e3fa92162 30-Sep-2011 Marek Olšák <maraeo@gmail.com> r600g: fix a compiler warning
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c
bf0baa771709e1076613cf9f9bed6ac004dd0439 27-Sep-2011 Marek Olšák <maraeo@gmail.com> r600g: move all files from winsys/r600 into drivers/r600

Be sure to reconfigure after this commit.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
/external/mesa3d/src/gallium/drivers/r600/r600_hw_context.c