@@ -31,7 +31,7 @@ namespace {
31
31
}
32
32
}
33
33
34
- void HlslTranslator::outputCode (const Target& target, const char * filename, std::map<std::string, int >& attributes) {
34
+ void HlslTranslator::outputCode (const Target& target, const char * sourcefilename, const char * filename, std::map<std::string, int >& attributes) {
35
35
std::ofstream file;
36
36
file.open (filename, std::ios::binary | std::ios::out);
37
37
out = &file;
@@ -427,23 +427,23 @@ void HlslTranslator::outputInstruction(const Target& target, std::map<std::strin
427
427
(*out) << " OutputFrag main(InputFrag input)\n " ;
428
428
}
429
429
else if (stage == EShLangTessControl) {
430
- (*out) << " [domain(\" tri\" )]\n " ; indent (out);
431
- (*out) << " [partitioning(\" integer\" )]\n " ; indent (out);
432
- (*out) << " [outputtopology(\" triangle_cw\" )]\n " ; indent (out);
433
- (*out) << " [outputcontrolpoints(3)]\n " ; indent (out);
434
- (*out) << " [patchconstantfunc(\" patch\" )]\n " ; indent (out);
430
+ (*out) << " [domain(\" tri\" )]\n " ; indent (out);
431
+ (*out) << " [partitioning(\" integer\" )]\n " ; indent (out);
432
+ (*out) << " [outputtopology(\" triangle_cw\" )]\n " ; indent (out);
433
+ (*out) << " [outputcontrolpoints(3)]\n " ; indent (out);
434
+ (*out) << " [patchconstantfunc(\" patch\" )]\n " ; indent (out);
435
435
(*out) << " OutputTessC main(InputPatch<InputTessC, 3> input, uint pointId : SV_OutputControlPointID, uint patchId : SV_PrimitiveID)\n " ;
436
436
}
437
437
else if (stage == EShLangTessEvaluation) {
438
- (*out) << " [domain(\" tri\" )]\n " ; indent (out);
438
+ (*out) << " [domain(\" tri\" )]\n " ; indent (out);
439
439
(*out) << " OutputTessE main(float edges[3] : SV_TessFactor, float inside : SV_InsideTessFactor, float3 gl_TessCoord : SV_DomainLocation, const OutputPatch<InputTessE, 3> input)\n " ;
440
440
}
441
441
else if (stage == EShLangGeometry) {
442
442
(*out) << " [maxvertexcount(3)]\n " ; indent (out);
443
443
(*out) << " void main(triangle InputGeom input[3], inout TriangleStream<OutputGeom> _output_stream)\n " ;
444
444
}
445
445
else if (stage == EShLangCompute) {
446
- (*out) << " [numthreads(" << localSizeX << " , " << localSizeY << " , " << localSizeZ <<" )]\n " ; indent (out);
446
+ (*out) << " [numthreads(" << localSizeX << " , " << localSizeY << " , " << localSizeZ <<" )]\n " ; indent (out);
447
447
(*out) << " void main(uint3 groupID : SV_GroupID, uint3 groupThreadID : SV_GroupThreadID, uint3 dispatchThreadID : SV_DispatchThreadID)\n " ;
448
448
}
449
449
else {
@@ -462,8 +462,8 @@ void HlslTranslator::outputInstruction(const Target& target, std::map<std::strin
462
462
indent (out); (*out) << " tc_gl_InvocationID = 0;\n " ;
463
463
}
464
464
else if (stage == EShLangCompute) {
465
- indent (out); (*out) << " c_gl_WorkGroupID = groupID;\n " ;
466
- indent (out); (*out) << " c_gl_LocalInvocationID = groupThreadID;\n " ;
465
+ indent (out); (*out) << " c_gl_WorkGroupID = groupID;\n " ;
466
+ indent (out); (*out) << " c_gl_LocalInvocationID = groupThreadID;\n " ;
467
467
indent (out); (*out) << " c_gl_GlobalInvocationID = dispatchThreadID;\n " ;
468
468
}
469
469
@@ -634,19 +634,19 @@ void HlslTranslator::outputInstruction(const Target& target, std::map<std::strin
634
634
(*out) << " void tese_main()\n " ;
635
635
}
636
636
else if (stage == EShLangTessControl) {
637
- (*out) << " struct PatchOutputTessC {\n " ; ++indentation; indent (out);
638
- (*out) << " float gl_TessLevelInner : SV_InsideTessFactor;\n " ; indent (out);
639
- (*out) << " float gl_TessLevelOuter[3] : SV_TessFactor;\n " ; --indentation; indent (out);
640
- (*out) << " };\n\n " ; indent (out);
641
-
642
- (*out) << " PatchOutputTessC patch() {\n " ; ++indentation; indent (out);
643
- (*out) << " PatchOutputTessC output;\n " ; indent (out);
644
- (*out) << " patch_main();\n " ; indent (out);
645
- (*out) << " output.gl_TessLevelInner = tc_gl_TessLevelInner[0];\n " ; indent (out);
646
- (*out) << " output.gl_TessLevelOuter[0] = tc_gl_TessLevelOuter[0];\n " ; indent (out);
647
- (*out) << " output.gl_TessLevelOuter[1] = tc_gl_TessLevelOuter[1];\n " ; indent (out);
648
- (*out) << " output.gl_TessLevelOuter[2] = tc_gl_TessLevelOuter[2];\n " ; indent (out);
649
- (*out) << " return output;\n " ; --indentation; indent (out);
637
+ (*out) << " struct PatchOutputTessC {\n " ; ++indentation; indent (out);
638
+ (*out) << " float gl_TessLevelInner : SV_InsideTessFactor;\n " ; indent (out);
639
+ (*out) << " float gl_TessLevelOuter[3] : SV_TessFactor;\n " ; --indentation; indent (out);
640
+ (*out) << " };\n\n " ; indent (out);
641
+
642
+ (*out) << " PatchOutputTessC patch() {\n " ; ++indentation; indent (out);
643
+ (*out) << " PatchOutputTessC output;\n " ; indent (out);
644
+ (*out) << " patch_main();\n " ; indent (out);
645
+ (*out) << " output.gl_TessLevelInner = tc_gl_TessLevelInner[0];\n " ; indent (out);
646
+ (*out) << " output.gl_TessLevelOuter[0] = tc_gl_TessLevelOuter[0];\n " ; indent (out);
647
+ (*out) << " output.gl_TessLevelOuter[1] = tc_gl_TessLevelOuter[1];\n " ; indent (out);
648
+ (*out) << " output.gl_TessLevelOuter[2] = tc_gl_TessLevelOuter[2];\n " ; indent (out);
649
+ (*out) << " return output;\n " ; --indentation; indent (out);
650
650
(*out) << " }\n\n " ; indent (out);
651
651
652
652
(*out) << " void tesc_main()\n " ;
0 commit comments