mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Only emit depth image types for 2D and Cube images
May fix driver crashes on Nvidia.
This commit is contained in:
parent
8ebffc1018
commit
fd1fd40ad6
@ -800,9 +800,10 @@ namespace dxvk {
|
|||||||
res.depthTypeId = 0;
|
res.depthTypeId = 0;
|
||||||
res.structStride = 0;
|
res.structStride = 0;
|
||||||
|
|
||||||
if (resourceType != DxbcResourceDim::Buffer
|
if (resourceType == DxbcResourceDim::Texture2D
|
||||||
&& resourceType != DxbcResourceDim::Texture2DMs
|
|| resourceType == DxbcResourceDim::Texture2DArr
|
||||||
&& resourceType != DxbcResourceDim::Texture2DMsArr) {
|
|| resourceType == DxbcResourceDim::TextureCube
|
||||||
|
|| resourceType == DxbcResourceDim::TextureCubeArr) {
|
||||||
res.depthTypeId = m_module.defImageType(sampledTypeId,
|
res.depthTypeId = m_module.defImageType(sampledTypeId,
|
||||||
typeInfo.dim, 1, typeInfo.array, typeInfo.ms, typeInfo.sampled,
|
typeInfo.dim, 1, typeInfo.array, typeInfo.ms, typeInfo.sampled,
|
||||||
spv::ImageFormatUnknown);
|
spv::ImageFormatUnknown);
|
||||||
@ -4575,6 +4576,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
case DxbcSystemValue::RenderTargetId: {
|
case DxbcSystemValue::RenderTargetId: {
|
||||||
if (m_ps.builtinLayer == 0) {
|
if (m_ps.builtinLayer == 0) {
|
||||||
|
m_module.enableCapability(spv::CapabilityGeometry);
|
||||||
|
|
||||||
m_ps.builtinLayer = emitNewBuiltinVariable({
|
m_ps.builtinLayer = emitNewBuiltinVariable({
|
||||||
{ DxbcScalarType::Uint32, 1, 0 },
|
{ DxbcScalarType::Uint32, 1, 0 },
|
||||||
spv::StorageClassInput },
|
spv::StorageClassInput },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user