radv: move forcing VRS rates to the graphics pipeline key
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13099>
This commit is contained in:
parent
5bacc668fa
commit
0fa431087c
|
@ -231,12 +231,6 @@ 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->force_vrs == RADV_FORCE_VRS_2x2)
|
||||
hash_flags |= RADV_HASH_SHADER_FORCE_VRS_2x2;
|
||||
if (device->force_vrs == RADV_FORCE_VRS_2x1)
|
||||
hash_flags |= RADV_HASH_SHADER_FORCE_VRS_2x1;
|
||||
if (device->force_vrs == RADV_FORCE_VRS_1x2)
|
||||
hash_flags |= RADV_HASH_SHADER_FORCE_VRS_1x2;
|
||||
if (device->robust_buffer_access) /* forces per-attribute vertex descriptors */
|
||||
hash_flags |= RADV_HASH_SHADER_ROBUST_BUFFER_ACCESS;
|
||||
if (device->robust_buffer_access2) /* affects load/store vectorizer */
|
||||
|
@ -2728,6 +2722,8 @@ radv_generate_graphics_pipeline_key(const struct radv_pipeline *pipeline,
|
|||
if (pipeline->device->instance->enable_mrt_output_nan_fixup)
|
||||
key.ps.enable_mrt_output_nan_fixup = true;
|
||||
|
||||
key.ps.force_vrs = pipeline->device->force_vrs;
|
||||
|
||||
if (pipeline->device->instance->debug_flags & RADV_DEBUG_INVARIANT_GEOM)
|
||||
key.invariant_geom = true;
|
||||
|
||||
|
|
|
@ -1660,9 +1660,6 @@ struct radv_event {
|
|||
#define RADV_HASH_SHADER_GE_WAVE32 (1 << 3)
|
||||
#define RADV_HASH_SHADER_LLVM (1 << 4)
|
||||
#define RADV_HASH_SHADER_KEEP_STATISTICS (1 << 8)
|
||||
#define RADV_HASH_SHADER_FORCE_VRS_2x2 (1 << 9)
|
||||
#define RADV_HASH_SHADER_FORCE_VRS_2x1 (1 << 10)
|
||||
#define RADV_HASH_SHADER_FORCE_VRS_1x2 (1 << 11)
|
||||
#define RADV_HASH_SHADER_FORCE_NGG_CULLING (1 << 13)
|
||||
#define RADV_HASH_SHADER_ROBUST_BUFFER_ACCESS (1 << 14)
|
||||
#define RADV_HASH_SHADER_ROBUST_BUFFER_ACCESS2 (1 << 15)
|
||||
|
|
|
@ -1576,7 +1576,7 @@ shader_variant_compile(struct radv_device *device, struct vk_shader_module *modu
|
|||
options->debug.func = radv_compiler_debug;
|
||||
options->debug.private_data = &debug_data;
|
||||
|
||||
switch (device->force_vrs) {
|
||||
switch (options->key.ps.force_vrs) {
|
||||
case RADV_FORCE_VRS_2x2:
|
||||
options->force_vrs_rates = (1u << 2) | (1u << 4);
|
||||
break;
|
||||
|
|
|
@ -79,6 +79,7 @@ struct radv_pipeline_key {
|
|||
|
||||
bool lower_discard_to_demote;
|
||||
bool enable_mrt_output_nan_fixup;
|
||||
uint8_t force_vrs;
|
||||
} ps;
|
||||
|
||||
struct {
|
||||
|
|
Loading…
Reference in New Issue