Skip to content

Commit ae0b160

Browse files
committed
CP_UTF8 for dxc source buffer's encoding just like code page (experimental)
1 parent 9381491 commit ae0b160

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

include/nbl/builtin/hlsl/ext/FullScreenTriangle/default.vert.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ SVertexAttributes main()
3333
SVertexAttributes retval;
3434
retval.uv = tc[gl_VertexIndex()];
3535
return retval;
36-
}
36+
}
37+

include/nbl/builtin/hlsl/surface_transform.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,6 @@ TwoColumns applyToDerivatives(const FLAG_BITS transform, TwoColumns dDx_dDy)
181181
}
182182
}
183183
}
184-
#endif
184+
185+
#endif // _NBL_BUILTIN_HLSL_SURFACE_TRANSFORM_INCLUDED_
186+

src/nbl/asset/utils/CHLSLCompiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static DxcCompilationResult dxcCompile(const CHLSLCompiler* compiler, nbl::asset
301301
DxcBuffer sourceBuffer;
302302
sourceBuffer.Ptr = src->GetBufferPointer();
303303
sourceBuffer.Size = src->GetBufferSize();
304-
sourceBuffer.Encoding = 0;
304+
sourceBuffer.Encoding = CP_UTF8;
305305

306306
ComPtr<IDxcResult> compileResult;
307307
res = dxc->m_dxcCompiler->Compile(&sourceBuffer, args, argCount, nullptr, IID_PPV_ARGS(compileResult.GetAddressOf()));

0 commit comments

Comments
 (0)