From: Rob Clark Date: Fri, 31 May 2019 15:44:55 +0000 (-0700) Subject: freedreno/a6xx: add 'type' to shader state key X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32131a95680b5cb990e59b2512894a46bc7b0431;p=mesa.git freedreno/a6xx: add 'type' to shader state key We could have identical texture state for both VS and FS.. which would result in VS state getting created first, and FS state mapping to the identical cmdstream. Resulting in VS state getting emitted twice and no FS state emitted. Fixes: dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.basic_array.sampler2D_both dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.struct_in_array.sampler2D_samplerCube_both dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.sampler2D_samplerCube_both dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_both dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.nested_structs_arrays.sampler2D_samplerCube_both dEQP-GLES31.functional.program_uniform.by_pointer.render.array_in_struct.sampler2D_samplerCube_both dEQP-GLES31.functional.program_uniform.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_both dEQP-GLES31.functional.program_uniform.by_value.render.nested_structs_arrays.sampler2D_samplerCube_both Signed-off-by: Rob Clark Reviewed-by: Eric Anholt --- diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c index 80eb9906ebe..608aa08833e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c @@ -396,6 +396,7 @@ fd6_texture_state(struct fd_context *ctx, enum pipe_shader_type type, needs_border |= sampler->needs_border; } + key.type = type; key.bcolor_offset = fd6_border_color_offset(ctx, type, tex); uint32_t hash = key_hash(&key); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.h b/src/gallium/drivers/freedreno/a6xx/fd6_texture.h index 7f0c1538bf4..09b14c29109 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.h @@ -142,6 +142,7 @@ struct fd6_texture_key { struct { uint16_t seqno; } samp[16]; + uint8_t type; uint8_t bcolor_offset; };