intel: move away from booleans to identify platforms
v2: Drop changes around GFX_VERx10 == 75 (Luis)
v3: Replace
(GFX_VERx10 < 75 && devinfo->platform != INTEL_PLATFORM_BYT)
by
(devinfo->platform == INTEL_PLATFORM_IVB)
Replace
(devinfo->ver >= 5 || devinfo->platform == INTEL_PLATFORM_G4X)
by
(devinfo->verx10 >= 45)
Replace
(devinfo->platform != INTEL_PLATFORM_G4X)
by
(devinfo->verx10 != 45)
v4: Fix crocus typo
v5: Rebase
v6: Add GFX3, ILK & I965 platforms (Jordan)
Move ifdef to code expressions (Jordan)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12981>
This commit is contained in:
committed by
Marge Bot
parent
3b1a5b8f2b
commit
361b3fee3c
@@ -130,7 +130,7 @@ generate_tex(struct brw_codegen *p,
|
||||
case SHADER_OPCODE_TXD:
|
||||
if (inst->shadow_compare) {
|
||||
/* Gfx7.5+. Otherwise, lowered by brw_lower_texture_gradients(). */
|
||||
assert(devinfo->is_haswell);
|
||||
assert(devinfo->verx10 == 75);
|
||||
msg_type = HSW_SAMPLER_MESSAGE_SAMPLE_DERIV_COMPARE;
|
||||
} else {
|
||||
msg_type = GFX5_SAMPLER_MESSAGE_SAMPLE_DERIVS;
|
||||
@@ -738,7 +738,8 @@ static void
|
||||
generate_tcs_get_instance_id(struct brw_codegen *p, struct brw_reg dst)
|
||||
{
|
||||
const struct intel_device_info *devinfo = p->devinfo;
|
||||
const bool ivb = devinfo->is_ivybridge || devinfo->is_baytrail;
|
||||
const bool ivb = devinfo->platform == INTEL_PLATFORM_IVB ||
|
||||
devinfo->platform == INTEL_PLATFORM_BYT;
|
||||
|
||||
/* "Instance Count" comes as part of the payload in r0.2 bits 23:17.
|
||||
*
|
||||
@@ -1058,7 +1059,8 @@ generate_tcs_create_barrier_header(struct brw_codegen *p,
|
||||
struct brw_reg dst)
|
||||
{
|
||||
const struct intel_device_info *devinfo = p->devinfo;
|
||||
const bool ivb = devinfo->is_ivybridge || devinfo->is_baytrail;
|
||||
const bool ivb = devinfo->platform == INTEL_PLATFORM_IVB ||
|
||||
devinfo->platform == INTEL_PLATFORM_BYT;
|
||||
struct brw_reg m0_2 = get_element_ud(dst, 2);
|
||||
unsigned instances = ((struct brw_tcs_prog_data *) prog_data)->instances;
|
||||
|
||||
@@ -1158,7 +1160,7 @@ generate_scratch_read(struct brw_codegen *p,
|
||||
|
||||
if (devinfo->ver >= 6)
|
||||
msg_type = GFX6_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ;
|
||||
else if (devinfo->ver == 5 || devinfo->is_g4x)
|
||||
else if (devinfo->verx10 >= 45)
|
||||
msg_type = G45_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ;
|
||||
else
|
||||
msg_type = BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ;
|
||||
@@ -1301,7 +1303,7 @@ generate_pull_constant_load(struct brw_codegen *p,
|
||||
|
||||
if (devinfo->ver >= 6)
|
||||
msg_type = GFX6_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ;
|
||||
else if (devinfo->ver == 5 || devinfo->is_g4x)
|
||||
else if (devinfo->verx10 >= 45)
|
||||
msg_type = G45_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ;
|
||||
else
|
||||
msg_type = BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ;
|
||||
@@ -2188,7 +2190,7 @@ generate_code(struct brw_codegen *p,
|
||||
break;
|
||||
|
||||
case BRW_OPCODE_DIM:
|
||||
assert(devinfo->is_haswell);
|
||||
assert(devinfo->verx10 == 75);
|
||||
assert(src[0].type == BRW_REGISTER_TYPE_DF);
|
||||
assert(dst.type == BRW_REGISTER_TYPE_DF);
|
||||
brw_DIM(p, dst, retype(src[0], BRW_REGISTER_TYPE_F));
|
||||
|
||||
Reference in New Issue
Block a user