diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-02-08 11:41:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-08 11:41:26 -0500 |
| commit | ef08bdaf501982ae24a73200e55f99157e4b7e6a (patch) | |
| tree | 2f8d5f2100d5b9c8bb5c995b6417394e13b2eba6 /source/slang/ir-glsl-legalize.cpp | |
| parent | c34a5e7ed2da03c9ceaddd167e4b0421246b0c25 (diff) | |
Hotfix/dispatch thread id improvements (#834)
* * Make vector comparisons out correct functions on glsl
* Test for vector comparisons
* Typo fixes
* Glsl vector comparisons use functions.
* Added a coercion test.
* Do checking for the SV_DispatchThreadId type to see if it appears valid.
* Fix typo
* Make glsl do type conversion for SV_DispatchThreadID parameter.
* Fix glsl to match func-resource-param-array with changes to how SV_DispatchThreadID changes.
Diffstat (limited to 'source/slang/ir-glsl-legalize.cpp')
| -rw-r--r-- | source/slang/ir-glsl-legalize.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/ir-glsl-legalize.cpp b/source/slang/ir-glsl-legalize.cpp index 5b60314eb..57d493f1a 100644 --- a/source/slang/ir-glsl-legalize.cpp +++ b/source/slang/ir-glsl-legalize.cpp @@ -304,6 +304,9 @@ GLSLSystemValueInfo* getGLSLSystemValueInfo( else if(semanticName == "sv_dispatchthreadid") { name = "gl_GlobalInvocationID"; + + auto builder = context->getBuilder(); + requiredType = builder->getVectorType(builder->getBasicType(BaseType::UInt), builder->getIntValue(builder->getIntType(), 3)); } else if(semanticName == "sv_domainlocation") { @@ -514,7 +517,7 @@ ScalarizedVal createSimpleGLSLGlobalVarying( // // Our IR global shader parameters are read-only, just // like our IR function parameters, and need a wrapper - // `Out<...>` type to represent otuputs. + // `Out<...>` type to represent outputs. // bool isOutput = kind == LayoutResourceKind::VaryingOutput; IRType* paramType = isOutput ? builder->getOutType(type) : type; |
