mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 14:00:30 +01:00
panfrost: Handle NULL samplers
Fixes a NULL dereference in Piglit fp-fragment-position, getting the
test to pass.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13203>
(cherry picked from commit 5536852d60)
This commit is contained in:
parent
f47fdc49a9
commit
4fee724faf
3 changed files with 6 additions and 5 deletions
|
|
@ -229,7 +229,7 @@
|
|||
"description": "panfrost: Handle NULL samplers",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1426,8 +1426,11 @@ panfrost_emit_sampler_descriptors(struct panfrost_batch *batch,
|
|||
SAMPLER);
|
||||
struct mali_sampler_packed *out = (struct mali_sampler_packed *) T.cpu;
|
||||
|
||||
for (unsigned i = 0; i < ctx->sampler_count[stage]; ++i)
|
||||
out[i] = ctx->samplers[stage][i]->hw;
|
||||
for (unsigned i = 0; i < ctx->sampler_count[stage]; ++i) {
|
||||
struct panfrost_sampler_state *st = ctx->samplers[stage][i];
|
||||
|
||||
out[i] = st ? st->hw : (struct mali_sampler_packed){0};
|
||||
}
|
||||
|
||||
return T.gpu;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,8 +85,6 @@ spec@arb_es2_compatibility@texwrap formats bordercolor,Fail
|
|||
spec@arb_es2_compatibility@texwrap formats bordercolor@GL_RGB565- border color only,Fail
|
||||
spec@arb_es2_compatibility@texwrap formats bordercolor-swizzled,Fail
|
||||
spec@arb_es2_compatibility@texwrap formats bordercolor-swizzled@GL_RGB565- swizzled- border color only,Fail
|
||||
spec@arb_fragment_program@fp-fragment-position,Crash
|
||||
spec@arb_fragment_program@sparse-samplers,Crash
|
||||
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit depth gl_depth32f_stencil8,Fail
|
||||
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit depth_stencil gl_depth32f_stencil8,Fail
|
||||
spec@arb_framebuffer_object@arb_framebuffer_object-depth-stencil-blit stencil gl_depth32f_stencil8,Fail
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue