diff options
author | Marek Olšák <[email protected]> | 2017-04-02 01:51:57 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-04-04 11:14:43 +0200 |
commit | 9869a3b3ba6f82b093a5b7583d99c5361a3270d9 (patch) | |
tree | 0eaf21bd58be96e25ea72fa98a6e8c1657194206 /src/gallium/include/pipe | |
parent | 4648bc2a8fbb11df4602d3f3aceeb086db9e2304 (diff) |
gallium: decrease the size of pipe_sampler_view - 48 -> 32 bytes
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index a4692b60968..392bb8b502d 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -426,8 +426,12 @@ struct pipe_surface struct pipe_sampler_view { struct pipe_reference reference; - enum pipe_texture_target target; /**< PIPE_TEXTURE_x */ - enum pipe_format format; /**< typed PIPE_FORMAT_x */ + enum pipe_format format:16; /**< typed PIPE_FORMAT_x */ + enum pipe_texture_target target:4; /**< PIPE_TEXTURE_x */ + unsigned swizzle_r:3; /**< PIPE_SWIZZLE_x for red component */ + unsigned swizzle_g:3; /**< PIPE_SWIZZLE_x for green component */ + unsigned swizzle_b:3; /**< PIPE_SWIZZLE_x for blue component */ + unsigned swizzle_a:3; /**< PIPE_SWIZZLE_x for alpha component */ struct pipe_resource *texture; /**< texture into which this is a view */ struct pipe_context *context; /**< context this view belongs to */ union { @@ -442,10 +446,6 @@ struct pipe_sampler_view unsigned size; /**< size of the readable sub-range in bytes */ } buf; } u; - unsigned swizzle_r:3; /**< PIPE_SWIZZLE_x for red component */ - unsigned swizzle_g:3; /**< PIPE_SWIZZLE_x for green component */ - unsigned swizzle_b:3; /**< PIPE_SWIZZLE_x for blue component */ - unsigned swizzle_a:3; /**< PIPE_SWIZZLE_x for alpha component */ }; |