summaryrefslogtreecommitdiff
path: root/tests/i915/gem_render_linear_blits.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2019-12-29 20:25:43 +0200
committerImre Deak <imre.deak@intel.com>2019-12-31 14:44:07 +0200
commit7ff35cc1d0b3896b72ac6b1b223d84383549f7b9 (patch)
treed1d9d290ce7f32eb228a71cbcead4f07434d3f9c /tests/i915/gem_render_linear_blits.c
parent86d7c631bcc7b0f4e4683cb753ad2eafc170a7da (diff)
lib/igt_buf: Extend igt_buf to include two color surfaces
UV FBs have two color surfaces so extend the igt_buf struct accordingly to support blitting such FBs. The patch is produced with the coccinelle patch below. No functional changes. @@ @@ struct igt_buf { ... - uint32_t stride; ... - uint32_t size; + struct { + uint32_t stride; + uint32_t size; + } surface[2]; ... }; @@ struct igt_buf b; @@ <... ( - b.stride + b.surface[0].stride | - b.size + b.surface[0].size ) ...> @@ struct igt_buf *b; @@ <... ( - b->size + b->surface[0].size | - b->stride + b->surface[0].stride ) ...> @@ identifier I; expression E1; expression E2; @@ ( struct igt_buf I = { - .size = E1, - .stride = E2, + .surface[0] = { + .size = E1, + .stride = E2, + }, }; | struct igt_buf I = { - .size = E1, + .surface[0] = { + .size = E1, + }, }; | struct igt_buf I = { - .stride = E1, + .surface[0] = { + .stride = E1, + }, }; ) v2: - Rebase on latest upstream. (Mika) Cc: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'tests/i915/gem_render_linear_blits.c')
-rw-r--r--tests/i915/gem_render_linear_blits.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/i915/gem_render_linear_blits.c b/tests/i915/gem_render_linear_blits.c
index a726652b..666a43cd 100644
--- a/tests/i915/gem_render_linear_blits.c
+++ b/tests/i915/gem_render_linear_blits.c
@@ -108,15 +108,15 @@ static void run_test (int fd, int count)
struct igt_buf src = {}, dst = {};
src.bo = bo[i % count];
- src.stride = STRIDE;
+ src.surface[0].stride = STRIDE;
src.tiling = I915_TILING_NONE;
- src.size = SIZE;
+ src.surface[0].size = SIZE;
src.bpp = 32;
dst.bo = bo[(i + 1) % count];
- dst.stride = STRIDE;
+ dst.surface[0].stride = STRIDE;
dst.tiling = I915_TILING_NONE;
- dst.size = SIZE;
+ dst.surface[0].size = SIZE;
dst.bpp = 32;
render_copy(batch, NULL, &src, 0, 0, WIDTH, HEIGHT, &dst, 0, 0);
@@ -133,15 +133,15 @@ static void run_test (int fd, int count)
struct igt_buf src = {}, dst = {};
src.bo = bo[(i + 1) % count];
- src.stride = STRIDE;
+ src.surface[0].stride = STRIDE;
src.tiling = I915_TILING_NONE;
- src.size = SIZE;
+ src.surface[0].size = SIZE;
src.bpp = 32;
dst.bo = bo[i % count];
- dst.stride = STRIDE;
+ dst.surface[0].stride = STRIDE;
dst.tiling = I915_TILING_NONE;
- dst.size = SIZE;
+ dst.surface[0].size = SIZE;
dst.bpp = 32;
render_copy(batch, NULL, &src, 0, 0, WIDTH, HEIGHT, &dst, 0, 0);
@@ -160,15 +160,15 @@ static void run_test (int fd, int count)
continue;
src.bo = bo[s];
- src.stride = STRIDE;
+ src.surface[0].stride = STRIDE;
src.tiling = I915_TILING_NONE;
- src.size = SIZE;
+ src.surface[0].size = SIZE;
src.bpp = 32;
dst.bo = bo[d];
- dst.stride = STRIDE;
+ dst.surface[0].stride = STRIDE;
dst.tiling = I915_TILING_NONE;
- dst.size = SIZE;
+ dst.surface[0].size = SIZE;
dst.bpp = 32;
render_copy(batch, NULL, &src, 0, 0, WIDTH, HEIGHT, &dst, 0, 0);