mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 04:28:10 +02:00
radeonsi: set flags for FP16 in shaders
v2: remove the enablement code Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> (v1) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6622>
This commit is contained in:
parent
c5277f035e
commit
d3c63d6f60
2 changed files with 6 additions and 0 deletions
|
|
@ -929,6 +929,7 @@ void si_init_screen_get_functions(struct si_screen *sscreen)
|
|||
|
||||
const struct nir_shader_compiler_options nir_options = {
|
||||
.lower_scmp = true,
|
||||
.lower_flrp16 = true,
|
||||
.lower_flrp32 = true,
|
||||
.lower_flrp64 = true,
|
||||
.lower_fsat = true,
|
||||
|
|
@ -961,6 +962,8 @@ void si_init_screen_get_functions(struct si_screen *sscreen)
|
|||
.max_unroll_iterations = 32,
|
||||
.use_interpolated_input_intrinsics = true,
|
||||
.lower_uniforms_to_ubo = true,
|
||||
.support_16bit_alu = sscreen->info.has_packed_math_16bit,
|
||||
.vectorize_vec2_16bit = sscreen->info.has_packed_math_16bit,
|
||||
};
|
||||
sscreen->nir_options = nir_options;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -952,6 +952,9 @@ static struct pipe_screen *radeonsi_screen_create_impl(struct radeon_winsys *ws,
|
|||
sscreen->ws = ws;
|
||||
ws->query_info(ws, &sscreen->info);
|
||||
|
||||
/* Older LLVM have buggy v_pk_* instructions. */
|
||||
sscreen->info.has_packed_math_16bit &= LLVM_VERSION_MAJOR >= 11;
|
||||
|
||||
if (sscreen->info.chip_class == GFX10_3 && LLVM_VERSION_MAJOR < 11) {
|
||||
fprintf(stderr, "radeonsi: GFX 10.3 requires LLVM 11 or higher\n");
|
||||
FREE(sscreen);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue