lib: Remove duplications in gpu_fill library
After moving all functions needed for gpgpu and media fill testing
there is a lot of duplications which can be removed:
Library media_fill_gen8 and media_fill_gen8lp for CHT was removed,
media state flush for !CHT was added to gen7_emit_media_objects.
Many gen8 functions were replaced with gen7 version with devid
parameter (gen7_fill_curbe_load, gen7_emit_interface_descriptor,
gen7_fill_binding_table, gen7_emit_media_objects). Unified fill kernel
function so it is applicable to all gens and both media and gpgpu
(merged gen7_fill_media_kernel and gen8_fill_media_kernel).
Duplicated constants like GEN8_MEDIA_VFE_STATE, GEN8_MEDIA_CURBE_LOAD,
GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD, GEN8_MEDIA_OBJECT were
replaced by GEN7 version. However this constants were not removed
from gen8_media.h library, because they are used by other tests
for Gen8+. More refactoring in this gen*_media.h libraries is needed.
It seems that further unification of *_fillfunc functions will
introduce more confusion in understanding what the tests are doing
and what were changes between Gens.
v2: Moved some reduntant changes from Move gpgpu/media fill to gpu_fill...
to this patch. Applied comments from review.
v3: rebase
Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
diff --git a/lib/media_fill_gen8.c b/lib/media_fill_gen8.c
index 4270997..362abd6 100644
--- a/lib/media_fill_gen8.c
+++ b/lib/media_fill_gen8.c
@@ -62,7 +62,7 @@
/* setup states */
batch->ptr = &batch->buffer[BATCH_STATE_SPLIT];
- curbe_buffer = gen8_fill_curbe_buffer_data(batch, color);
+ curbe_buffer = gen7_fill_curbe_buffer_data(batch, color);
interface_descriptor = gen8_fill_interface_descriptor(batch, dst, media_kernel, sizeof(media_kernel));
igt_assert(batch->ptr < &batch->buffer[4095]);
@@ -73,17 +73,17 @@
gen8_emit_vfe_state(batch);
- gen8_emit_curbe_load(batch, curbe_buffer);
+ gen7_emit_curbe_load(batch, curbe_buffer);
- gen8_emit_interface_descriptor_load(batch, interface_descriptor);
+ gen7_emit_interface_descriptor_load(batch, interface_descriptor);
- gen8_emit_media_objects(batch, x, y, width, height);
+ gen7_emit_media_objects(batch, x, y, width, height);
OUT_BATCH(MI_BATCH_BUFFER_END);
batch_end = batch_align(batch, 8);
igt_assert(batch_end < BATCH_STATE_SPLIT);
- gen8_render_flush(batch, batch_end);
+ gen7_render_flush(batch, batch_end);
intel_batchbuffer_reset(batch);
}