summaryrefslogtreecommitdiffstats
path: root/src/intel/isl
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/isl')
-rw-r--r--src/intel/isl/isl.h5
-rw-r--r--src/intel/isl/isl_surface_state.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index cfac922a3d2..a792e18e5d1 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -1361,6 +1361,11 @@ struct isl_buffer_fill_state_info {
*/
enum isl_format format;
+ /**
+ * The swizzle to use in the surface state
+ */
+ struct isl_swizzle swizzle;
+
uint32_t stride_B;
};
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index 7ab260d701b..cf31b36ccbe 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -745,10 +745,10 @@ isl_genX(buffer_fill_state_s)(void *state,
#endif
#if (GEN_GEN >= 8 || GEN_IS_HASWELL)
- s.ShaderChannelSelectRed = SCS_RED;
- s.ShaderChannelSelectGreen = SCS_GREEN;
- s.ShaderChannelSelectBlue = SCS_BLUE;
- s.ShaderChannelSelectAlpha = SCS_ALPHA;
+ s.ShaderChannelSelectRed = (enum GENX(ShaderChannelSelect)) info->swizzle.r;
+ s.ShaderChannelSelectGreen = (enum GENX(ShaderChannelSelect)) info->swizzle.g;
+ s.ShaderChannelSelectBlue = (enum GENX(ShaderChannelSelect)) info->swizzle.b;
+ s.ShaderChannelSelectAlpha = (enum GENX(ShaderChannelSelect)) info->swizzle.a;
#endif
GENX(RENDER_SURFACE_STATE_pack)(NULL, state, &s);