Skip to content

Commit

Permalink
Handle 16-bit types not being supported in demos project
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Jan 14, 2025
1 parent 3c5ce8a commit e692c30
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,13 +873,15 @@ float4 main(v2f IN) : SV_Target0
uint res = dot4add_u8packed(a, b, c);
return float4(res & 0xFF, (res >> 8) & 0xFF, (res >> 16) & 0xFF, (res >> 24) & 0xFF);
}
#if HAS_16BIT_SHADER_OPS
if(IN.tri == 96)
{
half2 a = half2(IN.tri - 96 + 0.25f, IN.tri - 96 + 0.5f);
half2 b = half2(IN.tri - 96 + 0.5f, IN.tri - 96 + 0.25f);
float c = IN.tri - 96 + 0.3f;
return dot2add(a, b, c);
}
#endif
if(IN.tri == 97)
{
int val = IN.tri - 97;
Expand Down Expand Up @@ -1124,7 +1126,9 @@ void main()
ID3D12PipelineStatePtr pso_6_6 = NULL;

// Recompile with SM 6.0, SM 6.2 and SM 6.6
uint32_t compileOptions = CompileOptionFlags::SkipOptimise | CompileOptionFlags::Enable16BitTypes;
uint32_t compileOptions = CompileOptionFlags::SkipOptimise;
if(opts4.Native16BitShaderOpsSupported)
compileOptions |= CompileOptionFlags::Enable16BitTypes;
if(supportSM60)
{
vsblob = Compile(common + vertex, "main", "vs_6_0");
Expand Down

0 comments on commit e692c30

Please sign in to comment.