Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hollings <bill.hollings@brenwill.com>2021-09-05 23:51:04 +0300
committerBill Hollings <bill.hollings@brenwill.com>2021-09-05 23:51:04 +0300
commit472f9d4f6d647c8af7a9e3b7516624fe2c0b5d6f (patch)
treeb6b940525207b21a6cf7e28fd3f7c28fa6b6be08 /reference/shaders
parent5fb1ca4f0d04f2b169086e1a48a465bc2dc29169 (diff)
Add tests for OpSpecConstantOp ops OpQuantizeToF16 and OpSRem.
Tests provided by @cdavis5e.
Diffstat (limited to 'reference/shaders')
-rw-r--r--reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert15
-rw-r--r--reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk15
2 files changed, 16 insertions, 14 deletions
diff --git a/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert b/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert
index fdba2a26..daf0071a 100644
--- a/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert
+++ b/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert
@@ -10,9 +10,10 @@ const int _20 = (_7 + 2);
#endif
const uint _8 = SPIRV_CROSS_CONSTANT_ID_202;
const uint _25 = (_8 % 5u);
-const ivec4 _30 = ivec4(20, 30, _20, _20);
-const ivec2 _32 = ivec2(_30.y, _30.x);
-const int _33 = _30.y;
+const int _30 = _7 - (-3) * (_7 / (-3));
+const ivec4 _32 = ivec4(20, 30, _20, _30);
+const ivec2 _34 = ivec2(_32.y, _32.x);
+const int _35 = _32.y;
#ifndef SPIRV_CROSS_CONSTANT_ID_200
#define SPIRV_CROSS_CONSTANT_ID_200 3.141590118408203125
#endif
@@ -25,10 +26,10 @@ void main()
vec4 pos = vec4(0.0);
pos.y += float(_20);
pos.z += float(_25);
- pos += vec4(_30);
- vec2 _56 = pos.xy + vec2(_32);
- pos = vec4(_56.x, _56.y, pos.z, pos.w);
+ pos += vec4(_32);
+ vec2 _58 = pos.xy + vec2(_34);
+ pos = vec4(_58.x, _58.y, pos.z, pos.w);
gl_Position = pos;
- _4 = _33;
+ _4 = _35;
}
diff --git a/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk b/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk
index 02c3e312..94643ec1 100644
--- a/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk
+++ b/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk
@@ -4,9 +4,10 @@ layout(constant_id = 201) const int _7 = -10;
const int _20 = (_7 + 2);
layout(constant_id = 202) const uint _8 = 100u;
const uint _25 = (_8 % 5u);
-const ivec4 _30 = ivec4(20, 30, _20, _20);
-const ivec2 _32 = ivec2(_30.y, _30.x);
-const int _33 = _30.y;
+const int _30 = _7 - (-3) * (_7 / (-3));
+const ivec4 _32 = ivec4(20, 30, _20, _30);
+const ivec2 _34 = ivec2(_32.y, _32.x);
+const int _35 = _32.y;
layout(constant_id = 200) const float _9 = 3.141590118408203125;
layout(location = 0) flat out int _4;
@@ -16,10 +17,10 @@ void main()
vec4 pos = vec4(0.0);
pos.y += float(_20);
pos.z += float(_25);
- pos += vec4(_30);
- vec2 _56 = pos.xy + vec2(_32);
- pos = vec4(_56.x, _56.y, pos.z, pos.w);
+ pos += vec4(_32);
+ vec2 _58 = pos.xy + vec2(_34);
+ pos = vec4(_58.x, _58.y, pos.z, pos.w);
gl_Position = pos;
- _4 = _33;
+ _4 = _35;
}