Jordan Justen <[email protected]> writes: > From: Francisco Jerez <[email protected]> > > Fixes > arb_shader_image_load_store/execution/load-from-cleared-image.shader_test > > Cc: Chris Wilson <[email protected]> > Cc: Jason Ekstrand <[email protected]> > Tested-by: Jordan Justen <[email protected]> > --- > RE: i965: Perform an explicit flush after doing _mesa_meta_pbo_TexSubImage > > curro has some concerns about potential perf impact by this and > wanted it to be checked on small-core w/CPU bound apps. > Unfortunately, he is on vacation now.
I've benchmarked this on VLV and none of the CPU-bound tests in the
Finnish benchmarking system regress significantly, with n=6 and 95%
confidence level, so s/RFC/PATCH/. I'll CC mesa-stable so it probably
makes sense to keep this independent from Chris' VBO resolve series.
>
> src/mesa/drivers/dri/i965/brw_context.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c
> b/src/mesa/drivers/dri/i965/brw_context.c
> index f0ed891..a274a43 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -189,6 +189,24 @@ intel_update_state(struct gl_context * ctx, GLuint
> new_state)
> brw_render_cache_set_check_flush(brw, tex_obj->mt->bo);
> }
>
> + /* Resolve color for each active shader image. */
> + for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
> + const struct gl_shader *shader = ctx->_Shader->CurrentProgram[i] ?
> + ctx->_Shader->CurrentProgram[i]->_LinkedShaders[i] : NULL;
> +
> + if (unlikely(shader && shader->NumImages)) {
> + for (unsigned j = 0; j < shader->NumImages; j++) {
> + struct gl_image_unit *u =
> &ctx->ImageUnits[shader->ImageUnits[j]];
> + tex_obj = intel_texture_object(u->TexObj);
> +
> + if (tex_obj && tex_obj->mt) {
> + intel_miptree_resolve_color(brw, tex_obj->mt);
> + brw_render_cache_set_check_flush(brw, tex_obj->mt->bo);
> + }
> + }
> + }
> + }
> +
> _mesa_lock_context_textures(ctx);
> }
>
> --
> 2.5.0
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
