diff options
author | Jason Ekstrand <[email protected]> | 2017-02-28 17:15:04 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-03-01 16:14:01 -0800 |
commit | 035616cb8edef47d9d2aac78d47c99563fd5468f (patch) | |
tree | a062c0769b4e9bc7f5c060c60b5b9d29329a4469 /src/mesa | |
parent | 0d2c9ce1ce93848ce4c13d3467d58fa2fc36d0ca (diff) |
i965: Don't use MAX_SURFACES in mark_surface_used
Vulkan doesn't respect MAX_SURFACES so this assert isn't valid in that
case. It should, however, assert that it isn't insanely large.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 02aa0b206ce..8b852d52721 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -33,7 +33,10 @@ extern "C" void brw_mark_surface_used(struct brw_stage_prog_data *prog_data, unsigned surf_index) { - assert(surf_index < BRW_MAX_SURFACES); + /* A binding table index is 8 bits and the top 3 values are reserved for + * special things (stateless and SLM). + */ + assert(surf_index <= 252); prog_data->binding_table.size_bytes = MAX2(prog_data->binding_table.size_bytes, (surf_index + 1) * 4); |