llvm_optional_modules += ['lto']
endif
-if with_intel_clc or with_amd_vk or with_gallium_radeonsi
+if with_amd_vk or with_gallium_radeonsi
+ _llvm_version = '>= 14.0.0'
+elif with_intel_clc
_llvm_version = '>= 13.0.0'
elif with_gallium_opencl
_llvm_version = '>= 11.0.0'
size = l / 4;
}
-#if LLVM_VERSION_MAJOR <= 14
+#if LLVM_VERSION_MAJOR == 14
/* See: https://github.com/GPUOpen-Tools/radeon_gpu_profiler/issues/65 and
* https://github.com/llvm/llvm-project/issues/38652
*/
*/
index = LLVMConstInt(ctx->ac.i32, nir_intrinsic_io_semantics(instr).high_16bits, 0);
-#if LLVM_VERSION_MAJOR <= 14
+#if LLVM_VERSION_MAJOR == 14
/* To work around old LLVM bug which won't change the output type to
* LLVMBuildLoad2 type argument.
*/
for (int chan = 0; chan < instr->num_components; chan++) {
index = LLVMConstInt(ctx->ac.i32, chan, 0);
- #if LLVM_VERSION_MAJOR < 14
- ptr = LLVMBuildBitCast(
- ctx->ac.builder, ptr,
- LLVMPointerType(elem_type, LLVMGetPointerAddressSpace(LLVMTypeOf(ptr))), "");
- #endif
derived_ptr = LLVMBuildGEP2(ctx->ac.builder, elem_type, ptr, &index, 1, "");
values[chan] = LLVMBuildLoad2(ctx->ac.builder, elem_type, derived_ptr, "");
}
}
data = ac_llvm_extract_elem(&ctx->ac, src, chan);
index = LLVMConstInt(ctx->ac.i32, chan, 0);
- #if LLVM_VERSION_MAJOR < 14
- ptr = LLVMBuildBitCast(
- ctx->ac.builder, ptr,
- LLVMPointerType(elem_type, LLVMGetPointerAddressSpace(LLVMTypeOf(ptr))), "");
- #endif
derived_ptr = LLVMBuildGEP2(builder, elem_type, ptr, &index, 1, "");
LLVMBuildStore(builder, data, derived_ptr);
}
.EXT_scalar_block_layout = device->rad_info.gfx_level >= GFX7,
.EXT_separate_stencil_usage = true,
.EXT_shader_atomic_float = true,
-#ifdef LLVM_AVAILABLE
- .EXT_shader_atomic_float2 = !device->use_llvm || LLVM_VERSION_MAJOR >= 14,
-#else
.EXT_shader_atomic_float2 = true,
-#endif
.EXT_shader_demote_to_helper_invocation = true,
.EXT_shader_image_atomic_int64 = true,
.EXT_shader_module_identifier = true,
bool
radv_enable_rt(const struct radv_physical_device *pdevice, bool rt_pipelines)
{
-#ifdef LLVM_AVAILABLE
- if (pdevice->use_llvm && LLVM_VERSION_MAJOR < 14)
- return false;
-#endif
-
if (pdevice->rad_info.gfx_level < GFX10_3 && !radv_emulate_rt(pdevice))
return false;
#define SI_PROFILE_WAVE32 (1 << 0)
#define SI_PROFILE_WAVE64 (1 << 1)
-#define SI_PROFILE_IGNORE_LLVM13_DISCARD_BUG (1 << 2)
+/* bit gap */
#define SI_PROFILE_VS_NO_BINNING (1 << 3)
#define SI_PROFILE_PS_NO_BINNING (1 << 4)
#define SI_PROFILE_CLAMP_DIV_BY_ZERO (1 << 5)
SI_PROFILE_VS_NO_BINNING,
},
{
- /* Viewperf/Energy isn't affected by the discard bug. */
- {0x17118671, 0xd0102e0c, 0x947f3592, 0xb2057e7b, 0x4da5d9b0},
- SI_PROFILE_IGNORE_LLVM13_DISCARD_BUG,
- },
- {
/* Viewperf/Medical */
{0x4dce4331, 0x38f778d5, 0x1b75a717, 0x3e454fb9, 0xeb1527f0},
SI_PROFILE_PS_NO_BINNING,
return profile_wave_size;
}
- /* LLVM 13 has a bug that causes compile failures with discard in Wave32
- * in some cases. Alpha test in Wave32 is luckily unaffected.
- */
- if (stage == MESA_SHADER_FRAGMENT && info->base.fs.uses_discard &&
- !(info && info->options & SI_PROFILE_IGNORE_LLVM13_DISCARD_BUG) &&
- LLVM_VERSION_MAJOR == 13 && !(sscreen->debug_flags & DBG(W32_PS_DISCARD)))
- return 64;
-
/* Debug flags except w32psdiscard don't override the discard bug workaround,
* but they override everything else.
*/