mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 05:58:05 +02:00
r300: invalidate texture cache when clearing texture bound for sampling
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38842>
This commit is contained in:
parent
48d30ce5bf
commit
7abe0363c7
5 changed files with 18 additions and 11 deletions
|
|
@ -32,9 +32,6 @@ dEQP-GLES2.functional.draw.random.8,Fail
|
|||
|
||||
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_oes,Fail
|
||||
|
||||
dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgb,Fail
|
||||
dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgba,Fail
|
||||
|
||||
# This bunch is not reproducible outside of CI
|
||||
dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.8,Fail
|
||||
dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.86,Fail
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_oes,Fail
|
||||
|
||||
dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgb,Fail
|
||||
dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgba,Fail
|
||||
dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units,Fail
|
||||
dEQP-GLES2.functional.polygon_offset.fixed16_render_with_units,Fail
|
||||
dEQP-GLES2.functional.shaders.builtin_variable.frontfacing,Fail
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_oes,Fail
|
||||
|
||||
dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgb,Fail
|
||||
dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgba,Fail
|
||||
|
||||
# This bunch is not reproducible outside of CI
|
||||
dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.8,Fail
|
||||
dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.20,Fail
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
# "Framebuffer checked as complete, expected incomplete"
|
||||
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_half_float_oes,Fail
|
||||
|
||||
dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgb,Fail
|
||||
dEQP-GLES2.functional.fbo.render.repeated_clear.tex2d_rgba,Fail
|
||||
|
||||
dEQP-GLES2.functional.polygon_offset.default_factor_1_slope,Fail
|
||||
dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units,Fail
|
||||
dEQP-GLES2.functional.polygon_offset.fixed16_render_with_units,Fail
|
||||
|
|
|
|||
|
|
@ -411,6 +411,24 @@ static void r300_clear(struct pipe_context* pipe,
|
|||
r300_mark_fb_state_dirty(r300, R300_CHANGED_HYPERZ_FLAG);
|
||||
}
|
||||
|
||||
/* If we are clearing texture currently bound for sampling we need to invalidate the cache. */
|
||||
if (buffers & PIPE_CLEAR_COLOR) {
|
||||
struct r300_textures_state *texstate =
|
||||
(struct r300_textures_state*)r300->textures_state.state;
|
||||
for (unsigned i = 0; i < fb->nr_cbufs; i++) {
|
||||
struct pipe_resource *cbuf_tex = fb->cbufs[i].texture;
|
||||
if (!cbuf_tex)
|
||||
continue;
|
||||
for (unsigned s = 0; s < texstate->sampler_view_count; s++) {
|
||||
struct r300_sampler_view *view = texstate->sampler_views[s];
|
||||
if (view && view->base.texture == cbuf_tex) {
|
||||
r300_mark_atom_dirty(r300, &r300->texture_cache_inval);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable fastfill and/or hiz.
|
||||
*
|
||||
* If we cleared zmask/hiz, it's in use now. The Hyper-Z state update
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue