mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-17 23:40:29 +01:00
nvk: Advertise Vulkan 1.1 on Turing+
We actually trigger on whether or not NAK is used for everything. If so, we claim 1.1, otherwise claim 1.0. We need NAK for subgroup ops and other advanced shader features in later Vulkan versions. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26383>
This commit is contained in:
parent
93acce99f3
commit
a0355dfcfb
3 changed files with 33 additions and 6 deletions
|
|
@ -126,7 +126,7 @@ nouveau_icd = custom_target(
|
|||
output : 'nouveau_icd.@0@.json'.format(host_machine.cpu()),
|
||||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.0', '--xml', '@INPUT1@',
|
||||
'--api-version', '1.1', '--xml', '@INPUT1@',
|
||||
'--lib-path', join_paths(icd_lib_path, icd_file_name),
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
@ -144,7 +144,7 @@ if meson.version().version_compare('>= 0.58')
|
|||
output : _dev_icdname,
|
||||
command : [
|
||||
prog_python, '@INPUT0@',
|
||||
'--api-version', '1.0', '--xml', '@INPUT1@',
|
||||
'--api-version', '1.1', '--xml', '@INPUT1@',
|
||||
'--lib-path', meson.current_build_dir() / icd_file_name,
|
||||
'--out', '@OUTPUT@',
|
||||
],
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ nvk_EnumerateInstanceVersion(uint32_t *pApiVersion)
|
|||
{
|
||||
uint32_t version_override = vk_get_version_override();
|
||||
*pApiVersion = version_override ? version_override :
|
||||
VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION);
|
||||
VK_MAKE_VERSION(1, 1, VK_HEADER_VERSION);
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,35 @@
|
|||
#include "clc5c0.h"
|
||||
#include "clc997.h"
|
||||
|
||||
static bool
|
||||
nvk_use_nak(const struct nv_device_info *info)
|
||||
{
|
||||
const VkShaderStageFlags vk10_stages =
|
||||
VK_SHADER_STAGE_VERTEX_BIT |
|
||||
VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT |
|
||||
VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT |
|
||||
VK_SHADER_STAGE_GEOMETRY_BIT |
|
||||
VK_SHADER_STAGE_FRAGMENT_BIT |
|
||||
VK_SHADER_STAGE_COMPUTE_BIT;
|
||||
|
||||
return !(vk10_stages & ~nvk_nak_stages(info));
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
nvk_get_vk_version(const struct nv_device_info *info)
|
||||
{
|
||||
/* Version override takes priority */
|
||||
const uint32_t version_override = vk_get_version_override();
|
||||
if (version_override)
|
||||
return version_override;
|
||||
|
||||
/* If we're using codegen for anything, lock to version 1.0 */
|
||||
if (!nvk_use_nak(info))
|
||||
return VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION);
|
||||
|
||||
return VK_MAKE_VERSION(1, 1, VK_HEADER_VERSION);
|
||||
}
|
||||
|
||||
static void
|
||||
nvk_get_device_extensions(const struct nv_device_info *info,
|
||||
struct vk_device_extension_table *ext)
|
||||
|
|
@ -421,15 +450,13 @@ nvk_get_device_properties(const struct nvk_instance *instance,
|
|||
const struct nv_device_info *info,
|
||||
struct vk_properties *properties)
|
||||
{
|
||||
uint32_t version_override = vk_get_version_override();
|
||||
const VkSampleCountFlagBits sample_counts = VK_SAMPLE_COUNT_1_BIT |
|
||||
VK_SAMPLE_COUNT_2_BIT |
|
||||
VK_SAMPLE_COUNT_4_BIT |
|
||||
VK_SAMPLE_COUNT_8_BIT;
|
||||
|
||||
*properties = (struct vk_properties) {
|
||||
.apiVersion = version_override ? version_override :
|
||||
VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION),
|
||||
.apiVersion = nvk_get_vk_version(info),
|
||||
.driverVersion = vk_get_driver_version(),
|
||||
.vendorID = NVIDIA_VENDOR_ID,
|
||||
.deviceID = info->device_id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue