diff options
author | Eric Anholt <[email protected]> | 2012-06-25 14:55:01 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-07 13:54:52 -0700 |
commit | 04871058eb01c5b51a0180055e7dbdc967f56604 (patch) | |
tree | a96922d05ccda01c4aaeeb51dfa822cc5964f669 /src/mesa/drivers/dri/i965/brw_vs.c | |
parent | 90de96ff0d6d54ba0f9a337a6a107acf4134682d (diff) |
i965/vs: Add support for loading uniform buffer variables as pull constants.
Unlike the FS side in the previous commit, this does variable indexing just
fine, using the same code as we used for other variable-indexed pull
constants.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index feec4558762..ba818fda353 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -251,6 +251,11 @@ do_vs_prog(struct brw_context *brw, c.prog_data.num_surfaces = 1; if (c.vp->program.Base.SamplersUsed) c.prog_data.num_surfaces = SURF_INDEX_VS_TEXTURE(BRW_MAX_TEX_UNIT); + if (prog && + prog->_LinkedShaders[MESA_SHADER_VERTEX]->NumUniformBlocks) { + c.prog_data.num_surfaces = + SURF_INDEX_VS_UBO(prog->_LinkedShaders[MESA_SHADER_VERTEX]->NumUniformBlocks); + } /* Scratch space is used for register spilling */ if (c.last_scratch) { |