r600g: Add support for relative addressing on constant buffers.
authorHenri Verbeet <hverbeet@gmail.com>
Mon, 7 Feb 2011 14:22:08 +0000 (15:22 +0100)
committerHenri Verbeet <hverbeet@gmail.com>
Mon, 7 Feb 2011 14:22:08 +0000 (15:22 +0100)
commit077c448d184799e0d9ec962013ec784c6a5c1807
treec852d4467141004d07a1c593d09b160a0b3838da
parent871460eb149b9868e5750f13b8206e271743c4a2
r600g: Add support for relative addressing on constant buffers.

Relative addressing of constant buffers can't work properly through the
kcache, since you can only address within the currently locked kcache window.
Instead, this patch binds the constant buffer as a shader resource, and then
explicitly fetches the constant using a vertex fetch with fetch type
VTX_FETCH_NO_INDEX_OFFSET from the shader. There's probably still some room
for improvement, doing the fetch right before the instruction that needs the
value may not be quite optimal for example.
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_pipe.h
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/r600/r600_state_common.c