diff options
author | Rob Clark <[email protected]> | 2020-06-15 09:37:13 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-19 13:16:57 +0000 |
commit | f4654c458f81d47b59f3562f6f92ebf20321a3a2 (patch) | |
tree | 69142833c777392ac6566cd8114431c287d7ab9b /src/freedreno/ir3 | |
parent | 91ed8b7fe370d7293fcdc511cfd65c7c97ed516d (diff) |
freedreno/ir3: constify shader key
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5508>
Diffstat (limited to 'src/freedreno/ir3')
-rw-r--r-- | src/freedreno/ir3/ir3_shader.c | 6 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_shader.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/freedreno/ir3/ir3_shader.c b/src/freedreno/ir3/ir3_shader.c index a8f3dc76e9f..4bd427b4dc8 100644 --- a/src/freedreno/ir3/ir3_shader.c +++ b/src/freedreno/ir3/ir3_shader.c @@ -181,7 +181,7 @@ assemble_variant(struct ir3_shader_variant *v) * (non-binning) variant. */ static struct ir3_shader_variant * -create_variant(struct ir3_shader *shader, struct ir3_shader_key *key, +create_variant(struct ir3_shader *shader, const struct ir3_shader_key *key, struct ir3_shader_variant *nonbinning) { struct ir3_shader_variant *v = CALLOC_STRUCT(ir3_shader_variant); @@ -237,7 +237,7 @@ fail: } static inline struct ir3_shader_variant * -shader_variant(struct ir3_shader *shader, struct ir3_shader_key *key, +shader_variant(struct ir3_shader *shader, const struct ir3_shader_key *key, bool *created) { struct ir3_shader_variant *v; @@ -260,7 +260,7 @@ shader_variant(struct ir3_shader *shader, struct ir3_shader_key *key, } struct ir3_shader_variant * -ir3_shader_get_variant(struct ir3_shader *shader, struct ir3_shader_key *key, +ir3_shader_get_variant(struct ir3_shader *shader, const struct ir3_shader_key *key, bool binning_pass, bool *created) { mtx_lock(&shader->variants_lock); diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h index 1ee7371d8f4..0123af67635 100644 --- a/src/freedreno/ir3/ir3_shader.h +++ b/src/freedreno/ir3/ir3_shader.h @@ -325,7 +325,7 @@ ir3_tess_mode(unsigned gl_tess_mode) } static inline bool -ir3_shader_key_equal(struct ir3_shader_key *a, struct ir3_shader_key *b) +ir3_shader_key_equal(const struct ir3_shader_key *a, const struct ir3_shader_key *b) { /* slow-path if we need to check {v,f}saturate_{s,t,r} */ if (a->has_per_samp || b->has_per_samp) @@ -649,7 +649,7 @@ ir3_const_state(const struct ir3_shader_variant *v) void * ir3_shader_assemble(struct ir3_shader_variant *v); struct ir3_shader_variant * ir3_shader_get_variant(struct ir3_shader *shader, - struct ir3_shader_key *key, bool binning_pass, bool *created); + const struct ir3_shader_key *key, bool binning_pass, bool *created); struct ir3_shader * ir3_shader_from_nir(struct ir3_compiler *compiler, nir_shader *nir, unsigned reserved_user_consts, struct ir3_stream_output_info *stream_output); void ir3_shader_destroy(struct ir3_shader *shader); |