mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
gallivm/sample: fix sampling indirect from vertex shaders
When doing indirect sampling, we just fetch one value per lane,
but type.length == 1 caused num_quads to be 0 which caused things
to crash.
Fixes dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.uniform.vertex.sampler2d
Cc: mesa-stable
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30358>
(cherry picked from commit 3e01422a16)
This commit is contained in:
parent
d4c3867cc2
commit
664041f204
2 changed files with 2 additions and 2 deletions
|
|
@ -1234,7 +1234,7 @@
|
|||
"description": "gallivm/sample: fix sampling indirect from vertex shaders",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -3379,7 +3379,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
|
|||
|
||||
const enum pipe_texture_target target = static_texture_state->target;
|
||||
const unsigned dims = texture_dims(target);
|
||||
const unsigned num_quads = type.length / 4;
|
||||
const unsigned num_quads = type.length == 1 ? 1 : type.length / 4;
|
||||
struct lp_build_sample_context bld;
|
||||
struct lp_static_sampler_state derived_sampler_state = *static_sampler_state;
|
||||
LLVMTypeRef i32t = LLVMInt32TypeInContext(gallivm->context);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue