mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 02:20:11 +01:00
svga: null out all sampler views if start=num=0
Because the CSO module handles sampler views for fragment shaders differently than vertex/geom shaders, VS/GS shader sampler views aren't explicitly unbound like for FS sampler vers. This code checks for the case of start=num=0 and nulls out the sampler views. Fixes a assert regression in piglit's arb_texture_multisample- sample-position test. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
parent
fe430b0310
commit
877a8026c7
1 changed files with 12 additions and 0 deletions
|
|
@ -433,6 +433,18 @@ svga_set_sampler_views(struct pipe_context *pipe,
|
|||
if (!svga_have_vgpu10(svga) && shader != PIPE_SHADER_FRAGMENT)
|
||||
return;
|
||||
|
||||
/* This bit of code works around a quirk in the CSO module.
|
||||
* If start=num=0 it means all sampler views should be released.
|
||||
* Note that the CSO module treats sampler views for fragment shaders
|
||||
* differently than other shader types.
|
||||
*/
|
||||
if (start == 0 && num == 0 && svga->curr.num_sampler_views[shader] > 0) {
|
||||
for (i = 0; i < svga->curr.num_sampler_views[shader]; i++) {
|
||||
pipe_sampler_view_release(pipe, &svga->curr.sampler_views[shader][i]);
|
||||
}
|
||||
any_change = TRUE;
|
||||
}
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
enum pipe_texture_target target;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue