[Mesa-dev] [PATCH 6/9] r600/compute: only mark buffer/image state dirty for fragment shaders

Roland Scheidegger sroland at vmware.com
Tue Feb 6 04:33:10 UTC 2018


Am 05.02.2018 um 05:29 schrieb Dave Airlie:
> From: Dave Airlie <airlied at redhat.com>
> 
> The compute emission path always emits this currently, and emitting
> it on the fragment path breaks the blitter.
> 
> This fixes gpu hangs in KHR-GL45.compute_shader.resource-texture
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>

I have some feeling things would be more robust if an atom must not be
emitted in some cases, then the atom emit code should take care of it,
rather than relying on not setting it dirty.
Albeit since compute does not actually really use the ordinary atom
list, maybe there should be a separate atom list really? Seems like
dirty handling for compute in general could need some improvement.
In any case, I suppose that'll have to do for now, so
for 4-6/9
Reviewed-by: Roland Scheidegger <sorland at vmware.com>

> ---
>  src/gallium/drivers/r600/evergreen_state.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
> index 0999cc5de8..11e473d604 100644
> --- a/src/gallium/drivers/r600/evergreen_state.c
> +++ b/src/gallium/drivers/r600/evergreen_state.c
> @@ -4062,7 +4062,8 @@ static void evergreen_set_shader_buffers(struct pipe_context *ctx,
>  		r600_mark_atom_dirty(rctx, &rctx->cb_misc_state.atom);
>  	}
>  
> -	r600_mark_atom_dirty(rctx, &istate->atom);
> +	if (shader == PIPE_SHADER_FRAGMENT)
> +		r600_mark_atom_dirty(rctx, &istate->atom);
>  }
>  
>  static void evergreen_set_shader_images(struct pipe_context *ctx,
> @@ -4238,7 +4239,8 @@ static void evergreen_set_shader_images(struct pipe_context *ctx,
>  		r600_mark_atom_dirty(rctx, &rctx->cb_misc_state.atom);
>  	}
>  
> -	r600_mark_atom_dirty(rctx, &istate->atom);
> +	if (shader == PIPE_SHADER_FRAGMENT)
> +		r600_mark_atom_dirty(rctx, &istate->atom);
>  }
>  
>  static void evergreen_get_pipe_constant_buffer(struct r600_context *rctx,
> 



More information about the mesa-dev mailing list