[Mesa-dev] [PATCH] intel/blorp: Shrink the size of brw_blorp_blit_prog_key.
Kenneth Graunke
kenneth at whitecape.org
Tue Aug 22 20:27:56 UTC 2017
This shrinks the key from 64 bytes to 20 bytes.
---
src/intel/blorp/blorp_priv.h | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/src/intel/blorp/blorp_priv.h b/src/intel/blorp/blorp_priv.h
index 81bf8c66c66..f96a5e0e5ad 100644
--- a/src/intel/blorp/blorp_priv.h
+++ b/src/intel/blorp/blorp_priv.h
@@ -221,20 +221,20 @@ struct brw_blorp_blit_prog_key
/* Number of samples per pixel that have been configured in the surface
* state for texturing from.
*/
- unsigned tex_samples;
+ uint8_t tex_samples;
/* MSAA layout that has been configured in the surface state for texturing
* from.
*/
- enum isl_msaa_layout tex_layout;
+ enum isl_msaa_layout tex_layout:8;
- enum isl_aux_usage tex_aux_usage;
+ enum isl_aux_usage tex_aux_usage:8;
/* Actual number of samples per pixel in the source image. */
- unsigned src_samples;
+ uint8_t src_samples;
/* Actual MSAA layout used by the source image. */
- enum isl_msaa_layout src_layout;
+ enum isl_msaa_layout src_layout:8;
/* Number of bits per channel in the source image. */
uint8_t src_bpc;
@@ -245,16 +245,16 @@ struct brw_blorp_blit_prog_key
/* Number of samples per pixel that have been configured in the render
* target.
*/
- unsigned rt_samples;
+ uint8_t rt_samples;
/* MSAA layout that has been configured in the render target. */
- enum isl_msaa_layout rt_layout;
+ enum isl_msaa_layout rt_layout:8;
/* Actual number of samples per pixel in the destination image. */
- unsigned dst_samples;
+ uint8_t dst_samples;
/* Actual MSAA layout used by the destination image. */
- enum isl_msaa_layout dst_layout;
+ enum isl_msaa_layout dst_layout:8;
/* Number of bits per channel in the destination image. */
uint8_t dst_bpc;
@@ -262,65 +262,65 @@ struct brw_blorp_blit_prog_key
/* Type of the data to be read from the texture (one of
* nir_type_(int|uint|float)).
*/
- nir_alu_type texture_data_type;
+ nir_alu_type texture_data_type:8;
/* True if the source image is W tiled. If true, the surface state for the
* source image must be configured as Y tiled, and tex_samples must be 0.
*/
- bool src_tiled_w;
+ bool src_tiled_w:1;
/* True if the destination image is W tiled. If true, the surface state
* for the render target must be configured as Y tiled, and rt_samples must
* be 0.
*/
- bool dst_tiled_w;
+ bool dst_tiled_w:1;
/* True if the destination is an RGB format. If true, the surface state
* for the render target must be configured as red with three times the
* normal width. We need to do this because you cannot render to
* non-power-of-two formats.
*/
- bool dst_rgb;
+ bool dst_rgb:1;
/* True if all source samples should be blended together to produce each
* destination pixel. If true, src_tiled_w must be false, tex_samples must
* equal src_samples, and tex_samples must be nonzero.
*/
- bool blend;
+ bool blend:1;
/* True if the rectangle being sent through the rendering pipeline might be
* larger than the destination rectangle, so the WM program should kill any
* pixels that are outside the destination rectangle.
*/
- bool use_kill;
+ bool use_kill:1;
/**
* True if the WM program should be run in MSDISPMODE_PERSAMPLE with more
* than one sample per pixel.
*/
- bool persample_msaa_dispatch;
+ bool persample_msaa_dispatch:1;
/* True for scaled blitting. */
- bool blit_scaled;
+ bool blit_scaled:1;
/* True if this blit operation may involve intratile offsets on the source.
* In this case, we need to add the offset before texturing.
*/
- bool need_src_offset;
+ bool need_src_offset:1;
/* True if this blit operation may involve intratile offsets on the
* destination. In this case, we need to add the offset to gl_FragCoord.
*/
- bool need_dst_offset;
+ bool need_dst_offset:1;
+
+ /* True for blits with filter = GL_LINEAR. */
+ bool bilinear_filter:1;
/* Scale factors between the pixel grid and the grid of samples. We're
* using grid of samples for bilinear filetring in multisample scaled blits.
*/
float x_scale;
float y_scale;
-
- /* True for blits with filter = GL_LINEAR. */
- bool bilinear_filter;
};
/**
--
2.14.1
More information about the mesa-dev
mailing list