Commit Graph

419 Commits

Author SHA1 Message Date
bda1a93aa3 [*] Fix SM3.0 combined sampler register offsets 2024-08-23 15:42:06 +01:00
3c4e9a931a [+] Dummy SM3.0 MSAA intrins 2024-08-23 15:42:05 +01:00
234f629e66 [*] What the actual fuck is going on with this formatting? Just use spaces 2024-08-23 15:32:21 +01:00
aea4e49f71 [*] SM3.0 fixes 2024-08-17 16:02:24 +01:00
Hans-Kristian Arntzen
1de3f8c1f2 HLSL: Implement SM 6.8 BaseVertex/BaseInstance. 2024-07-15 13:22:11 +02:00
Hans-Kristian Arntzen
d1285ec08e GLSL: Use SPIR-V intrinsics for N{Min,Max,Clamp}.
When targeting Vulkan semantics, we should emit code that is actually
readable.

Also, make sure to use plain F{Min,Max,Clamp} on HLSL. HLSL has
NaN-aware semantics by default.
2024-05-21 17:56:42 +02:00
Hans-Kristian Arntzen
8b3aa21944 Pass down orig_id to type_to_array_glsl as well.
Allows UBO/SSBO resources in MSL to get the layout-derived size as well.
2024-05-21 15:43:04 +02:00
Hans-Kristian Arntzen
833c5936b0 Various nit fixes and improvements from review. 2023-12-07 14:31:36 +01:00
Hugo Devillers
950cad5913 Added an Op field to SPIRType
This field allows telling what the 'head' of the type is, without having to look at parent types.
2023-11-30 12:28:50 +01:00
Hans-Kristian Arntzen
0bedb69b02 HLSL: Declare sample mask array with proper module type.
GLSL uses int[] and HLSL emits uint[], and to deal properly
with array copies where we lose ability to rewrite arithmetic types,
we need to declare with proper type.
2023-10-23 12:29:25 +02:00
Laura Hermanns
5d7ee6ad11 Fix declaration of gl_SampleMaskIn[1] in HLSL backend. 2023-10-17 09:11:09 -04:00
Try
967ad0bb4d Fix unroll, when storing to pointer to array
#fixed #2196
2023-09-28 23:58:51 +02:00
Hans-Kristian Arntzen
a065c3b48a Merge branch 'dx12-mesh-flip-y' of https://github.com/Try/SPIRV-Cross into pr-2168 2023-07-03 13:55:02 +02:00
Try
68376504a0 track access to meshlet position.y, via SPIRExpression 2023-07-01 15:49:35 +02:00
Hans-Kristian Arntzen
aafcc207ea HLSL: Add explicit error for floating point atomics. 2023-06-26 12:41:36 +02:00
Try
85a564202f meshlet flip-y support 2023-06-18 16:06:31 +02:00
Laura Hermanns
bcb6243798 HLSL: Add support to preserve (RW)StructuredBuffer resources. 2023-05-12 14:41:00 -04:00
Laura Hermanns
b19aa51e32 HLSL: Don't restrict SV_RenderTargetArrayIndex to GS and MS. 2023-04-25 09:33:40 -04:00
手机用户Xh2vb13n
d1ac6524d3
HLSL: support Texture2D::GatherCmp function
refer to https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/sm5-object-texture2d-gathercmp
2023-04-10 16:55:38 +08:00
Hans-Kristian Arntzen
09e60d74f6
Merge pull request #2124 from Try/hlsl-task-shader
HLSL: Add task(amplification) shader support
2023-03-22 12:36:47 +01:00
Try
cb45e4be6f cleanup 2023-03-21 21:11:07 +01:00
Try
4a5d21bf1c virtual emit_mesh_tasks 2023-03-21 21:08:59 +01:00
Try
7ac2c84ff3 code-style 2023-03-18 19:50:28 +01:00
Try
dd8839c6f9 task shader initial 2023-03-18 17:20:16 +01:00
skkkksdkfak
f086cd021e Fix argument for CommitProceduralPrimitiveHit. 2023-02-24 11:00:41 +01:00
Ravbug
36691f902c Check for SM < 6.7 2023-02-02 12:42:17 -05:00
Hans-Kristian Arntzen
86a985f28c
Merge pull request #2093 from rdb/emulate-unsupported-hyperbolic-funcs
GLSL/HLSL: Add emulated fallbacks for hyperbolic math functions
2023-01-27 12:15:28 +01:00
rdb
53974b4fae GLSL/HLSL: Add emulated fallbacks for sinh/cosh/tanh/asinh/acosh/atanh
The inverse hyperbolic functions are not supported in HLSL, and none of them are supported in legacy GLSL.
2023-01-26 19:40:42 +01:00
rdb
d10044b23e GLSL: Add support for modf, isnan and isinf in legacy GLSL 2023-01-26 19:14:25 +01:00
rdb
26da9c58a6 HLSL: Support PointSize output in vertex shader in SM 3.0 2023-01-17 23:42:04 +01:00
rdb
4ba13e0c1a GLSL/HLSL: Add legacy handling for int vertex attributes 2023-01-14 18:57:24 +01:00
Chip Davis
5547b25afe Interleave undef values with constants and types.
Undef values may be of struct type and may be used in constants.
Therefore, they must be interleaved with constants and types.

