mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 20:10:06 +00:00
Fix GL_ARB_shader_storage_buffer_object version
Ensure that GL_ARB_shader_storage_buffer_object is available from version GL 400 to GL 420. Closes #3263.
This commit is contained in:
parent
f102d0f4fa
commit
091b9fd979
@ -7,6 +7,39 @@ uniform sampler2D arrayedSampler[5];
|
|||||||
uniform usampler2DRect samp2dr;
|
uniform usampler2DRect samp2dr;
|
||||||
uniform isampler2DArray isamp2DA;
|
uniform isampler2DArray isamp2DA;
|
||||||
|
|
||||||
|
#extension GL_ARB_shader_storage_buffer_object : enable
|
||||||
|
|
||||||
|
buffer Buffer
|
||||||
|
{
|
||||||
|
int atomi;
|
||||||
|
uint atomu;
|
||||||
|
};
|
||||||
|
|
||||||
|
void atomicOpPass()
|
||||||
|
{
|
||||||
|
int origi = atomicAdd(atomi, 3);
|
||||||
|
uint origu = atomicAnd(atomu, 7u);
|
||||||
|
origi = atomicExchange(atomi, 4);
|
||||||
|
origu = atomicCompSwap(atomu, 10u, 8u);
|
||||||
|
}
|
||||||
|
|
||||||
|
buffer ssboElem01
|
||||||
|
{
|
||||||
|
int member01;
|
||||||
|
int memberArr01[2];
|
||||||
|
int memberUnsizedArr01[];
|
||||||
|
} ssboStd430Arr[2];
|
||||||
|
|
||||||
|
// if turns on EShReflectionSharedStd140SSBO, SPIR-V would be different
|
||||||
|
buffer ssboElem02
|
||||||
|
{
|
||||||
|
int member02;
|
||||||
|
int memberArr02[2];
|
||||||
|
int memberUnsizedArr02[];
|
||||||
|
} ssboSharedArr[2];
|
||||||
|
|
||||||
|
#extension GL_ARB_shader_storage_buffer_object : disable
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 v;
|
vec4 v;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -144,10 +144,10 @@ EProfile EDesktopProfile = static_cast<EProfile>(ENoProfile | ECoreProfile | ECo
|
|||||||
{ EBadProfile } };
|
{ EBadProfile } };
|
||||||
const Versioning* Es300Desktop130 = &Es300Desktop130Version[0];
|
const Versioning* Es300Desktop130 = &Es300Desktop130Version[0];
|
||||||
|
|
||||||
const Versioning Es310Desktop420Version[] = { { EEsProfile, 0, 310, 0, nullptr },
|
const Versioning Es310Desktop400Version[] = { { EEsProfile, 0, 310, 0, nullptr },
|
||||||
{ EDesktopProfile, 0, 420, 0, nullptr },
|
{ EDesktopProfile, 0, 400, 0, nullptr },
|
||||||
{ EBadProfile } };
|
{ EBadProfile } };
|
||||||
const Versioning* Es310Desktop420 = &Es310Desktop420Version[0];
|
const Versioning* Es310Desktop400 = &Es310Desktop400Version[0];
|
||||||
|
|
||||||
const Versioning Es310Desktop450Version[] = { { EEsProfile, 0, 310, 0, nullptr },
|
const Versioning Es310Desktop450Version[] = { { EEsProfile, 0, 310, 0, nullptr },
|
||||||
{ EDesktopProfile, 0, 450, 0, nullptr },
|
{ EDesktopProfile, 0, 450, 0, nullptr },
|
||||||
@ -246,14 +246,14 @@ const BuiltInFunction BaseFunctions[] = {
|
|||||||
{ EOpGreaterThanEqual, "greaterThanEqual", 2, TypeU, ClassBNS, Es300Desktop130 },
|
{ EOpGreaterThanEqual, "greaterThanEqual", 2, TypeU, ClassBNS, Es300Desktop130 },
|
||||||
{ EOpVectorEqual, "equal", 2, TypeU, ClassBNS, Es300Desktop130 },
|
{ EOpVectorEqual, "equal", 2, TypeU, ClassBNS, Es300Desktop130 },
|
||||||
{ EOpVectorNotEqual, "notEqual", 2, TypeU, ClassBNS, Es300Desktop130 },
|
{ EOpVectorNotEqual, "notEqual", 2, TypeU, ClassBNS, Es300Desktop130 },
|
||||||
{ EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
{ EOpAtomicAdd, "atomicAdd", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 },
|
||||||
{ EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
{ EOpAtomicMin, "atomicMin", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 },
|
||||||
{ EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
{ EOpAtomicMax, "atomicMax", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 },
|
||||||
{ EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
{ EOpAtomicAnd, "atomicAnd", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 },
|
||||||
{ EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
{ EOpAtomicOr, "atomicOr", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 },
|
||||||
{ EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
{ EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 },
|
||||||
{ EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
{ EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, Es310Desktop400 },
|
||||||
{ EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, Es310Desktop420 },
|
{ EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, Es310Desktop400 },
|
||||||
{ EOpMix, "mix", 3, TypeB, ClassRegular, Es310Desktop450 },
|
{ EOpMix, "mix", 3, TypeB, ClassRegular, Es310Desktop450 },
|
||||||
{ EOpMix, "mix", 3, TypeIU, ClassLB, Es310Desktop450 },
|
{ EOpMix, "mix", 3, TypeIU, ClassLB, Es310Desktop450 },
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user