summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a4xx
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-03-07 00:50:21 -0500
committerRob Clark <[email protected]>2016-03-13 12:23:40 -0400
commit5b955f09f72b2217576ea8980a3d8fd3ba63854a (patch)
tree1a6cca7a0cbc2bd962c150f8eb512af166ba908a /src/gallium/drivers/freedreno/a4xx
parentd9395e4ed8d0703cdf23e61c62bd14b65eb49a1b (diff)
freedreno/a4xx: constify the shader variants
Most of the driver just needs read-only access, so constify.. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a4xx')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_emit.c6
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_emit.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
index 78a7d0e3fab..e887abf709f 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
@@ -328,7 +328,7 @@ fd4_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd4_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 = fd4_emit_get_vp(emit);
+ const struct ir3_shader_variant *vp = fd4_emit_get_vp(emit);
unsigned vertex_regid = regid(63, 0);
unsigned instance_regid = regid(63, 0);
unsigned vtxcnt_regid = regid(63, 0);
@@ -460,8 +460,8 @@ void
fd4_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
struct fd4_emit *emit)
{
- struct ir3_shader_variant *vp = fd4_emit_get_vp(emit);
- struct ir3_shader_variant *fp = fd4_emit_get_fp(emit);
+ const struct ir3_shader_variant *vp = fd4_emit_get_vp(emit);
+ const struct ir3_shader_variant *fp = fd4_emit_get_fp(emit);
uint32_t dirty = emit->dirty;
emit_marker(ring, 5);
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.h b/src/gallium/drivers/freedreno/a4xx/fd4_emit.h
index 3a1d4b617d3..ba4a6ecc7ee 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.h
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.h
@@ -59,7 +59,7 @@ struct fd4_emit {
bool no_decode_srgb;
/* cached to avoid repeated lookups of same variants: */
- struct ir3_shader_variant *vp, *fp;
+ const struct ir3_shader_variant *vp, *fp;
/* TODO: other shader stages.. */
};
@@ -70,7 +70,7 @@ static inline enum a4xx_color_fmt fd4_emit_format(struct pipe_surface *surf)
return fd4_pipe2color(surf->format);
}
-static inline struct ir3_shader_variant *
+static inline const struct ir3_shader_variant *
fd4_emit_get_vp(struct fd4_emit *emit)
{
if (!emit->vp) {
@@ -80,7 +80,7 @@ fd4_emit_get_vp(struct fd4_emit *emit)
return emit->vp;
}
-static inline struct ir3_shader_variant *
+static inline const struct ir3_shader_variant *
fd4_emit_get_fp(struct fd4_emit *emit)
{
if (!emit->fp) {