mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-03 07:45:30 +08:00
qt 6.6.0 clean
This commit is contained in:
@ -15,3 +15,14 @@ qsb --glsl 320es,410 --msl 12 --msltess simpletess.vert -o simpletess.vert.qsb
|
||||
qsb --glsl 320es,410 --msl 12 --tess-mode triangles simpletess.tesc -o simpletess.tesc.qsb
|
||||
qsb --glsl 320es,410 --msl 12 --tess-vertex-count 3 simpletess.tese -o simpletess.tese.qsb
|
||||
qsb --glsl 320es,410 --msl 12 simpletess.frag -o simpletess.frag.qsb
|
||||
qsb --glsl 310es,430 --msl 12 --hlsl 50 storagebuffer.comp -o storagebuffer.comp.qsb
|
||||
qsb --glsl 320es,430 --msl 12 --msltess storagebuffer_runtime.vert -o storagebuffer_runtime.vert.qsb
|
||||
qsb --glsl 320es,430 --msl 12 --tess-mode triangles storagebuffer_runtime.tesc -o storagebuffer_runtime.tesc.qsb
|
||||
qsb --glsl 320es,430 --msl 12 --tess-vertex-count 3 storagebuffer_runtime.tese -o storagebuffer_runtime.tese.qsb
|
||||
qsb --glsl 320es,430 --msl 12 storagebuffer_runtime.frag -o storagebuffer_runtime.frag.qsb
|
||||
qsb --glsl 320es,430 --hlsl 50 -c --msl 12 storagebuffer_runtime.comp -o storagebuffer_runtime.comp.qsb
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o half.vert.qsb half.vert
|
||||
qsb --glsl 320es,430 --msl 21 --msltess tessinterfaceblocks.vert -o tessinterfaceblocks.vert.qsb
|
||||
qsb --glsl 320es,430 --msl 21 --tess-mode triangles tessinterfaceblocks.tesc -o tessinterfaceblocks.tesc.qsb
|
||||
qsb --glsl 320es,430 --msl 21 --tess-vertex-count 3 tessinterfaceblocks.tese -o tessinterfaceblocks.tese.qsb
|
||||
qsb --glsl 320es,430 --msl 21 simpletess.frag -o tessinterfaceblocks.frag.qsb
|
||||
|
10
tests/auto/gui/rhi/qrhi/data/half.vert
Normal file
10
tests/auto/gui/rhi/qrhi/data/half.vert
Normal file
@ -0,0 +1,10 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec3 position;
|
||||
|
||||
out gl_PerVertex { vec4 gl_Position; };
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(position, 1.0);
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/half.vert.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/half.vert.qsb
Normal file
Binary file not shown.
28
tests/auto/gui/rhi/qrhi/data/storagebuffer.comp
Normal file
28
tests/auto/gui/rhi/qrhi/data/storagebuffer.comp
Normal file
@ -0,0 +1,28 @@
|
||||
#version 430
|
||||
layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
|
||||
layout (binding = 0, std430) buffer toGpu
|
||||
{
|
||||
float _float;
|
||||
vec2 _vec2;
|
||||
vec3 _vec3;
|
||||
vec4 _vec4;
|
||||
};
|
||||
|
||||
layout (binding = 1, std140) buffer fromGpu
|
||||
{
|
||||
int _int;
|
||||
ivec2 _ivec2;
|
||||
ivec3 _ivec3;
|
||||
ivec4 _ivec4;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
_int = int(_float);
|
||||
_ivec2 = ivec2(_vec2);
|
||||
_ivec3 = ivec3(_vec3);
|
||||
_ivec4 = ivec4(_vec4);
|
||||
}
|
||||
|
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer.comp.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer.comp.qsb
Normal file
Binary file not shown.
25
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp
Normal file
25
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp
Normal file
@ -0,0 +1,25 @@
|
||||
#version 430
|
||||
|
||||
layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
layout (binding = 0, std430) buffer toGpu
|
||||
{
|
||||
float _float[];
|
||||
};
|
||||
|
||||
|
||||
layout (binding = 1, std140) buffer fromGpu
|
||||
{
|
||||
int _int[];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
int length = min(_float.length(), _int.length());
|
||||
|
||||
for (int i = 0; i < length; ++i)
|
||||
_int[i] = int(_float[i]);
|
||||
|
||||
}
|
||||
|
||||
|
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.comp.qsb
Normal file
Binary file not shown.
33
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag
Normal file
33
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag
Normal file
@ -0,0 +1,33 @@
|
||||
#version 450
|
||||
|
||||
layout (location = 0) out vec4 fragColor;
|
||||
|
||||
layout (std430, binding = 1) readonly buffer ssboG
|
||||
{
|
||||
float g[];
|
||||
};
|
||||
|
||||
layout (std430, binding = 2) readonly buffer ssboB
|
||||
{
|
||||
float b[];
|
||||
};
|
||||
|
||||
layout (std430, binding = 6) readonly buffer ssboR
|
||||
{
|
||||
float r[];
|
||||
};
|
||||
|
||||
layout (std430, binding = 3) readonly buffer ssbo3
|
||||
{
|
||||
vec4 _vec4;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
// some OpenGL implementations will optimize out the buffer variables if we don't use them
|
||||
// resulting in a .length() of 0.
|
||||
float a = (r[0]+g[0]+b[0])>0?1:1;
|
||||
|
||||
fragColor = a * vec4(r.length(), g.length(), b.length(), 255)/vec4(255);
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.frag.qsb
Normal file
Binary file not shown.
42
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc
Normal file
42
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc
Normal file
@ -0,0 +1,42 @@
|
||||
#version 450
|
||||
|
||||
layout(vertices = 3) out;
|
||||
|
||||
|
||||
layout (std430, binding = 7) readonly buffer ssbo7
|
||||
{
|
||||
float float7[];
|
||||
};
|
||||
|
||||
layout (std430, binding = 8) readonly buffer ssbo8
|
||||
{
|
||||
float float8[];
|
||||
};
|
||||
|
||||
layout (std430, binding = 9) readonly buffer ssbo9
|
||||
{
|
||||
float float9[];
|
||||
};
|
||||
|
||||
layout (std430, binding = 10) readonly buffer ssbo10
|
||||
{
|
||||
float float10[];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
// some OpenGL implementations will optimize out the buffer variables if we don't use them
|
||||
// resulting in a .length() of 0
|
||||
float a = float7[0] == 0 && float8[0] == 0 && float9[0] == 0 && float10[0] == 0 ? 1 : 1;
|
||||
|
||||
if (gl_InvocationID == 0) {
|
||||
gl_TessLevelOuter[0] = float7.length() * a;
|
||||
gl_TessLevelOuter[1] = float8.length() * a;
|
||||
gl_TessLevelOuter[2] = float9.length() * a;
|
||||
gl_TessLevelInner[0] = float10.length() * a;
|
||||
}
|
||||
|
||||
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
|
||||
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tesc.qsb
Normal file
Binary file not shown.
39
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese
Normal file
39
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese
Normal file
@ -0,0 +1,39 @@
|
||||
#version 450
|
||||
|
||||
layout(triangles, fractional_odd_spacing, ccw) in;
|
||||
|
||||
layout (std140, binding = 6) uniform unused0
|
||||
{
|
||||
int unused;
|
||||
}u0;
|
||||
|
||||
layout (binding = 0) uniform u
|
||||
{
|
||||
mat4 matrix;
|
||||
};
|
||||
|
||||
layout (std430, binding = 5) readonly buffer ssbo5
|
||||
{
|
||||
float _float[];
|
||||
};
|
||||
|
||||
layout (std430, binding = 8) readonly buffer ssbo8
|
||||
{
|
||||
float float8[];
|
||||
};
|
||||
|
||||
layout (std430, binding = 1) readonly buffer unused1
|
||||
{
|
||||
int unused[];
|
||||
}u1;
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
// some OpenGL implementations will optimize out the buffer variables if we don't use them
|
||||
// resulting in a .length() of 0
|
||||
float a = _float[0] == 0 && float8[0] == 1 ? 1 : 1;
|
||||
|
||||
if(_float.length() == 64)
|
||||
gl_Position = a * matrix * ((gl_TessCoord.x * gl_in[0].gl_Position) + (gl_TessCoord.y * gl_in[1].gl_Position) + (gl_TessCoord.z * gl_in[2].gl_Position)) * (float8.length()==2?1:0);
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.tese.qsb
Normal file
Binary file not shown.
48
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert
Normal file
48
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert
Normal file
@ -0,0 +1,48 @@
|
||||
#version 450
|
||||
|
||||
layout (location = 0) in vec3 position;
|
||||
|
||||
layout (std140, binding = 6) uniform unused0
|
||||
{
|
||||
int unused;
|
||||
}u0;
|
||||
|
||||
layout (binding = 0) uniform u
|
||||
{
|
||||
mat4 matrix;
|
||||
};
|
||||
|
||||
layout (std430, binding = 5) readonly buffer ssbo5
|
||||
{
|
||||
float _float[];
|
||||
};
|
||||
|
||||
layout (std140, binding = 3) readonly buffer ssbo3
|
||||
{
|
||||
vec4 _vec4;
|
||||
};
|
||||
|
||||
layout (std430, binding = 4) readonly buffer ssbo1
|
||||
{
|
||||
bool _bool[];
|
||||
};
|
||||
|
||||
layout (std430, binding = 1) readonly buffer unused1
|
||||
{
|
||||
int unused[];
|
||||
}u1;
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
// some OpenGL implementations will optimize out the buffer variables if we don't use them
|
||||
// resulting in a .length() of 0
|
||||
float a = _float[0] == 0 && _bool[0] ? 1 : 1;
|
||||
|
||||
gl_Position = vec4(0);
|
||||
|
||||
if(_bool.length() == 32)
|
||||
gl_Position = a * matrix * vec4(position*_vec4.xyz, _float.length() == 64 ? 1.0 : 0.0);
|
||||
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/storagebuffer_runtime.vert.qsb
Normal file
Binary file not shown.
BIN
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.frag.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.frag.qsb
Normal file
Binary file not shown.
56
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc
Normal file
56
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc
Normal file
@ -0,0 +1,56 @@
|
||||
#version 440
|
||||
|
||||
layout(vertices = 3) out;
|
||||
|
||||
layout(location = 4) in VertOut
|
||||
{
|
||||
vec3 v_color;
|
||||
int a;
|
||||
float b;
|
||||
}vOut[];
|
||||
|
||||
layout(location = 5) out TescOutA {
|
||||
vec3 color;
|
||||
int id;
|
||||
}tcOutA[];
|
||||
|
||||
layout(location = 10) out TescOutB {
|
||||
vec2 some;
|
||||
int other[3];
|
||||
vec3 variables;
|
||||
}tcOutB[];
|
||||
|
||||
layout(location = 2) patch out TescOutC {
|
||||
vec3 stuff;
|
||||
float more_stuff;
|
||||
}tcOutC;
|
||||
|
||||
void main()
|
||||
{
|
||||
// tesc builtin outputs
|
||||
gl_TessLevelOuter[0] = 1.0;
|
||||
gl_TessLevelOuter[1] = 2.0;
|
||||
gl_TessLevelOuter[2] = 3.0;
|
||||
gl_TessLevelOuter[3] = 4.0;
|
||||
gl_TessLevelInner[0] = 5.0;
|
||||
gl_TessLevelInner[1] = 6.0;
|
||||
|
||||
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
|
||||
gl_out[gl_InvocationID].gl_PointSize = 10 + gl_InvocationID;
|
||||
gl_out[gl_InvocationID].gl_ClipDistance[0] = 20.0 + gl_InvocationID;
|
||||
gl_out[gl_InvocationID].gl_ClipDistance[1] = 40.0 + gl_InvocationID;
|
||||
gl_out[gl_InvocationID].gl_ClipDistance[2] = 60.0 + gl_InvocationID;
|
||||
gl_out[gl_InvocationID].gl_ClipDistance[3] = 80.0 + gl_InvocationID;
|
||||
gl_out[gl_InvocationID].gl_ClipDistance[4] = 100.0 + gl_InvocationID;
|
||||
|
||||
// outputs
|
||||
tcOutA[gl_InvocationID].color = vOut[gl_InvocationID].v_color;
|
||||
tcOutA[gl_InvocationID].id = gl_InvocationID + 91;
|
||||
tcOutB[gl_InvocationID].some = vec2(gl_InvocationID, vOut[gl_InvocationID].a);
|
||||
tcOutB[gl_InvocationID].other[0] = gl_PrimitiveID + 10;
|
||||
tcOutB[gl_InvocationID].other[1] = gl_PrimitiveID + 20;
|
||||
tcOutB[gl_InvocationID].other[2] = gl_PrimitiveID + 30;
|
||||
tcOutB[gl_InvocationID].variables = vec3(3.0f, vOut[gl_InvocationID].b, 17.0f);
|
||||
tcOutC.stuff = vec3(1.0, 2.0, 3.0);
|
||||
tcOutC.more_stuff = 4.0;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tesc.qsb
Normal file
Binary file not shown.
96
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese
Normal file
96
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese
Normal file
@ -0,0 +1,96 @@
|
||||
#version 440
|
||||
|
||||
layout(triangles, fractional_odd_spacing, ccw) in;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 mvp;
|
||||
};
|
||||
|
||||
layout(location = 5) in TescOutA {
|
||||
vec3 color;
|
||||
int id;
|
||||
}tcOutA[];
|
||||
|
||||
layout(location = 10) in TescOutB {
|
||||
vec2 some;
|
||||
int other[3];
|
||||
vec3 variables;
|
||||
}tcOutB[];
|
||||
|
||||
layout(location = 2) patch in TescOutC {
|
||||
vec3 stuff;
|
||||
float more_stuff;
|
||||
}tcOutC;
|
||||
|
||||
layout(location = 0) out vec3 outColor;
|
||||
|
||||
struct A {
|
||||
vec3 color;
|
||||
int id;
|
||||
};
|
||||
|
||||
struct B {
|
||||
vec2 some;
|
||||
int other[3];
|
||||
vec3 variables;
|
||||
};
|
||||
|
||||
struct C {
|
||||
vec3 stuff;
|
||||
float more_stuff;
|
||||
};
|
||||
|
||||
struct Element {
|
||||
A a[3];
|
||||
B b[3];
|
||||
C c;
|
||||
vec4 tesslevelOuter;
|
||||
vec2 tessLevelInner;
|
||||
float pointSize[3];
|
||||
float clipDistance[3][5];
|
||||
vec3 tessCoord;
|
||||
int patchVerticesIn;
|
||||
int primitiveID;
|
||||
};
|
||||
|
||||
layout(std430, binding = 1) buffer result {
|
||||
int count;
|
||||
Element elements[];
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = mvp * ((gl_TessCoord.x * gl_in[0].gl_Position) + (gl_TessCoord.y * gl_in[1].gl_Position) + (gl_TessCoord.z * gl_in[2].gl_Position));
|
||||
outColor = gl_TessCoord.x * tcOutA[0].color + gl_TessCoord.y * tcOutA[1].color + gl_TessCoord.z * tcOutA[2].color;
|
||||
|
||||
count = 1;
|
||||
|
||||
elements[gl_PrimitiveID].c.stuff = tcOutC.stuff;
|
||||
elements[gl_PrimitiveID].c.more_stuff = tcOutC.more_stuff;
|
||||
elements[gl_PrimitiveID].tesslevelOuter = vec4(gl_TessLevelOuter[0], gl_TessLevelOuter[1], gl_TessLevelOuter[2], gl_TessLevelOuter[3]);
|
||||
elements[gl_PrimitiveID].tessLevelInner = vec2(gl_TessLevelInner[0], gl_TessLevelInner[1]);
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
|
||||
elements[gl_PrimitiveID].a[i].color = tcOutA[i].color;
|
||||
elements[gl_PrimitiveID].a[i].id = tcOutA[i].id;
|
||||
|
||||
elements[gl_PrimitiveID].b[i].some = tcOutB[i].some;
|
||||
elements[gl_PrimitiveID].b[i].other = tcOutB[i].other;
|
||||
elements[gl_PrimitiveID].b[i].variables = tcOutB[i].variables;
|
||||
|
||||
elements[gl_PrimitiveID].pointSize[i] = gl_in[i].gl_PointSize;
|
||||
elements[gl_PrimitiveID].clipDistance[i][0] = gl_in[i].gl_ClipDistance[0];
|
||||
elements[gl_PrimitiveID].clipDistance[i][1] = gl_in[i].gl_ClipDistance[1];
|
||||
elements[gl_PrimitiveID].clipDistance[i][2] = gl_in[i].gl_ClipDistance[2];
|
||||
elements[gl_PrimitiveID].clipDistance[i][3] = gl_in[i].gl_ClipDistance[3];
|
||||
elements[gl_PrimitiveID].clipDistance[i][4] = gl_in[i].gl_ClipDistance[4];
|
||||
|
||||
}
|
||||
|
||||
elements[gl_PrimitiveID].tessCoord = gl_TessCoord;
|
||||
elements[gl_PrimitiveID].patchVerticesIn = 3;
|
||||
elements[gl_PrimitiveID].primitiveID = gl_PrimitiveID;
|
||||
|
||||
}
|
||||
|
BIN
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.tese.qsb
Normal file
Binary file not shown.
20
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert
Normal file
20
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert
Normal file
@ -0,0 +1,20 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec3 position;
|
||||
layout(location = 1) in vec3 color;
|
||||
|
||||
|
||||
layout(location = 4) out VertOut
|
||||
{
|
||||
vec3 v_color;
|
||||
int a;
|
||||
float b;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(position, 1.0);
|
||||
v_color = color;
|
||||
a = gl_VertexIndex;
|
||||
b = 13.0f + gl_VertexIndex;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/tessinterfaceblocks.vert.qsb
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -5,8 +5,8 @@
|
||||
#include <QFile>
|
||||
#include <QBuffer>
|
||||
|
||||
#include <QtGui/private/qshaderdescription_p_p.h>
|
||||
#include <QtGui/private/qshader_p_p.h>
|
||||
#include <private/qshaderdescription_p.h>
|
||||
#include <private/qshader_p.h>
|
||||
|
||||
class tst_QShader : public QObject
|
||||
{
|
||||
|
Reference in New Issue
Block a user