diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-04-05 16:15:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-05 16:15:45 -0700 |
| commit | 5298ccf7da486d0010c6157974d5dd9a5556f265 (patch) | |
| tree | f6183c91eb13dcde06b88d39ea914abe77236108 /tools/render-test/render-d3d12.cpp | |
| parent | 071566c5c64d62f7f894b14b1077f0b2a4038903 (diff) | |
Falcor fixes (#479)
* Don't emit interpolation modifiers on GLSL fields
The previous change that started passing through interpolation modifiers didn't account for the fact that the GLSL grammar doesn't allow interpolation modifiers on `struct` fields, so we shouldn't emit them in that case (and our legalization strategy for GLSL guarantees that varying input will never use a `struct` type anyway).
* Try to handle SV_Position semantic on GS input
HLSL allows `SV` semantics to be used for ordinary inter-stage dataflow in some cases (e.g., a VS can output `SV_Position` and it can then be read from a GS).
GLSL allows similar things with `gl_Position`, but there are some wrinkles.
One fix here is to correctly identify that `gl_FragCoord` should only be used as the translation of `SV_Position` for a fragment shader input (and not in the general case of *any* input).
The other "fix" here is a kludge to handle the fact that the right translation for a GS input is not to an array called `gl_Position`, but to the syntax `gl_in[index].gl_Position` (array-of-structs style). I am doing this by attaching a custom decoration to the global variable we create for `gl_Position` and then intercepting it during code emit. I'm not proud of this, and would like to do something better given time.
* Fix GLSL output for matrix-scalar multiplication
The output logic was assuming that any use of `operator*` in the input code that yields a value of matrix type must be translated to a `matrixCompMult()` call in GLSL, but this should really only apply if both of the *operands* are matrices (not just based on the result type). As a result matrix-times-scalar operations were emitting a call to `matrixCompMult()` and GLSL was complaining because it won't implicitly promote scalars to matrices.
Diffstat (limited to 'tools/render-test/render-d3d12.cpp')
0 files changed, 0 insertions, 0 deletions
