aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2015-07-13 15:39:03 +0300
committerFrancisco Jerez <[email protected]>2015-07-29 14:12:49 +0300
commit03846696ce2deaaaff42b2acd7745b51a7f115f2 (patch)
tree5ae6ac520c80131719d58808c0191eb1f29ef0f8 /src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
parent3352724dfa4eb5c93290db92ae99d26d9b89e630 (diff)
i965/fs: Handle zero-size allocations in fs_builder::vgrf().
This will be handy to avoid some ugly ternary operators in the next patch, like: fs_reg reg = (size == 0 ? null_reg_ud() : vgrf(..., size)); Because a zero-size register allocation is guaranteed not to ever be read or written we can just return the null register. Another possibility would be to actually allocate a zero-size VGRF what would involve defining a zero-size register class in the register allocator and a considerable amount of churn. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp')
0 files changed, 0 insertions, 0 deletions