summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-07-14 12:32:04 -0700
committerEric Anholt <[email protected]>2015-07-14 15:17:58 -0700
commit7124feba1b879deb88dbf2baf600ed42309d9839 (patch)
treee4f15973dbb8a8031aacb90f6472b09b0f8f3b19 /src/gallium/drivers/vc4/vc4_context.h
parent0f4d2b0a2dd3fa39426f2789bf2a8fc939adf001 (diff)
vc4: Cache the texture p1 for the sampler.
Cuts another 12% of vc4_uniforms.o, in exchange for computing it at CSO creation time.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index be7df1bd347..7faf5223630 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -75,6 +75,11 @@ struct vc4_sampler_view {
uint32_t texture_p1;
};
+struct vc4_sampler_state {
+ struct pipe_sampler_state base;
+ uint32_t texture_p1;
+};
+
struct vc4_texture_stateobj {
struct pipe_sampler_view *textures[PIPE_MAX_SAMPLERS];
unsigned num_textures;
@@ -338,6 +343,12 @@ vc4_sampler_view(struct pipe_sampler_view *psview)
return (struct vc4_sampler_view *)psview;
}
+static inline struct vc4_sampler_state *
+vc4_sampler_state(struct pipe_sampler_state *psampler)
+{
+ return (struct vc4_sampler_state *)psampler;
+}
+
struct pipe_context *vc4_context_create(struct pipe_screen *pscreen,
void *priv);
void vc4_draw_init(struct pipe_context *pctx);