aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-09-18 09:01:38 +0200
committerSamuel Pitoiset <[email protected]>2019-10-02 18:06:01 +0200
commit683c5e27c7304e6636579e1ff18331935268e9fb (patch)
treed90a46023c24e3cfa6eaf080166a08b9f47a9137 /src
parent2236cf24a74a40fd0a423c08ad778ea853bb1c1c (diff)
radv/gfx10: add radv_device::use_ngg
Trivial. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_device.c4
-rw-r--r--src/amd/vulkan/radv_pipeline.c4
-rw-r--r--src/amd/vulkan/radv_private.h3
3 files changed, 8 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 1da49cb6093..d3c412558ba 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -372,6 +372,10 @@ radv_physical_device_init(struct radv_physical_device *device,
device->use_shader_ballot = device->rad_info.chip_class >= GFX8 &&
(device->use_aco || device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT);
+ device->use_ngg = device->rad_info.chip_class >= GFX10 &&
+ device->rad_info.family != CHIP_NAVI14 &&
+ !(device->instance->debug_flags & RADV_DEBUG_NO_NGG);
+
device->use_ngg_streamout = false;
/* Determine the number of threads per wave for all stages. */
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index ddf94625972..1be8d406a43 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2309,9 +2309,7 @@ radv_fill_shader_keys(struct radv_device *device,
keys[MESA_SHADER_VERTEX].vs_common_out.as_es = true;
}
- if (device->physical_device->rad_info.chip_class >= GFX10 &&
- device->physical_device->rad_info.family != CHIP_NAVI14 &&
- !(device->instance->debug_flags & RADV_DEBUG_NO_NGG)) {
+ if (device->physical_device->use_ngg) {
if (nir[MESA_SHADER_TESS_CTRL]) {
keys[MESA_SHADER_TESS_EVAL].vs_common_out.as_ngg = true;
} else {
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 0a3e7ca9d88..f4c32659d79 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -288,6 +288,9 @@ struct radv_physical_device {
/* Whether to enable the AMD_shader_ballot extension */
bool use_shader_ballot;
+ /* Whether to enable NGG. */
+ bool use_ngg;
+
/* Whether to enable NGG streamout. */
bool use_ngg_streamout;