diff options
author | Eric Anholt <[email protected]> | 2015-07-14 12:32:04 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-07-14 15:17:58 -0700 |
commit | 7124feba1b879deb88dbf2baf600ed42309d9839 (patch) | |
tree | e4f15973dbb8a8031aacb90f6472b09b0f8f3b19 /src/gallium/drivers/vc4/vc4_context.h | |
parent | 0f4d2b0a2dd3fa39426f2789bf2a8fc939adf001 (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.h | 11 |
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); |