mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 04:24:11 +01:00
[dxbc] Fixed incorrect result vector dimension for OpImageQuerySize
This commit is contained in:
parent
f5679211cd
commit
adb1789571
@ -4551,7 +4551,7 @@ namespace dxvk {
|
||||
|
||||
DxbcRegisterValue result;
|
||||
result.type.ctype = DxbcScalarType::Uint32;
|
||||
result.type.ccount = getTexCoordDim(info.image);
|
||||
result.type.ccount = getTexSizeDim(info.image);
|
||||
|
||||
if (info.image.ms == 0 && info.image.sampled == 1) {
|
||||
result.id = m_module.opImageQuerySizeLod(
|
||||
@ -6185,6 +6185,18 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
uint32_t DxbcCompiler::getTexSizeDim(const DxbcImageInfo& imageType) const {
|
||||
switch (imageType.dim) {
|
||||
case spv::DimBuffer: return 1 + imageType.array;
|
||||
case spv::Dim1D: return 1 + imageType.array;
|
||||
case spv::Dim2D: return 2 + imageType.array;
|
||||
case spv::Dim3D: return 3 + imageType.array;
|
||||
case spv::DimCube: return 2 + imageType.array;
|
||||
default: throw DxvkError("DxbcCompiler: getTexLayerDim: Unsupported image dimension");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint32_t DxbcCompiler::getTexLayerDim(const DxbcImageInfo& imageType) const {
|
||||
switch (imageType.dim) {
|
||||
case spv::DimBuffer: return 1;
|
||||
|
@ -985,6 +985,9 @@ namespace dxvk {
|
||||
DxbcBufferInfo getBufferInfo(
|
||||
const DxbcRegister& reg);
|
||||
|
||||
uint32_t getTexSizeDim(
|
||||
const DxbcImageInfo& imageType) const;
|
||||
|
||||
uint32_t getTexLayerDim(
|
||||
const DxbcImageInfo& imageType) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user