radv: Refactor buffer robustness to an enum

Will be taken advantage of with pipeline robustness.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23912>
This commit is contained in:
Joshua Ashton
2023-06-28 17:34:58 +01:00
parent 59aa49494c
commit f52ebc8b40
5 changed files with 18 additions and 14 deletions

View File

@@ -203,9 +203,9 @@ radv_get_hash_flags(const struct radv_device *device, bool stats)
hash_flags |= RADV_HASH_SHADER_LLVM;
if (stats)
hash_flags |= RADV_HASH_SHADER_KEEP_STATISTICS;
if (device->robust_buffer_access) /* forces per-attribute vertex descriptors */
if (device->buffer_robustness >= RADV_BUFFER_ROBUSTNESS_1) /* forces per-attribute vertex descriptors */
hash_flags |= RADV_HASH_SHADER_ROBUST_BUFFER_ACCESS;
if (device->robust_buffer_access2) /* affects load/store vectorizer */
if (device->buffer_robustness >= RADV_BUFFER_ROBUSTNESS_2) /* affects load/store vectorizer */
hash_flags |= RADV_HASH_SHADER_ROBUST_BUFFER_ACCESS2;
if (device->instance->debug_flags & RADV_DEBUG_SPLIT_FMA)
hash_flags |= RADV_HASH_SHADER_SPLIT_FMA;
@@ -509,7 +509,7 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_pipeline_layo
.has_shared2_amd = gfx_level >= GFX7,
};
if (device->robust_buffer_access2) {
if (device->buffer_robustness >= RADV_BUFFER_ROBUSTNESS_2) {
vectorize_opts.robust_modes = nir_var_mem_ubo | nir_var_mem_ssbo;
}