diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2022-06-16 16:58:37 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-06-18 20:18:18 +0000 |
commit | 9ca0c0b4b40831038cac027bd342b2405e0716db (patch) | |
tree | 1f7308ac891bad28f95d242419f4f6fce80a559e | |
parent | 81557a4fdf1e780bef75ca4ba115395ec61aae18 (diff) |
mesa/st: increment num_uniforms for hw accel select shaders
this otherwise breaks nir_lower_uniforms_to_ubo() and probably lots
of drivers
Fixes: 9b22ab4167e ("mesa/st: implement hardware accelerated GL_SELECT")
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17092>
-rw-r--r-- | src/mesa/state_tracker/st_draw_hw_select.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_draw_hw_select.c b/src/mesa/state_tracker/st_draw_hw_select.c index 5a032da046a..0e6ec5fe360 100644 --- a/src/mesa/state_tracker/st_draw_hw_select.c +++ b/src/mesa/state_tracker/st_draw_hw_select.c @@ -612,6 +612,7 @@ hw_select_create_gs(struct st_context *st, union state_key state) nir_shader *nir = b.shader; nir->info.inputs_read = VARYING_BIT_POS; + nir->num_uniforms = DIV_ROUND_UP(sizeof(struct geometry_constant), (4 * sizeof(float))); nir->info.num_ssbos = 1; nir->info.gs.output_primitive = SHADER_PRIM_POINTS; nir->info.gs.vertices_out = 1; |