RFR: 8217853: Cleanup in the D3D native pipeline [v5]
Nir Lisker
nlisker at openjdk.org
Thu Sep 1 11:23:45 UTC 2022
On Thu, 1 Sep 2022 05:35:09 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>> I still don't understand. What is `VertexType`? I see a comment on `VsInput` "// this is a .hlsl mirror of the vertex format, see VertexTypes.h". If the gradle file has `"/DVertexType=VsInput"`, shouldn't it be fine with `VsInput` as the main function argument?
>
> Referring code without this PR changes:
>
> - `/DVertexType=ObjVertex` -> Is a macro definition passed to DirectX shader compiler.
> - This macro is used only once in `Mtl1VS.hlsl` as a type of main function's argument: `ObjVsOutput main(VertexType i)`
> - So, if we directly use struct name in `Mtl1VS.hlsl` then the Macro in build.gradle goes unused. So can/should be removed from build.gradle.
>
> With current changes in PR:
> - With this change `VsOutput main(VsInput vsInput)` in Mtl1VS.hlsl the macro def `/DVertexType=VSInput` in build.gradle can/should also be removed:->
> `["$FXC", "/nologo", "/T", "vs_3_0", "/Fh", "$buildDir/headers/PrismD3D/hlsl/Mtl1VS_Obj.h", "$VS_3D_SRC"]`
>
> OR
>
> - In build.gradle: Change `"/DVertexType=ObjVertex"` to `"/DVertexType=VsInput"` and,
> In Mtl1VS.hlsl: Change `VsOutput main(VsInput vsInput)` to `VsOutput main(VertexType vsInput)`
I reverted the input parameter type as you suggested and added a comment referring to the gradle build file.
-------------
PR: https://git.openjdk.org/jfx/pull/789
More information about the openjfx-dev
mailing list