mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
Revert "[dxbc] Map 1D and 2D textures to their respective array type"
Broken. Requires some prep work in the shader compiler.
This commit is contained in:
parent
906355b0da
commit
0318cc730a
@ -369,7 +369,7 @@ namespace dxvk {
|
||||
|
||||
switch (desc.ViewDimension) {
|
||||
case D3D11_SRV_DIMENSION_TEXTURE1D:
|
||||
viewInfo.type = VK_IMAGE_VIEW_TYPE_1D_ARRAY;
|
||||
viewInfo.type = VK_IMAGE_VIEW_TYPE_1D;
|
||||
viewInfo.minLevel = desc.Texture1D.MostDetailedMip;
|
||||
viewInfo.numLevels = desc.Texture1D.MipLevels;
|
||||
viewInfo.minLayer = 0;
|
||||
@ -385,7 +385,7 @@ namespace dxvk {
|
||||
break;
|
||||
|
||||
case D3D11_SRV_DIMENSION_TEXTURE2D:
|
||||
viewInfo.type = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||
viewInfo.type = VK_IMAGE_VIEW_TYPE_2D;
|
||||
viewInfo.minLevel = desc.Texture2D.MostDetailedMip;
|
||||
viewInfo.numLevels = desc.Texture2D.MipLevels;
|
||||
viewInfo.minLayer = 0;
|
||||
|
@ -810,12 +810,13 @@ namespace dxvk {
|
||||
const uint32_t sampledTypeId = getScalarTypeId(sampledType);
|
||||
|
||||
// Declare the resource type
|
||||
// TODO test multisampled images
|
||||
const DxbcImageInfo typeInfo = [resourceType, isUav] () -> DxbcImageInfo {
|
||||
switch (resourceType) {
|
||||
case DxbcResourceDim::Buffer: return { spv::DimBuffer, 0, 0, isUav ? 2u : 1u };
|
||||
case DxbcResourceDim::Texture1D: return { spv::Dim1D, 1, 0, isUav ? 2u : 1u };
|
||||
case DxbcResourceDim::Texture1D: return { spv::Dim1D, 0, 0, isUav ? 2u : 1u };
|
||||
case DxbcResourceDim::Texture1DArr: return { spv::Dim1D, 1, 0, isUav ? 2u : 1u };
|
||||
case DxbcResourceDim::Texture2D: return { spv::Dim2D, 1, 0, isUav ? 2u : 1u };
|
||||
case DxbcResourceDim::Texture2D: return { spv::Dim2D, 0, 0, isUav ? 2u : 1u };
|
||||
case DxbcResourceDim::Texture2DArr: return { spv::Dim2D, 1, 0, isUav ? 2u : 1u };
|
||||
case DxbcResourceDim::Texture2DMs: return { spv::Dim2D, 0, 1, isUav ? 2u : 1u };
|
||||
case DxbcResourceDim::Texture2DMsArr: return { spv::Dim2D, 1, 1, isUav ? 2u : 1u };
|
||||
@ -6213,9 +6214,9 @@ namespace dxvk {
|
||||
case DxbcResourceDim::Buffer:
|
||||
case DxbcResourceDim::RawBuffer:
|
||||
case DxbcResourceDim::StructuredBuffer: return VK_IMAGE_VIEW_TYPE_MAX_ENUM;
|
||||
case DxbcResourceDim::Texture1D: return VK_IMAGE_VIEW_TYPE_1D_ARRAY;
|
||||
case DxbcResourceDim::Texture1D: return VK_IMAGE_VIEW_TYPE_1D;
|
||||
case DxbcResourceDim::Texture1DArr: return VK_IMAGE_VIEW_TYPE_1D_ARRAY;
|
||||
case DxbcResourceDim::Texture2D: return VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||
case DxbcResourceDim::Texture2D: return VK_IMAGE_VIEW_TYPE_2D;
|
||||
case DxbcResourceDim::Texture2DMs: return VK_IMAGE_VIEW_TYPE_2D;
|
||||
case DxbcResourceDim::Texture2DArr: return VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||
case DxbcResourceDim::Texture2DMsArr: return VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user