[Mesa-dev] [PATCH] r600g: Fix flushing issues with llvm on r700 hw

Vincent Lejeune vljn at ovi.com
Tue Nov 20 13:34:21 PST 2012


Hi,

http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb44c36df842af010269eda1be77c4aea8ebe736 introduces a bug with tgsi-to-llvm on R700 cards.

Apparently there is an issue with flushing : a lot of piglit shaders are reported to fail (I got something like 3000 regressions) however running them manually shows that the produced output is not properly caught by piglit.
For instance, fp-abs-01 shader is reported to fail, but displays 2 green squares side by side. Sanity tests pass.

Investigation show that changing values of R600_MAX_CONST_BUFFERS is the culprit here, because of the 3 r600_emit_sampler_views call. I have honestly no idea what these functions do and why it works with classic tgsi path and not tgsi to llvm pass,
so I'm calling for some explanation here.

----- Mail original -----
> De : Vincent Lejeune <vljn at ovi.com>
> À : mesa-dev at lists.freedesktop.org
> Cc : Vincent Lejeune <vljn at ovi.com>
> Envoyé le : Mardi 20 novembre 2012 22h22
> Objet : [PATCH] r600g: Fix flushing issues with llvm on r700 hw
> 
> ---
> src/gallium/drivers/r600/r600_state.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gallium/drivers/r600/r600_state.c 
> b/src/gallium/drivers/r600/r600_state.c
> index ab658da..87fe4e7 100644
> --- a/src/gallium/drivers/r600/r600_state.c
> +++ b/src/gallium/drivers/r600/r600_state.c
> @@ -2012,17 +2012,17 @@ static void r600_emit_sampler_views(struct r600_context 
> *rctx,
> 
> static void r600_emit_vs_sampler_views(struct r600_context *rctx, struct 
> r600_atom *atom)
> {
> -    r600_emit_sampler_views(rctx, 
> &rctx->samplers[PIPE_SHADER_VERTEX].views, 160 + R600_MAX_CONST_BUFFERS);
> +    r600_emit_sampler_views(rctx, 
> &rctx->samplers[PIPE_SHADER_VERTEX].views, 160 + R600_MAX_CONST_BUFFERS - 
> 1);
> }
> 
> static void r600_emit_gs_sampler_views(struct r600_context *rctx, struct 
> r600_atom *atom)
> {
> -    r600_emit_sampler_views(rctx, 
> &rctx->samplers[PIPE_SHADER_GEOMETRY].views, 336 + 
> R600_MAX_CONST_BUFFERS);
> +    r600_emit_sampler_views(rctx, 
> &rctx->samplers[PIPE_SHADER_GEOMETRY].views, 336 + R600_MAX_CONST_BUFFERS 
> - 1);
> }
> 
> static void r600_emit_ps_sampler_views(struct r600_context *rctx, struct 
> r600_atom *atom)
> {
> -    r600_emit_sampler_views(rctx, 
> &rctx->samplers[PIPE_SHADER_FRAGMENT].views, R600_MAX_CONST_BUFFERS);
> +    r600_emit_sampler_views(rctx, 
> &rctx->samplers[PIPE_SHADER_FRAGMENT].views, R600_MAX_CONST_BUFFERS - 1);
> }
> 
> static void r600_emit_sampler_states(struct r600_context *rctx,
> -- 
> 1.7.11.7
> 


More information about the mesa-dev mailing list