[Mesa-dev] [PATCH 2/3] gallium: decrease the size of pipe_sampler_state fields

Marek Olšák maraeo at gmail.com
Fri Dec 2 20:38:58 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

We've had unused bits.
---
 src/gallium/include/pipe/p_state.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 46df196..d501a93 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -357,27 +357,27 @@ struct pipe_framebuffer_state
 
 
 /**
  * Texture sampler state.
  */
 struct pipe_sampler_state
 {
    unsigned wrap_s:3;            /**< PIPE_TEX_WRAP_x */
    unsigned wrap_t:3;            /**< PIPE_TEX_WRAP_x */
    unsigned wrap_r:3;            /**< PIPE_TEX_WRAP_x */
-   unsigned min_img_filter:2;    /**< PIPE_TEX_FILTER_x */
+   unsigned min_img_filter:1;    /**< PIPE_TEX_FILTER_x */
    unsigned min_mip_filter:2;    /**< PIPE_TEX_MIPFILTER_x */
-   unsigned mag_img_filter:2;    /**< PIPE_TEX_FILTER_x */
+   unsigned mag_img_filter:1;    /**< PIPE_TEX_FILTER_x */
    unsigned compare_mode:1;      /**< PIPE_TEX_COMPARE_x */
    unsigned compare_func:3;      /**< PIPE_FUNC_x */
    unsigned normalized_coords:1; /**< Are coords normalized to [0,1]? */
-   unsigned max_anisotropy:6;
+   unsigned max_anisotropy:5;
    unsigned seamless_cube_map:1;
    float lod_bias;               /**< LOD/lambda bias */
    float min_lod, max_lod;       /**< LOD clamp range, after bias */
    union pipe_color_union border_color;
 };
 
 union pipe_surface_desc {
    struct {
       unsigned level;
       unsigned first_layer:16;
-- 
2.7.4



More information about the mesa-dev mailing list