diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-06-28 12:10:55 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-06-28 13:23:44 +0300 |
commit | 8216e87f02d010bc0e0233addf01541e6332b126 (patch) | |
tree | 81412a5c4a3e5cebe042834f413276b189fbf8aa /reference/shaders-ue4 | |
parent | 9cdeefb5e322fc26b5fed70795fe79725648df1f (diff) |
Handle SPIR-V 1.4 selection constructs.
Fix bug in to_trivial_mix_op, where we made a pre-1.4 assumption that
component count of selector is equal to value component count.
Diffstat (limited to 'reference/shaders-ue4')
4 files changed, 4 insertions, 4 deletions
diff --git a/reference/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag b/reference/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag index dd54893a..9404aa66 100644 --- a/reference/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag +++ b/reference/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag @@ -470,7 +470,7 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[bu float3 _245; if (any(abs(_142 - View_PrimitiveSceneData._m0[_222 + 5u].xyz) > (View_PrimitiveSceneData._m0[_222 + 19u].xyz + float3(1.0)))) { - _245 = mix(float3(1.0, 1.0, 0.0), float3(0.0, 1.0, 1.0), select(float3(0.0), float3(1.0), float3(fract(dot(_142, float3(0.57700002193450927734375)) * 0.00200000009499490261077880859375)) > float3(0.5))); + _245 = mix(float3(1.0, 1.0, 0.0), float3(0.0, 1.0, 1.0), float3(float3(fract(dot(_142, float3(0.57700002193450927734375)) * 0.00200000009499490261077880859375)) > float3(0.5))); } else { diff --git a/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc b/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc index 70d17d47..2748b497 100644 --- a/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc +++ b/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc @@ -369,7 +369,7 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) float4 _537 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); float3 _538 = _537.xyz; float _540 = _537.w; - if (any((((select(int3(0), int3(1), (_495 - _496) < float3(_498 + _499)) + (int3(2) * select(int3(0), int3(1), (_495 + _496) > float3((-_498) - _499)))) | (select(int3(0), int3(1), (_517 - _496) < float3(_519 + _499)) + (int3(2) * select(int3(0), int3(1), (_517 + _496) > float3((-_519) - _499))))) | (select(int3(0), int3(1), (_538 - _496) < float3(_540 + _499)) + (int3(2) * select(int3(0), int3(1), (_538 + _496) > float3((-_540) - _499))))) != int3(3))) + if (any((((int3((_495 - _496) < float3(_498 + _499)) + (int3(2) * int3((_495 + _496) > float3((-_498) - _499)))) | (int3((_517 - _496) < float3(_519 + _499)) + (int3(2) * int3((_517 + _496) > float3((-_519) - _499))))) | (int3((_538 - _496) < float3(_540 + _499)) + (int3(2) * int3((_538 + _496) > float3((-_540) - _499))))) != int3(3))) { _589 = float4(0.0); break; diff --git a/reference/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc b/reference/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc index 2ec93060..6aadcefe 100644 --- a/reference/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc +++ b/reference/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc @@ -437,7 +437,7 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) float4 _548 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); float3 _549 = _548.xyz; float _551 = _548.w; - if (any((((select(int3(0), int3(1), (_506 - _507) < float3(_509 + _510)) + (int3(2) * select(int3(0), int3(1), (_506 + _507) > float3((-_509) - _510)))) | (select(int3(0), int3(1), (_528 - _507) < float3(_530 + _510)) + (int3(2) * select(int3(0), int3(1), (_528 + _507) > float3((-_530) - _510))))) | (select(int3(0), int3(1), (_549 - _507) < float3(_551 + _510)) + (int3(2) * select(int3(0), int3(1), (_549 + _507) > float3((-_551) - _510))))) != int3(3))) + if (any((((int3((_506 - _507) < float3(_509 + _510)) + (int3(2) * int3((_506 + _507) > float3((-_509) - _510)))) | (int3((_528 - _507) < float3(_530 + _510)) + (int3(2) * int3((_528 + _507) > float3((-_530) - _510))))) | (int3((_549 - _507) < float3(_551 + _510)) + (int3(2) * int3((_549 + _507) > float3((-_551) - _510))))) != int3(3))) { _600 = float4(0.0); break; diff --git a/reference/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc b/reference/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc index 833122cd..8c8ebf55 100644 --- a/reference/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc +++ b/reference/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc @@ -381,7 +381,7 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) float4 _472 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); float3 _473 = _472.xyz; float _475 = _472.w; - if (any((((select(int3(0), int3(1), (_430 - _431) < float3(_433 + _434)) + (int3(2) * select(int3(0), int3(1), (_430 + _431) > float3((-_433) - _434)))) | (select(int3(0), int3(1), (_452 - _431) < float3(_454 + _434)) + (int3(2) * select(int3(0), int3(1), (_452 + _431) > float3((-_454) - _434))))) | (select(int3(0), int3(1), (_473 - _431) < float3(_475 + _434)) + (int3(2) * select(int3(0), int3(1), (_473 + _431) > float3((-_475) - _434))))) != int3(3))) + if (any((((int3((_430 - _431) < float3(_433 + _434)) + (int3(2) * int3((_430 + _431) > float3((-_433) - _434)))) | (int3((_452 - _431) < float3(_454 + _434)) + (int3(2) * int3((_452 + _431) > float3((-_454) - _434))))) | (int3((_473 - _431) < float3(_475 + _434)) + (int3(2) * int3((_473 + _431) > float3((-_475) - _434))))) != int3(3))) { _524 = float4(0.0); break; |