mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 15:20:17 +01:00
radv: track if primitives generated query features are enabled
This will be used to conditionally declare the NGG query argument for NGG VS/TES and also adjust the NGG shaders. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
This commit is contained in:
parent
3efbbf9588
commit
dc8cf44f60
2 changed files with 14 additions and 0 deletions
|
|
@ -3146,6 +3146,7 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
|||
bool vs_prologs = false;
|
||||
bool global_bo_list = false;
|
||||
bool image_2d_view_of_3d = false;
|
||||
bool primitives_generated_query = false;
|
||||
|
||||
/* Check enabled features */
|
||||
if (pCreateInfo->pEnabledFeatures) {
|
||||
|
|
@ -3218,6 +3219,14 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
|||
image_2d_view_of_3d = true;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVES_GENERATED_QUERY_FEATURES_EXT: {
|
||||
const VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT *features = (const void *)ext;
|
||||
if (features->primitivesGeneratedQuery ||
|
||||
features->primitivesGeneratedQueryWithRasterizerDiscard ||
|
||||
features->primitivesGeneratedQueryWithNonZeroStreams)
|
||||
primitives_generated_query = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -3282,6 +3291,8 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
|
|||
|
||||
device->image_2d_view_of_3d = image_2d_view_of_3d;
|
||||
|
||||
device->primitives_generated_query = primitives_generated_query;
|
||||
|
||||
radv_init_shader_arenas(device);
|
||||
|
||||
device->overallocation_disallowed = overallocation_disallowed;
|
||||
|
|
|
|||
|
|
@ -854,6 +854,9 @@ struct radv_device {
|
|||
/* Whether 2D views of 3D image is enabled. */
|
||||
bool image_2d_view_of_3d;
|
||||
|
||||
/* Whether primitives generated query features are enabled. */
|
||||
bool primitives_generated_query;
|
||||
|
||||
/* Whether anisotropy is forced with RADV_TEX_ANISO (-1 is disabled). */
|
||||
int force_aniso;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue