intel: Use GEN_VERSIONx10 in more places

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9329>
This commit is contained in:
Jordan Justen 2021-02-27 14:03:47 -08:00
parent adc575dbf6
commit 36dd7c44f6
6 changed files with 17 additions and 18 deletions

View File

@ -122,7 +122,7 @@ include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
#
# libiris for gen12hp
# libiris for gen125
#
include $(CLEAR_VARS)

View File

@ -4592,7 +4592,7 @@ iris_store_cs_state(const struct gen_device_info *devinfo,
void *map = shader->derived_data;
iris_pack_state(GENX(INTERFACE_DESCRIPTOR_DATA), map, desc) {
#if GEN_GEN <= 12 && !GEN_IS_GEN12HP
#if GEN_VERSIONx10 < 125
desc.ConstantURBEntryReadLength = cs_prog_data->push.per_thread.regs;
desc.CrossThreadConstantDataReadLength =
cs_prog_data->push.cross_thread.regs;
@ -5295,7 +5295,7 @@ iris_restore_compute_saved_bos(struct iris_context *ice,
struct iris_bo *bo = iris_resource_bo(shader->assembly.res);
iris_use_pinned_bo(batch, bo, false, IRIS_DOMAIN_NONE);
if (GEN_GEN <= 12 && !GEN_IS_GEN12HP) {
if (GEN_VERSIONx10 < 125) {
struct iris_bo *curbe_bo =
iris_resource_bo(ice->state.last_res.cs_thread_ids);
iris_use_pinned_bo(batch, curbe_bo, false, IRIS_DOMAIN_NONE);
@ -6799,7 +6799,7 @@ iris_load_indirect_location(struct iris_context *ice,
}
}
#if GEN_GEN > 12 || GEN_IS_GEN12HP
#if GEN_VERSIONx10 >= 125
static void
iris_upload_compute_walker(struct iris_context *ice,
@ -6861,7 +6861,7 @@ iris_upload_compute_walker(struct iris_context *ice,
}
#else /* #if GEN_GEN > 12 || GEN_IS_GEN12HP */
#else /* #if GEN_VERSIONx10 >= 125 */
static void
iris_upload_gpgpu_walker(struct iris_context *ice,
@ -7010,7 +7010,7 @@ iris_upload_gpgpu_walker(struct iris_context *ice,
iris_emit_cmd(batch, GENX(MEDIA_STATE_FLUSH), msf);
}
#endif /* #if GEN_GEN > 12 || GEN_IS_GEN12HP */
#endif /* #if GEN_VERSIONx10 >= 125 */
static void
iris_upload_compute_state(struct iris_context *ice,
@ -7055,7 +7055,7 @@ iris_upload_compute_state(struct iris_context *ice,
genX(invalidate_aux_map_state)(batch);
#endif
#if GEN_GEN > 12 || GEN_IS_GEN12HP
#if GEN_VERSIONx10 >= 125
iris_upload_compute_walker(ice, batch, grid);
#else
iris_upload_gpgpu_walker(ice, batch, grid);

View File

@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<genxml name="GEN12HP" gen="12.5">
<genxml name="GEN125" gen="12.5">
<enum name="3D_Color_Buffer_Blend_Factor" prefix="BLENDFACTOR">
<value name="ONE" value="1"/>

View File

@ -59,7 +59,6 @@
#define GEN_GEN ((GEN_VERSIONx10) / 10)
#define GEN_IS_HASWELL ((GEN_VERSIONx10) == 75)
#define GEN_IS_G4X ((GEN_VERSIONx10) == 45)
#define GEN_IS_GEN12HP ((GEN_VERSIONx10) == 125)
/* Prefixing macros */
#if (GEN_VERSIONx10 == 40)

View File

@ -4477,7 +4477,7 @@ genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer *cmd_buffer)
&pipeline->cs, 1);
cmd_buffer->state.descriptors_dirty &= ~VK_SHADER_STAGE_COMPUTE_BIT;
#if GEN_GEN <= 12 && !GEN_IS_GEN12HP
#if GEN_VERSIONx10 < 125
uint32_t iface_desc_data_dw[GENX(INTERFACE_DESCRIPTOR_DATA_length)];
struct GENX(INTERFACE_DESCRIPTOR_DATA) desc = {
.BindingTablePointer =
@ -4506,7 +4506,7 @@ genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer *cmd_buffer)
comp_state->push_data =
anv_cmd_buffer_cs_push_constants(cmd_buffer);
#if GEN_GEN <= 12 && !GEN_IS_GEN12HP
#if GEN_VERSIONx10 < 125
if (comp_state->push_data.alloc_size) {
anv_batch_emit(&cmd_buffer->batch, GENX(MEDIA_CURBE_LOAD), curbe) {
curbe.CURBETotalDataLength = comp_state->push_data.alloc_size;
@ -4573,7 +4573,7 @@ void genX(CmdDispatch)(
genX(CmdDispatchBase)(commandBuffer, 0, 0, 0, x, y, z);
}
#if GEN_GEN > 12 || GEN_IS_GEN12HP
#if GEN_VERSIONx10 >= 125
static inline void
emit_compute_walker(struct anv_cmd_buffer *cmd_buffer,
@ -4615,7 +4615,7 @@ emit_compute_walker(struct anv_cmd_buffer *cmd_buffer,
}
}
#else /* #if GEN_GEN > 12 || GEN_IS_GEN12HP */
#else /* #if GEN_VERSIONx10 >= 125 */
static inline void
emit_gpgpu_walker(struct anv_cmd_buffer *cmd_buffer,
@ -4645,7 +4645,7 @@ emit_gpgpu_walker(struct anv_cmd_buffer *cmd_buffer,
anv_batch_emit(&cmd_buffer->batch, GENX(MEDIA_STATE_FLUSH), msf);
}
#endif /* #if GEN_GEN > 12 || GEN_IS_GEN12HP */
#endif /* #if GEN_VERSIONx10 >= 125 */
static inline void
emit_cs_walker(struct anv_cmd_buffer *cmd_buffer,
@ -4654,7 +4654,7 @@ emit_cs_walker(struct anv_cmd_buffer *cmd_buffer,
uint32_t groupCountX, uint32_t groupCountY,
uint32_t groupCountZ)
{
#if GEN_GEN > 12 || GEN_IS_GEN12HP
#if GEN_VERSIONx10 >= 125
emit_compute_walker(cmd_buffer, pipeline, indirect, prog_data, groupCountX,
groupCountY, groupCountZ);
#else

View File

@ -2347,7 +2347,7 @@ genX(graphics_pipeline_create)(
return pipeline->base.batch.status;
}
#if GEN_GEN > 12 || GEN_IS_GEN12HP
#if GEN_VERSIONx10 >= 125
static void
emit_compute_state(struct anv_compute_pipeline *pipeline,
@ -2372,7 +2372,7 @@ emit_compute_state(struct anv_compute_pipeline *pipeline,
}
}
#else /* #if GEN_GEN > 12 || GEN_IS_GEN12HP */
#else /* #if GEN_VERSIONx10 >= 125 */
static void
emit_compute_state(struct anv_compute_pipeline *pipeline,
@ -2481,7 +2481,7 @@ emit_compute_state(struct anv_compute_pipeline *pipeline,
&desc);
}
#endif /* #if GEN_GEN > 12 || GEN_IS_GEN12HP */
#endif /* #if GEN_VERSIONx10 >= 125 */
static VkResult
compute_pipeline_create(