HLSL: fix type on clip/cull index result

While adding geometry stage support for clip/cull, it transpired that the
existing clip/cull support was not setting the type of the result of indexing
into the clup/cull variable.  That's a defect independent of the geometry
support, so to simplify the geometry PR, this is addressed separately.

It doesn't appear to change the generated SPIR-V, but that's probably down to
something else tolerating a bad input.
This commit is contained in:
LoopDawg 2017-08-28 14:05:41 -06:00
parent 82e95a3aa5
commit d6f4d9b48c
18 changed files with 180 additions and 174 deletions

View file

@ -106,7 +106,7 @@ Shader version: 500
0:? 'pos' ( temp 4-component vector of float)
0:? Sequence
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float ClipDistance)
0:? 'clip' ( out 4-element array of float ClipDistance)
0:4 Constant:
0:4 0 (const int)
@ -118,7 +118,7 @@ Shader version: 500
0:4 Constant:
0:4 0 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float ClipDistance)
0:? 'clip' ( out 4-element array of float ClipDistance)
0:4 Constant:
0:4 1 (const int)
@ -130,7 +130,7 @@ Shader version: 500
0:4 Constant:
0:4 1 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float ClipDistance)
0:? 'clip' ( out 4-element array of float ClipDistance)
0:4 Constant:
0:4 2 (const int)
@ -142,7 +142,7 @@ Shader version: 500
0:4 Constant:
0:4 0 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float ClipDistance)
0:? 'clip' ( out 4-element array of float ClipDistance)
0:4 Constant:
0:4 3 (const int)
@ -155,7 +155,7 @@ Shader version: 500
0:4 1 (const int)
0:? Sequence
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float CullDistance)
0:? 'cull' ( out 4-element array of float CullDistance)
0:4 Constant:
0:4 0 (const int)
@ -167,7 +167,7 @@ Shader version: 500
0:4 Constant:
0:4 0 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float CullDistance)
0:? 'cull' ( out 4-element array of float CullDistance)
0:4 Constant:
0:4 1 (const int)
@ -179,7 +179,7 @@ Shader version: 500
0:4 Constant:
0:4 1 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float CullDistance)
0:? 'cull' ( out 4-element array of float CullDistance)
0:4 Constant:
0:4 2 (const int)
@ -191,7 +191,7 @@ Shader version: 500
0:4 Constant:
0:4 0 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float CullDistance)
0:? 'cull' ( out 4-element array of float CullDistance)
0:4 Constant:
0:4 3 (const int)
@ -318,7 +318,7 @@ Shader version: 500
0:? 'pos' ( temp 4-component vector of float)
0:? Sequence
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float ClipDistance)
0:? 'clip' ( out 4-element array of float ClipDistance)
0:4 Constant:
0:4 0 (const int)
@ -330,7 +330,7 @@ Shader version: 500
0:4 Constant:
0:4 0 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float ClipDistance)
0:? 'clip' ( out 4-element array of float ClipDistance)
0:4 Constant:
0:4 1 (const int)
@ -342,7 +342,7 @@ Shader version: 500
0:4 Constant:
0:4 1 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float ClipDistance)
0:? 'clip' ( out 4-element array of float ClipDistance)
0:4 Constant:
0:4 2 (const int)
@ -354,7 +354,7 @@ Shader version: 500
0:4 Constant:
0:4 0 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float ClipDistance)
0:? 'clip' ( out 4-element array of float ClipDistance)
0:4 Constant:
0:4 3 (const int)
@ -367,7 +367,7 @@ Shader version: 500
0:4 1 (const int)
0:? Sequence
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float CullDistance)
0:? 'cull' ( out 4-element array of float CullDistance)
0:4 Constant:
0:4 0 (const int)
@ -379,7 +379,7 @@ Shader version: 500
0:4 Constant:
0:4 0 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float CullDistance)
0:? 'cull' ( out 4-element array of float CullDistance)
0:4 Constant:
0:4 1 (const int)
@ -391,7 +391,7 @@ Shader version: 500
0:4 Constant:
0:4 1 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float CullDistance)
0:? 'cull' ( out 4-element array of float CullDistance)
0:4 Constant:
0:4 2 (const int)
@ -403,7 +403,7 @@ Shader version: 500
0:4 Constant:
0:4 0 (const int)
0:4 move second child to first child ( temp float)
0:4 direct index ( temp float)
0:4 direct index ( out float CullDistance)
0:? 'cull' ( out 4-element array of float CullDistance)
0:4 Constant:
0:4 3 (const int)