Skip to content

Commit 88563ab

Browse files
fix big engine bug
1 parent 4b6acd3 commit 88563ab

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

examples_tests/39.DenoiserTonemapper/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ void main()
949949
denoiserOutput.rowStrideInBytes = param.width * forcedOptiXFormatPixelStride;
950950
denoiserOutput.format = forcedOptiXFormat;
951951
denoiserOutput.pixelStrideInBytes = forcedOptiXFormatPixelStride;
952-
#if 0
952+
#if 1 // for easy debug with renderdoc disable optix stuff
953953
//invoke
954954
if (denoiser.m_denoiser->tileAndInvoke(
955955
m_cudaStream,
@@ -968,7 +968,7 @@ void main()
968968
continue;
969969
}
970970
#else
971-
driver->copyBuffer(colorPixelBuffer.getObject(),temporaryPixelBuffer.getObject(),inImageByteOffset[EII_COLOR],outImageByteOffset[0],denoiserInputs[0].rowStrideInBytes*param.height);
971+
driver->copyBuffer(temporaryPixelBuffer.getObject(),colorPixelBuffer.getObject(),inImageByteOffset[EII_COLOR],outImageByteOffset[EII_COLOR],denoiserInputs[EII_COLOR].rowStrideInBytes*param.height);
972972
#endif
973973
}
974974

src/nbl/video/COpenGLSpecializedShader.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,17 @@ static void reorderBindings(spirv_cross::CompilerGLSL& _comp, const COpenGLPipel
7070
const spirv_cross::Resource& r = res[i];
7171
const uint32_t r_bnd = _comp.get_decoration(r.id, spv::DecorationBinding);
7272

73-
if (dsl->getBindings().begin()[j].binding != r_bnd) {
74-
const asset::E_DESCRIPTOR_TYPE dtype = dsl->getBindings().begin()[j].type;
73+
const auto& bindInfo = dsl->getBindings().begin()[j];
74+
if (bindInfo.binding != r_bnd)
75+
{
76+
const asset::E_DESCRIPTOR_TYPE dtype = bindInfo.type;
7577
if (dtype==_dtype1 || dtype==_dtype2)
76-
availableBinding += dsl->getBindings().begin()[j].count;
78+
availableBinding += bindInfo.count;
7779
continue;
7880
}
7981

8082
_comp.set_decoration(r.id, spv::DecorationBinding, availableBinding);
81-
const spirv_cross::SPIRType& type = _comp.get_type(r.type_id);
82-
availableBinding += (type.array.size() ? type.array[0] : 1u);
83+
availableBinding += bindInfo.count;
8384
_comp.unset_decoration(r.id, spv::DecorationDescriptorSet);
8485
++i;
8586
}

0 commit comments

Comments
 (0)