mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 16:38:09 +02:00
dzn: Add a driconf entry for enabling 8bit loads and stores
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22225>
This commit is contained in:
parent
e28328ca2c
commit
89879d8fe2
3 changed files with 17 additions and 4 deletions
|
|
@ -387,6 +387,9 @@ dzn_physical_device_create(struct vk_instance *instance,
|
|||
}
|
||||
|
||||
dzn_physical_device_get_extensions(pdev);
|
||||
if (driQueryOptionb(&dzn_instance->dri_options, "dzn_enable_8bit_loads_stores") &&
|
||||
pdev->options4.Native16BitShaderOpsSupported)
|
||||
pdev->vk.supported_extensions.KHR_8bit_storage = true;
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
|
@ -1132,6 +1135,7 @@ dzn_enumerate_physical_devices(struct vk_instance *instance)
|
|||
static const driOptionDescription dzn_dri_options[] = {
|
||||
DRI_CONF_SECTION_DEBUG
|
||||
DRI_CONF_DZN_CLAIM_WIDE_LINES(false)
|
||||
DRI_CONF_DZN_ENABLE_8BIT_LOADS_STORES(false)
|
||||
DRI_CONF_SECTION_END
|
||||
};
|
||||
|
||||
|
|
@ -1383,17 +1387,19 @@ dzn_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
};
|
||||
|
||||
bool support_descriptor_indexing = pdev->shader_model >= D3D_SHADER_MODEL_6_6;
|
||||
bool support_8bit = driQueryOptionb(&instance->dri_options, "dzn_enable_8bit_loads_stores") &&
|
||||
pdev->options4.Native16BitShaderOpsSupported;
|
||||
const VkPhysicalDeviceVulkan12Features core_1_2 = {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES,
|
||||
.samplerMirrorClampToEdge = false,
|
||||
.drawIndirectCount = true,
|
||||
.storageBuffer8BitAccess = false,
|
||||
.uniformAndStorageBuffer8BitAccess = false,
|
||||
.storagePushConstant8 = false,
|
||||
.storageBuffer8BitAccess = support_8bit,
|
||||
.uniformAndStorageBuffer8BitAccess = support_8bit,
|
||||
.storagePushConstant8 = support_8bit,
|
||||
.shaderBufferInt64Atomics = false,
|
||||
.shaderSharedInt64Atomics = false,
|
||||
.shaderFloat16 = pdev->options4.Native16BitShaderOpsSupported,
|
||||
.shaderInt8 = false,
|
||||
.shaderInt8 = support_8bit,
|
||||
|
||||
.descriptorIndexing = support_descriptor_indexing,
|
||||
.shaderInputAttachmentArrayDynamicIndexing = true,
|
||||
|
|
|
|||
|
|
@ -1041,6 +1041,10 @@ TODO: document the other workarounds.
|
|||
</engine>
|
||||
</device>
|
||||
<device driver="dzn">
|
||||
<application name="DOOMEternal" executable="DOOMEternalx64vk.exe">
|
||||
<option name="dzn_enable_8bit_loads_stores" value="true" />
|
||||
<option name="dzn_claim_wide_lines" value="true" />
|
||||
</application>
|
||||
<application name="No Man's Sky" executable="NMS.exe">
|
||||
<option name="dzn_claim_wide_lines" value="true" />
|
||||
</application>
|
||||
|
|
|
|||
|
|
@ -661,4 +661,7 @@
|
|||
#define DRI_CONF_DZN_CLAIM_WIDE_LINES(def) \
|
||||
DRI_CONF_OPT_B(dzn_claim_wide_lines, def, "Claim wide line support")
|
||||
|
||||
#define DRI_CONF_DZN_ENABLE_8BIT_LOADS_STORES(def) \
|
||||
DRI_CONF_OPT_B(dzn_enable_8bit_loads_stores, def, "Enable VK_KHR_8bit_loads_stores")
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue