vkd3d: Pass int64 capability info to vkd3d-shader.

This commit is contained in:
Conor McCarthy 2023-12-06 00:24:15 +10:00 committed by Alexandre Julliard
parent f96a791807
commit cc43ef3bca
Notes: Alexandre Julliard 2024-01-02 23:08:54 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/490
2 changed files with 13 additions and 2 deletions

View File

@ -2129,6 +2129,16 @@ static inline unsigned int typed_uav_compile_option(const struct d3d12_device *d
: VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_R32; : VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV_READ_FORMAT_R32;
} }
static unsigned int feature_flags_compile_option(const struct d3d12_device *device)
{
unsigned int flags = 0;
if (device->feature_options1.Int64ShaderOps)
flags |= VKD3D_SHADER_COMPILE_OPTION_FEATURE_INT64;
return flags;
}
static HRESULT create_shader_stage(struct d3d12_device *device, static HRESULT create_shader_stage(struct d3d12_device *device,
struct VkPipelineShaderStageCreateInfo *stage_desc, enum VkShaderStageFlagBits stage, struct VkPipelineShaderStageCreateInfo *stage_desc, enum VkShaderStageFlagBits stage,
const D3D12_SHADER_BYTECODE *code, const struct vkd3d_shader_interface_info *shader_interface) const D3D12_SHADER_BYTECODE *code, const struct vkd3d_shader_interface_info *shader_interface)
@ -2145,6 +2155,7 @@ static HRESULT create_shader_stage(struct d3d12_device *device,
{VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_10}, {VKD3D_SHADER_COMPILE_OPTION_API_VERSION, VKD3D_SHADER_API_VERSION_1_10},
{VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)}, {VKD3D_SHADER_COMPILE_OPTION_TYPED_UAV, typed_uav_compile_option(device)},
{VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE, 0}, {VKD3D_SHADER_COMPILE_OPTION_WRITE_TESS_GEOM_POINT_SIZE, 0},
{VKD3D_SHADER_COMPILE_OPTION_FEATURE, feature_flags_compile_option(device)},
}; };
stage_desc->sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; stage_desc->sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;

View File

@ -243,5 +243,5 @@ float4 main() : sv_target
[test] [test]
uniform 0 uint64_t2 0x300000000 0x500000000 uniform 0 uint64_t2 0x300000000 0x500000000
todo draw quad draw quad
probe all rgba (25769803776.0, 4294967296.0, 30064771072.0, 1.844674404e19) 1 todo probe all rgba (25769803776.0, 4294967296.0, 30064771072.0, 1.844674404e19) 1