[Mesa-dev] [PATCH] i965: get PrimitiveMode from the program rather than the shader struct

Iago Toral itoral at igalia.com
Mon Jun 20 16:06:03 UTC 2016


On Mon, 2016-06-20 at 17:40 +1000, Timothy Arceri wrote:
> This is more consitent with what we do elsewhere and will allow
              consistent

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

> us to only cache one of the values in the shader cache.
> ---
>  src/mesa/drivers/dri/i965/brw_tcs.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c
> index ecd0a86..692c6f4 100644
> --- a/src/mesa/drivers/dri/i965/brw_tcs.c
> +++ b/src/mesa/drivers/dri/i965/brw_tcs.c
> @@ -424,9 +424,8 @@ brw_tcs_precompile(struct gl_context *ctx,
>     if (brw->gen < 8)
>        key.input_vertices = shader_prog->TessCtrl.VerticesOut;
>  
> -   key.tes_primitive_mode =
> -      shader_prog->_LinkedShaders[MESA_SHADER_TESS_EVAL] ?
> -      shader_prog->TessEval.PrimitiveMode : GL_TRIANGLES;
> +   key.tes_primitive_mode = brw->tess_eval_program ?
> +      brw->tess_eval_program->PrimitiveMode : GL_TRIANGLES;
>  
>     key.outputs_written = prog->OutputsWritten;
>     key.patch_outputs_written = prog->PatchOutputsWritten;




More information about the mesa-dev mailing list