Commit Graph

748 Commits

Author SHA1 Message Date
rdb
031cbaa5a2 GLSL: Require GL_ARB_draw_instanced for gl_InstanceID in GLSL < 1.40 2020-06-12 22:42:26 +02:00
Hans-Kristian Arntzen
f383cc98f2 GLSL: Handle the rest of GL_ARB_sparse_texture_clamp.
Missed these in initial sparse implementation.
2020-06-08 13:40:11 +02:00
Hans-Kristian Arntzen
857e1c445c GLSL: Support uint code for sparse residency query. 2020-06-08 11:40:02 +02:00
Hans-Kristian Arntzen
cbe0cca73b Refactor texture fetch function generation.
Use structs instead of a million bool/uint32_t arguments passed on stack.
2020-06-08 10:17:40 +02:00
Hans-Kristian Arntzen
275974e062 GLSL: Implement sparse feedback. 2020-06-04 15:50:28 +02:00
Hans-Kristian Arntzen
d31bc0247e Do not mask writes to remapped variables in all cases.
If they don't have a static expression we should still write to it.
2020-05-28 11:49:28 +02:00
Hans-Kristian Arntzen
ef247e75ec GLSL: Improve support for GL_ARB_shader_draw_parameters in desktop GLSL.
Opt-in to using the extension to support gl_InstanceIndex.
2020-05-22 12:53:34 +02:00
Hans-Kristian Arntzen
66ec3e3e54 GLSL: Support ray payloads and hit attributes declared as Block. 2020-05-20 15:07:47 +02:00
Hans-Kristian Arntzen
271ad33380 GLSL: Add some more focused RT test shaders. 2020-05-20 14:11:28 +02:00
Hans-Kristian Arntzen
86380acf4d Support gl_InstanceID in RT shaders. 2020-05-08 13:39:43 +02:00
Hans-Kristian Arntzen
9b7140e2ba Implement OpAtomicLoad/OpAtomicStore.
Need some emulation on GLSL/HLSL, fix bug with atomic store on MSL.
2020-04-27 12:11:46 +02:00
Hans-Kristian Arntzen
5e5d1c27ce GLSL: Support f16x2 <-> f32 bitcast.
There is no native formulation, so introduce a concept of a "complex"
bitcast to handle odd-ball cases which have no native unary operation.
2020-04-21 23:27:33 +02:00
Hans-Kristian Arntzen
c58839bfd4
Merge pull request #1336 from KhronosGroup/fix-1333
Handle RayQueryKHR type.
2020-04-21 16:31:22 +02:00
Hans-Kristian Arntzen
bdb343ea06 Be a bit more careful what nonuniform state is propagated. 2020-04-21 14:48:44 +02:00
Hans-Kristian Arntzen
6b0e558169 Handle RayQueryKHR type.
Do not error out in parsing in shaders which use ray queries.
2020-04-21 14:25:18 +02:00
Hans-Kristian Arntzen
b2e934b53f
Merge pull request #1328 from devshgraphicsprogramming/patch-1
Try and solve issue #1327
2020-04-21 14:06:27 +02:00
Hans-Kristian Arntzen
5cb0f0a640
Merge pull request #1335 from KhronosGroup/fix-1325
GLSL/HLSL: Implement unpack/pack2x32Uint
2020-04-21 14:05:12 +02:00
Mateusz Kielan
127224d816 Fix issue #1327
Drop the nonuniform_qualifier in GLSL downcompile NV_gpu_shader5 supports divergent indexing transparently, but obviously runtime sized descriptor arrays are not supported by anything in OpenGL.
2020-04-21 13:29:30 +02:00
Asuka
55dfbead2f GLSL/HLSL: Support packUint2x32 and unpackUint2x32 2020-04-21 11:34:12 +02:00
Hans-Kristian Arntzen
f8592ecdfc MSL: Deal correctly with initializers on Private variables.
Do not attempt to defer declaration. It would happen to work in most
cases, but the edge case is where the first thing that happens to a
variable is being OpStore'd into.
2020-04-21 11:20:49 +02:00
Hans-Kristian Arntzen
c7b75a8fe6 MSL: Do not use base expression with PhysicalTypeID OpCompositeExtract.
Similar reasoning as packed expressions.
2020-04-07 18:25:44 +02:00
Hans-Kristian Arntzen
941cceedb4 Expose a query if samplers or images are comparison resources. 2020-04-03 17:43:42 +02:00
Hans-Kristian Arntzen
b691b7d1e3 Do not add NonWritable/NonReadable decorations for regular images. 2020-04-03 17:43:42 +02:00
Hans-Kristian Arntzen
b8905bbd95 Add support for forcefully zero-initialized variables.
Useful to better support certain platforms which require all variables
to be initialized to something.
2020-03-26 13:38:27 +01:00
Hans-Kristian Arntzen
04e877df12 GLSL: Implement GL_EXT_shader_framebuffer_fetch. 2020-03-19 14:53:39 +01:00
Hans-Kristian Arntzen
c2655ab291 Run format_all.sh. 2020-03-19 14:22:49 +01:00
Hans-Kristian Arntzen
05004a57ea GLSL/HLSL: Fix nonuniform qualifier for SSBO atomics. 2020-03-19 12:05:27 +01:00
Hans-Kristian Arntzen
a3d3c80dd7 GLSL/HLSL: Implement nonuniform qualifier for image atomics. 2020-03-19 11:35:29 +01:00
Hans-Kristian Arntzen
01968c4486 Add option to disable storage image qualifier deduction. 2020-03-04 16:42:31 +01:00
Hans-Kristian Arntzen
30343f3e95 MSL: Reintroduce workaround for constant arrays being passed by value. 2020-02-24 13:22:52 +01:00
Hans-Kristian Arntzen
c9d4f9cd74 MSL: Add a workaround path to force native arrays for everything. 2020-02-24 12:47:14 +01:00
Hans-Kristian Arntzen
dfffbb1cf3 Compile fix on older compilers. 2020-01-27 15:56:47 +01:00
Hans-Kristian Arntzen
655312cb47 GLSL: Support GL_ARB_enchanced_layouts for XFB. 2020-01-27 13:11:38 +01:00
Hans-Kristian Arntzen
f9818f0804 Update license headers to 2020. 2020-01-16 15:24:37 +01:00
Hans-Kristian Arntzen
f79c1e2fed Deal with illegal names in types as well.
- Fixes issue with clip_distance flattening in MSL where member to
  flatten from would come from to_member_name, where it should have used
  the builtin name directly. This member name was modified by this patch
  and broke clip distance test shaders.

