Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GL_EXT_shader_subgroup_extended_types support #1902

Merged
merged 1 commit into from
Sep 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions SPIRV/GlslangToSpv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6837,8 +6837,9 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
default: assert(0 && "Unhandled subgroup operation!");
}

const bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64;
const bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble;

const bool isUnsigned = isTypeUnsignedInt(typeProxy);
const bool isFloat = isTypeFloat(typeProxy);
const bool isBool = typeProxy == glslang::EbtBool;

spv::Op opCode = spv::OpNop;
Expand Down
6 changes: 3 additions & 3 deletions Test/baseResults/spv.specConstant.vert.out
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spv.specConstant.vert
Source GLSL 400
Name 4 "main"
Name 9 "arraySize"
Name 14 "foo(vf4[s2769];"
Name 14 "foo(vf4[s4393];"
Name 13 "p"
Name 17 "builtin_spec_constant("
Name 20 "color"
Expand Down Expand Up @@ -102,10 +102,10 @@ spv.specConstant.vert
Store 20(color) 46
48: 10 Load 22(ucol)
Store 47(param) 48
49: 2 FunctionCall 14(foo(vf4[s2769];) 47(param)
49: 2 FunctionCall 14(foo(vf4[s4393];) 47(param)
Return
FunctionEnd
14(foo(vf4[s2769];): 2 Function None 12
14(foo(vf4[s4393];): 2 Function None 12
13(p): 11(ptr) FunctionParameter
15: Label
54: 24(ptr) AccessChain 53(dupUcol) 23
Expand Down
4,280 changes: 4,280 additions & 0 deletions Test/baseResults/spv.subgroupExtendedTypesArithmetic.comp.out

Large diffs are not rendered by default.

557 changes: 557 additions & 0 deletions Test/baseResults/spv.subgroupExtendedTypesArithmeticNeg.comp.out

Large diffs are not rendered by default.

560 changes: 560 additions & 0 deletions Test/baseResults/spv.subgroupExtendedTypesBallot.comp.out

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions Test/baseResults/spv.subgroupExtendedTypesBallotNeg.comp.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
spv.subgroupExtendedTypesBallotNeg.comp
ERROR: 0:26: ' temp int8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:27: ' temp 2-component vector of int8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:28: ' temp 3-component vector of int8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:29: 'layout( column_major std430) buffer 4-component vector of int8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:30: ' temp int8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:31: ' temp 2-component vector of int8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:32: ' temp 3-component vector of int8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:33: 'layout( column_major std430) buffer 4-component vector of int8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:35: ' temp uint8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:36: ' temp 2-component vector of uint8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:37: ' temp 3-component vector of uint8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:38: 'layout( column_major std430) buffer 4-component vector of uint8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:39: ' temp uint8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:40: ' temp 2-component vector of uint8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:41: ' temp 3-component vector of uint8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:42: 'layout( column_major std430) buffer 4-component vector of uint8_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int8
ERROR: 0:44: ' temp int16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:45: ' temp 2-component vector of int16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:46: ' temp 3-component vector of int16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:47: 'layout( column_major std430) buffer 4-component vector of int16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:48: ' temp int16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:49: ' temp 2-component vector of int16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:50: ' temp 3-component vector of int16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:51: 'layout( column_major std430) buffer 4-component vector of int16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:53: ' temp uint16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:54: ' temp 2-component vector of uint16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:55: ' temp 3-component vector of uint16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:56: 'layout( column_major std430) buffer 4-component vector of uint16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:57: ' temp uint16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:58: ' temp 2-component vector of uint16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:59: ' temp 3-component vector of uint16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:60: 'layout( column_major std430) buffer 4-component vector of uint16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int16
ERROR: 0:62: ' temp int64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:63: ' temp 2-component vector of int64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:64: ' temp 3-component vector of int64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:65: 'layout( column_major std430) buffer 4-component vector of int64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:66: ' temp int64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:67: ' temp 2-component vector of int64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:68: ' temp 3-component vector of int64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:69: 'layout( column_major std430) buffer 4-component vector of int64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:71: ' temp uint64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:72: ' temp 2-component vector of uint64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:73: ' temp 3-component vector of uint64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:74: 'layout( column_major std430) buffer 4-component vector of uint64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:75: ' temp uint64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:76: ' temp 2-component vector of uint64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:77: ' temp 3-component vector of uint64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:78: 'layout( column_major std430) buffer 4-component vector of uint64_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_int64
ERROR: 0:80: ' temp float16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_float16
ERROR: 0:81: ' temp 2-component vector of float16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_float16
ERROR: 0:82: ' temp 3-component vector of float16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_float16
ERROR: 0:83: 'layout( column_major std430) buffer 4-component vector of float16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_float16
ERROR: 0:84: ' temp float16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_float16
ERROR: 0:85: ' temp 2-component vector of float16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_float16
ERROR: 0:86: ' temp 3-component vector of float16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_float16
ERROR: 0:87: 'layout( column_major std430) buffer 4-component vector of float16_t' : required extension not requested: GL_EXT_shader_subgroup_extended_types_float16
ERROR: 56 compilation errors. No code generated.


SPIR-V is not generated for failed compile or link
9 changes: 9 additions & 0 deletions Test/baseResults/spv.subgroupExtendedTypesBasic.comp.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
spv.subgroupExtendedTypesBasic.comp
ERROR: #version: compute shaders require es profile with version 310 or above, or non-es profile with version 420 or above
ERROR: #version: statement must appear first in es-profile shader; before comments or newlines
ERROR: 1 compilation errors. No code generated.


ERROR: Linking compute stage: Missing entry point: Each stage requires one entry point

SPIR-V is not generated for failed compile or link
Loading