mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-12 19:54:33 +08: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>
This commit is contained in:
parent
53ef20f08d
commit
5536852d60
@ -1429,8 +1429,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;
|
||||
}
|
||||
|
@ -86,8 +86,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…
Reference in New Issue
Block a user