OSDN Git Service

i965: check-point commit of new constant buffer support
authorBrian Paul <brianp@vmware.com>
Tue, 31 Mar 2009 23:06:22 +0000 (17:06 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 3 Apr 2009 15:07:04 +0000 (09:07 -0600)
commit597cd5b94e4818679af1134d053541f3d2cfb80e
treeb2bb0c1c7cb1e98962f33cc773e982f311be25ce
parentba8b25a46cdd52e7b9116cc7d76dc4db4d667464
i965: check-point commit of new constant buffer support

Currently, shader constants are stored in the GRF (loaded from the CURBE
prior to shader execution).  This severly limits the number of constants
and temps that we can support.

This new code will support (practically) unlimited size constant buffers
and free up registers in the GRF.  We allocate a new buffer object for the
constants and read them with "Read" messages/instructions.  When only a
small number of constants are used, we can still use the old method.

The code works for fragment shaders only (and is actually disabled) for now.
Need to do the same thing for vertex shaders and need to add the necessary
code-gen to fetch the constants which are referenced by the shader
instructions.
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_curbe.c
src/mesa/drivers/dri/i965/brw_program.c
src/mesa/drivers/dri/i965/brw_wm_glsl.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c