summaryrefslogtreecommitdiffstats
path: root/source/core/text-io.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2018-02-09 21:27:26 -0800
committerGitHub <noreply@github.com>2018-02-09 21:27:26 -0800
commit214a1fced7c53b81c00bec67fa2b91a357d5ece4 (patch)
tree05f0e2cab9478a62022e7aad54b9ddfc9bd58b0c /source/core/text-io.cpp
parentc7c97ad4bb62b83efd6e26cdd4f38ebf164ec40e (diff)
Handling of duplicate global shader parameter declarations (#405)
* Issue error when shader parameter type doesn't match between translation units We currently allow users to compile different translation units at the same time for the vertex and fragment shader, and those different translation units might contain distinct declarations for the "same" parameter. Furthermore, those declarations might use distinct declaratins of the "same" type. We currently bind those as if they were one parameter, which means we assume they have types that are actually equivalent. Unfortunately, things break when that isn't the case. This change adds error messages when parameter declarations that are determined to be the "same" don't have types that are either equiavlent or match "structurally" (same names, same fields, and field types match recursively). Ideally most users won't see these errors, because they will only submit single files to the compiler. Eventually we may actually decide to require that case and simplify our logic. * Support types with layout coming from a "matching" type Because of how the front-end performs parameter binding, we can end up in cases where a variable is given a `TypeLayout` based on a "matching" type from another translation unit (because the "same" shader parmaeter got declared in multiple TUs). This change tries to support that use case by avoiding absolute field decl-refs in the representation used for type legalization, so that we don't end up in a situation where we look up field layout based on information that doesn't match.
Diffstat (limited to 'source/core/text-io.cpp')
0 files changed, 0 insertions, 0 deletions