diff options
author | Jason Ekstrand <[email protected]> | 2016-08-27 21:39:16 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-09-12 19:42:57 -0700 |
commit | 7ddb21708c800dfbe3cea2df6aaaf7aed852761b (patch) | |
tree | d6572da54873cc2f06aeef659aecaa1a868e89ab /src/intel/blorp/blorp_blit.c | |
parent | 376d1dc2f1f5a36fe20ede5defe394b87b385731 (diff) |
intel/isl: Add an isl_swizzle structure and use it for isl_view swizzles
This should be more compact than the enum isl_channel_select[4] that we
were using before. It's also very convenient because we already had such a
structure in the Vulkan driver we just needed to pull it over.
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel/blorp/blorp_blit.c')
-rw-r--r-- | src/intel/blorp/blorp_blit.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index 2b6adc39f01..0531bfb0d29 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -1637,10 +1637,12 @@ blorp_blit(struct blorp_batch *batch, brw_blorp_get_blit_kernel(batch->blorp, ¶ms, &wm_prog_key); - for (unsigned i = 0; i < 4; i++) { - params.src.view.channel_select[i] = - swizzle_to_scs(GET_SWZ(src_swizzle, i)); - } + params.src.view.swizzle = (struct isl_swizzle) { + .r = swizzle_to_scs(GET_SWZ(src_swizzle, 0)), + .g = swizzle_to_scs(GET_SWZ(src_swizzle, 1)), + .b = swizzle_to_scs(GET_SWZ(src_swizzle, 2)), + .a = swizzle_to_scs(GET_SWZ(src_swizzle, 3)), + }; batch->blorp->exec(batch, ¶ms); } |