mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-03 13:24:20 +01:00
[dxbc] Fix SPIR-V caps for SRV and UAV resources
This commit is contained in:
parent
d9931e3621
commit
2d81decb91
@ -904,13 +904,27 @@ namespace dxvk {
|
|||||||
|
|
||||||
// Declare additional capabilities if necessary
|
// Declare additional capabilities if necessary
|
||||||
switch (resourceType) {
|
switch (resourceType) {
|
||||||
case DxbcResourceDim::Buffer: m_module.enableCapability(spv::CapabilityImageBuffer); break;
|
case DxbcResourceDim::Buffer:
|
||||||
case DxbcResourceDim::Texture1D: m_module.enableCapability(spv::CapabilityImage1D); break;
|
m_module.enableCapability(isUav
|
||||||
case DxbcResourceDim::Texture1DArr: m_module.enableCapability(spv::CapabilityImage1D); break;
|
? spv::CapabilityImageBuffer
|
||||||
case DxbcResourceDim::TextureCubeArr: m_module.enableCapability(spv::CapabilityImageCubeArray); break;
|
: spv::CapabilitySampledBuffer);
|
||||||
case DxbcResourceDim::Texture2DMs: m_module.enableCapability(spv::CapabilityImageMSArray); break;
|
break;
|
||||||
case DxbcResourceDim::Texture2DMsArr: m_module.enableCapability(spv::CapabilityImageMSArray); break;
|
|
||||||
default: break; // No additional capabilities required
|
case DxbcResourceDim::Texture1D:
|
||||||
|
case DxbcResourceDim::Texture1DArr:
|
||||||
|
m_module.enableCapability(isUav
|
||||||
|
? spv::CapabilityImage1D
|
||||||
|
: spv::CapabilitySampled1D);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DxbcResourceDim::TextureCubeArr:
|
||||||
|
m_module.enableCapability(
|
||||||
|
spv::CapabilitySampledCubeArray);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// No additional capabilities required
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the read-without-format capability is not set and this
|
// If the read-without-format capability is not set and this
|
||||||
@ -1090,7 +1104,9 @@ namespace dxvk {
|
|||||||
} else {
|
} else {
|
||||||
// Structured and raw buffers are represented as
|
// Structured and raw buffers are represented as
|
||||||
// texel buffers consisting of 32-bit integers.
|
// texel buffers consisting of 32-bit integers.
|
||||||
m_module.enableCapability(spv::CapabilityImageBuffer);
|
m_module.enableCapability(isUav
|
||||||
|
? spv::CapabilityImageBuffer
|
||||||
|
: spv::CapabilitySampledBuffer);
|
||||||
|
|
||||||
resTypeId = m_module.defImageType(sampledTypeId,
|
resTypeId = m_module.defImageType(sampledTypeId,
|
||||||
typeInfo.dim, 0, typeInfo.array, typeInfo.ms, typeInfo.sampled,
|
typeInfo.dim, 0, typeInfo.array, typeInfo.ms, typeInfo.sampled,
|
||||||
|
Loading…
Reference in New Issue
Block a user