From 09b34473446163eb737c2b183095c0342eab7eea Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 13 Mar 2016 12:09:51 -0400 Subject: [PATCH] freedreno/a3xx: constify the shader variants Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 6 +++--- src/gallium/drivers/freedreno/a3xx/fd3_emit.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index ab4f8e1..adfa9a9 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -353,7 +353,7 @@ fd3_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd3_emit *emit) int32_t i, j, last = -1; uint32_t total_in = 0; const struct fd_vertex_state *vtx = emit->vtx; - struct ir3_shader_variant *vp = fd3_emit_get_vp(emit); + const struct ir3_shader_variant *vp = fd3_emit_get_vp(emit); unsigned vertex_regid = regid(63, 0); unsigned instance_regid = regid(63, 0); unsigned vtxcnt_regid = regid(63, 0); @@ -478,8 +478,8 @@ void fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, struct fd3_emit *emit) { - struct ir3_shader_variant *vp = fd3_emit_get_vp(emit); - struct ir3_shader_variant *fp = fd3_emit_get_fp(emit); + const struct ir3_shader_variant *vp = fd3_emit_get_vp(emit); + const struct ir3_shader_variant *fp = fd3_emit_get_fp(emit); uint32_t dirty = emit->dirty; emit_marker(ring, 5); diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h index 42483f6..fd9c3ca 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.h @@ -58,10 +58,10 @@ struct fd3_emit { bool rasterflat; /* cached to avoid repeated lookups of same variants: */ - struct ir3_shader_variant *vp, *fp; + const struct ir3_shader_variant *vp, *fp; }; -static inline struct ir3_shader_variant * +static inline const struct ir3_shader_variant * fd3_emit_get_vp(struct fd3_emit *emit) { if (!emit->vp) { @@ -71,7 +71,7 @@ fd3_emit_get_vp(struct fd3_emit *emit) return emit->vp; } -static inline struct ir3_shader_variant * +static inline const struct ir3_shader_variant * fd3_emit_get_fp(struct fd3_emit *emit) { if (!emit->fp) { -- 2.7.4