summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_shader.c
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2020-04-06 11:22:55 +0100
committerRhys Perry <[email protected]>2020-04-24 20:04:39 +0100
commit5c5c2dd48fe0910dc79d3187bed99a52b5ed2848 (patch)
tree65b57453f231e15f9d5c15c09eee8f34e8ce395a /src/amd/vulkan/radv_shader.c
parenteeccb1a941e258190b5ba7a425f65599873f92ed (diff)
radv/aco: enable 8/16-bit storage and int8/int16 on GFX8+
With this, Doom Eternal should now run with ACO on GFX8+. The generated 8/16-bit storage code is okay but the generated int8/int16 code is currently pretty bad but it works and apparently Doom Eternal doesn't actually use it (even though it requires it). Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4707>
Diffstat (limited to 'src/amd/vulkan/radv_shader.c')
-rw-r--r--src/amd/vulkan/radv_shader.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 42a664f7f36..36a7b5f5511 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -346,6 +346,8 @@ radv_shader_compile_to_nir(struct radv_device *device,
}
}
}
+ bool int8_int16_enable = !device->physical_device->use_aco ||
+ device->physical_device->rad_info.chip_class >= GFX8;
const struct spirv_to_nir_options spirv_options = {
.lower_ubo_ssbo_access_to_offsets = true,
.caps = {
@@ -369,8 +371,8 @@ radv_shader_compile_to_nir(struct radv_device *device,
.image_ms_array = true,
.image_read_without_format = true,
.image_write_without_format = true,
- .int8 = !device->physical_device->use_aco,
- .int16 = !device->physical_device->use_aco,
+ .int8 = int8_int16_enable,
+ .int16 = int8_int16_enable,
.int64 = true,
.int64_atomics = true,
.multiview = true,
@@ -380,8 +382,8 @@ radv_shader_compile_to_nir(struct radv_device *device,
.shader_clock = true,
.shader_viewport_index_layer = true,
.stencil_export = true,
- .storage_8bit = !device->physical_device->use_aco,
- .storage_16bit = !device->physical_device->use_aco,
+ .storage_8bit = int8_int16_enable,
+ .storage_16bit = int8_int16_enable,
.storage_image_ms = true,
.subgroup_arithmetic = true,
.subgroup_ballot = true,