- Some cleanups with ir.meta, use ir.find_meta instead to not create
  unnecessary hashmap nodes.
2020-01-16 10:34:49 +01:00
Hans-Kristian Arntzen
55fe6050fe GLSL: Implement geometry shader passthrough extension. 2020-01-15 16:18:29 +01:00
Hans-Kristian Arntzen
5253da9e63 GLSL: Deal with sign in subgroup Min/Max operations. 2020-01-09 12:35:14 +01:00
Hans-Kristian Arntzen
c256525c7b Run format_all.sh. 2020-01-08 14:27:34 +01:00
Hans-Kristian Arntzen
151ff1e870 HLSL: Implement stores for complex composites in ByteAddressBuffers. 2020-01-08 14:17:28 +01:00
Hans-Kristian Arntzen
ca9398c122 HLSL: Support loading complex composites from ByteAddressBuffer. 2020-01-08 13:05:56 +01:00
Hans-Kristian Arntzen
b522b409ae Run format_all.sh. 2020-01-08 10:48:30 +01:00
Hans-Kristian Arntzen
93f3265fe0 MSL: Deal with packing vectors for vertex input/fragment output. 2020-01-07 14:14:31 +01:00
Hans-Kristian Arntzen
91e917b8ca Fix Clang warnings. 2020-01-06 13:40:33 +01:00
Hans-Kristian Arntzen
cf725b4c63 Go through access chain path for OpCopyLogical.
We will need to deal with packing/unpacking data when copying from/to
complex types in MSL.
2020-01-06 12:29:44 +01:00
Hans-Kristian Arntzen
9012a39b60 Basic implementation of OpCopyLogical. 2020-01-06 11:47:26 +01:00
Hans-Kristian Arntzen
7c1e34f3b9 GLSL: Fix array of input patch variables.
Hoist out the hack to make array sizes unsized to a place where we can
differentiate patch variables from control point variables.
2019-12-10 12:02:12 +01:00
Hans-Kristian Arntzen
d7e612f91a GLSL: Fix EmitStreamVertex/Primitive. 2019-12-09 10:49:48 +01:00
Hans-Kristian Arntzen
00d5c78447 Remove obsolete use of AtomicCounterMemoryMask. 2019-12-04 15:30:07 +01:00
Hans-Kristian Arntzen
67b2991451 Don't emit memoryBarrierShared() in workgroup control barriers.
This is implied in both GL and GLES. Emitting memoryBarrierShared() was
based on earlier confusion in the spec which has since been fixed and
clarified.
2019-12-04 15:06:19 +01:00
Hans-Kristian Arntzen
4edb99d476 Fix sign handling for S/UToF. 2019-11-28 13:55:28 +01:00