diff options
author | Rob Clark <[email protected]> | 2016-03-13 12:09:51 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-03-13 12:23:41 -0400 |
commit | 09b34473446163eb737c2b183095c0342eab7eea (patch) | |
tree | 0a462927b3bf34b1b7cbe93cee477cffcb8f6784 /src/gallium | |
parent | 5b955f09f72b2217576ea8980a3d8fd3ba63854a (diff) |
freedreno/a3xx: constify the shader variants
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 6 | ||||
-rw-r--r-- | 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 ab4f8e1632a..adfa9a96a46 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 42483f6c39b..fd9c3caae67 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) { |