summaryrefslogtreecommitdiff
path: root/lib/rendercopy_gen9.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2019-12-04 15:50:49 +0200
committerImre Deak <imre.deak@intel.com>2019-12-09 10:30:07 +0200
commit1b21dc2c399805f8580e000346ff457fe50f12fa (patch)
treeb8db78538a391ae532f930f78416d3839772c7f6 /lib/rendercopy_gen9.c
parent19052bb86bf158c80123974cc79eb53cba3ef500 (diff)
tests/gem_render_copy: Add media compression subtests
Add subtests using the vebox copy function to test the blit functionality involving media compressed source and destination buffers. These cover all the source and destination tiling formats supported by the vebox engine and validate the buffer sharing between the render and vebox engine (a render compressed buffer used by the vebox engine and a media compressed buffer used by the render engine). v2: - Rebase on latest igt. Simplify the condition for enabling media compression in the surface state. Cc: Mika Kahola <mika.kahola@intel.com> Cc: Brian Welty <brian.welty@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib/rendercopy_gen9.c')
-rw-r--r--lib/rendercopy_gen9.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
index bf9d2ee1..63b1023d 100644
--- a/lib/rendercopy_gen9.c
+++ b/lib/rendercopy_gen9.c
@@ -252,12 +252,14 @@ gen8_bind_buf(struct intel_batchbuffer *batch, const struct igt_buf *buf,
ss->ss2.width = igt_buf_width(buf) - 1;
ss->ss3.pitch = buf->stride - 1;
- ss->ss7.shader_chanel_select_r = 4;
- ss->ss7.shader_chanel_select_g = 5;
- ss->ss7.shader_chanel_select_b = 6;
- ss->ss7.shader_chanel_select_a = 7;
-
- if (buf->aux.stride) {
+ ss->ss7.skl.shader_chanel_select_r = 4;
+ ss->ss7.skl.shader_chanel_select_g = 5;
+ ss->ss7.skl.shader_chanel_select_b = 6;
+ ss->ss7.skl.shader_chanel_select_a = 7;
+
+ if (buf->compression == I915_COMPRESSION_MEDIA)
+ ss->ss7.tgl.media_compression = 1;
+ else if (buf->aux.stride) {
ss->ss6.aux_mode = 0x5; /* AUX_CCS_E */
ss->ss6.aux_pitch = (buf->aux.stride / 128) - 1;