1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 11:52:12 +01:00

[dxvk] Only emit depth image types for 2D and Cube images

May fix driver crashes on Nvidia.
This commit is contained in:
Philip Rebohle 2018-02-16 09:59:41 +01:00
parent 8ebffc1018
commit fd1fd40ad6
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -800,9 +800,10 @@ namespace dxvk {
res.depthTypeId = 0;
res.structStride = 0;
if (resourceType != DxbcResourceDim::Buffer
&& resourceType != DxbcResourceDim::Texture2DMs
&& resourceType != DxbcResourceDim::Texture2DMsArr) {
if (resourceType == DxbcResourceDim::Texture2D
|| resourceType == DxbcResourceDim::Texture2DArr
|| resourceType == DxbcResourceDim::TextureCube
|| resourceType == DxbcResourceDim::TextureCubeArr) {
res.depthTypeId = m_module.defImageType(sampledTypeId,
typeInfo.dim, 1, typeInfo.array, typeInfo.ms, typeInfo.sampled,
spv::ImageFormatUnknown);
@ -4575,6 +4576,8 @@ namespace dxvk {
case DxbcSystemValue::RenderTargetId: {
if (m_ps.builtinLayer == 0) {
m_module.enableCapability(spv::CapabilityGeometry);
m_ps.builtinLayer = emitNewBuiltinVariable({
{ DxbcScalarType::Uint32, 1, 0 },
spv::StorageClassInput },