Fixes the rest of the Vulkan CTS test
`dEQP-VK.spirv_assembly.instruction.compute.opundef.undefined_spec_constant_composite`.

(Please excuse the churn in the reference output; it's an inevitable
result of this change.)
2022-11-20 02:08:37 -08:00
Hans-Kristian Arntzen
b606e4f752 HLSL: Fix test for non-block per-primitive IO.
Force gl_in_out path for HLSL as well when mesh shaders are used.
2022-11-02 13:41:32 +01:00
Hans-Kristian Arntzen
ebf779dcfb HLSL: Do not support ClipCull size > 4 in mesh shaders.
The array mechanism breaks DXC which needs to observe that all
components have been written.

Uninitialized outputs will be undefined. Resort to simple vector
instead.
2022-11-02 13:34:11 +01:00
Hans-Kristian Arntzen
3a066cd733 HLSL: Handle case where PerVertex block is not used. 2022-11-02 13:07:32 +01:00
Hans-Kristian Arntzen
e418266d25 HLSL: Some cleanups and fixes in analyze_meshlet_writes. 2022-11-02 12:56:04 +01:00
Hans-Kristian Arntzen
892f65b3a6 HLSL: Fix some warnings from review. 2022-11-02 12:15:10 +01:00
Hans-Kristian Arntzen
a4d5c0c4a5 HLSL: Fix-up some style issues from review. 2022-11-02 12:15:10 +01:00
Try
80146a20da HLSL: Implement VK_EXT_mesh_shader 2022-11-02 11:48:58 +01:00
Hans-Kristian Arntzen
4de9d6c2b6 MSL: Handle implicit integer promotion rules.
MSL inherits the behavior of C where arithmetic on small types are
implicitly converted to int. SPIR-V does not have this behavior, so make
sure that arithmetic results are handled correctly.
2022-10-31 13:33:46 +01:00
Hans-Kristian Arntzen
b5386e3ea9 HLSL: Improve support for VertexInfo aux struct.
Add concept of explicit bindings for aux structs and allows query if
these aux structs are required.
2022-10-03 13:31:27 +02:00
Hans-Kristian Arntzen
095e9e5cee
Merge pull request #1982 from RandomShaper/hlsl_subgroup_scan
HLSL: Implement GroupOperation(Inclusive/Exclusive)Scan.
2022-07-22 14:44:10 +02:00
Pedro J. Estébanez
1fe470b199 HLSL: Implement GroupOperation(Inclusive/Exclusive)Scan. 2022-07-22 13:39:37 +02:00
Hans-Kristian Arntzen
06ca9accd7 HLSL: Add option to emit entry point name 1:1 instead of main().
MSL backend supports emitting custom name, and there's no reason for
HLSL to not support that as well, but we have to make it an option to
not break existing users.
2022-07-22 12:04:33 +02:00
Pedro J. Estébanez
d8c5e39436 HLSL: Implement bit casts between Half and UShort. 2022-06-15 19:19:04 +02:00
iwubcode
a6976d596a HLSL: fix BuiltInLayer to emit semantic 'SV_RenderTargetArrayIndex' instead of 'SV_RenderTargetIndex' 2022-05-21 00:52:23 -05:00
Laura Hermanns
65431446f4 HLSL: Add missing BuiltInLayer to HLSL backend. 2022-04-28 16:44:34 -04:00
Hans-Kristian Arntzen
10a7631d50 HLSL: Add more comprehensible reserved identifier list. 2022-04-28 14:56:43 +02:00
Pedro J. Estébanez
2ea1c9b642 HLSL: Implement ViewIndex. 2022-04-15 10:42:52 +02:00
skksdkfak
54c00b69a4 Translate gl_PrimitiveID to SV_PrimitiveID. 2022-04-07 12:56:53 +03:00