summaryrefslogtreecommitdiffstats
path: root/src/glx/create_context.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-03-11 14:35:27 -0700
committerKenneth Graunke <[email protected]>2014-03-18 10:11:29 -0700
commit542f2e47f2f22522b963a7ab1f8b485d1c9985ba (patch)
tree0988b9e78716005fe436d8b0136d9ea2d85b1ac1 /src/glx/create_context.c
parentd9f339eccd87413d9f6bf6dd6217db01630f12f8 (diff)
i965/fs: Don't renumber UNIFORM registers.
Previously, remove_dead_constants() would renumber the UNIFORM registers to be sequential starting from zero, and the resulting register number would be used directly as an index into the params[] array. This renumbering made it difficult to collect and save information about pull constant locations, since setup_pull_constants() and move_uniform_array_access_to_pull_constants() used different names. This patch generalizes setup_pull_constants() to decide whether each uniform register should be a pull constant, push constant, or neither (because it's unused). Then, it stores mappings from UNIFORM register numbers to params[] or pull_params[] indices in the push_constant_loc and pull_constant_loc arrays. (We already did this for pull constants.) Then, assign_curb_setup() just needs to consult the push_constant_loc array to get the real index into the params[] array. This effectively folds all the remove_dead_constants() functionality into assign_constant_locations(), while being less irritable to work with. v2: Add assert(remapped <= i), requested by Topi. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glx/create_context.c')
0 files changed, 0 insertions, 0 deletions