Joshua Ashton
b6f2c4e003
implement immconstant 64
2020-10-21 09:02:38 +01:00
Joshua Ashton
54c14c8709
fp64 draft
2020-10-21 09:02:38 +01:00
Joshua Ashton
f0865163cb
vkd3d-shader: Hook up EMIT_THEN_CUT_STREAM
...
Still needs work to handle emitting a specific stream.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 09:02:38 +01:00
Joshua Ashton
991341094b
vkd3d-shader: Implement EMIT_THEN_CUT
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 09:02:38 +01:00
Joshua Ashton
89572c1b21
vkd3d-shader: Implement EVAL_SNAPPED
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 09:02:38 +01:00
Joshua Ashton
7d1734037b
vkd3d-shader: Implement UMUL
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 09:02:38 +01:00
Joshua Ashton
650375bf6a
vkd3d-shader: Implement UMAD
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 09:02:38 +01:00
Philip Rebohle
a64a34eb9d
vkd3d-shader: Implement coherent qualifier for UAVs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-20 14:44:55 +02:00
Joshua Ashton
36f6715b38
vkd3d-shader: Rename TEXKILL to DISCARD
...
TEXKILL is the old D3D9 style naming that comes with funky .w implications.
Calling DXBC's discard texkill is misleading.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-19 19:12:48 +02:00
Philip Rebohle
6461ab8272
vkd3d-shader: Implement bufinfo instruction on SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
89dbd9254f
vkd3d-shader: Implement atomic operations on SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
f12f15ff38
vkd3d-shader: Implement raw and structured stores to SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
2d2dc323d5
vkd3d-shader: Implement raw and structured loads from SSBOs.
2020-10-16 14:24:36 +02:00
Philip Rebohle
367cda017f
vkd3d-shader: Implement resource declarations with raw SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Hans-Kristian Arntzen
85dbb6c569
vkd3d-shader: Support StorageImageReadWithoutFormat.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-12 14:55:24 +02:00
Hans-Kristian Arntzen
e7281f22c6
vkd3d-shader: Add NonUniformEXT decoration where required.
...
It's the argument to the opcode which consumes the final resource handle
or pointer which needs to marked as NonUniformEXT. Was missing this for
sampled images and bindless UAV counters.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-30 10:57:50 +02:00
Philip Rebohle
b16276f9d6
vkd3d-shader: Support bindless UAV counters through texel buffer array.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-29 15:23:25 +02:00
Philip Rebohle
40764d82ef
vkd3d-shader: Introduce VKD3D_SHADER_BINDING_FLAG_RAW_VA.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-29 15:23:25 +02:00
Hans-Kristian Arntzen
96402f1164
vkd3d: Fix straggling warnings for MSVC.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-16 13:00:09 +02:00
Hans-Kristian Arntzen
7bccab7427
debug: Re-introduce different debug channels.
...
vkd3d-shader is currently kinda buggy and crashes when you try to trace
DXBC. This used to never be run since it was guarded by
VKD3D_SHADER_DEBUG, but with the move to a static build we merged all
debug logging under VKD3D_DEBUG. Reintroduce different debug channels in
a way that is compatible with a statically linked vkd3d.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-10 14:18:15 +02:00
Joshua Ashton
12e4014b54
vkd3d-shader: Fix incorrect assertion
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Joshua Ashton
8af31b5105
vkd3d-shader: Fix potential buffer overrun for image_operands
...
This would happen if you both sampled with both a texel offset and were LOD masked.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-29 15:26:54 +02:00
Joshua Ashton
d1b58f954e
vkd3d-shader: Fix buffer overrun for bindless constant loads
...
Previously, last_index would be 4 by the time it got to the loop if we were bindless -- which corrupted the component_ids that were being written.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-29 15:26:54 +02:00
Joshua Ashton
9564f57a69
vkd3d-shader: Fix incorrect use of static in ext arrays
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-26 15:42:41 +02:00
Joshua Ashton
ce7eba6210
vkd3d-shader: Fix incorrect type enum in global binding
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-26 15:42:41 +02:00
Joshua Ashton
0b6d460813
vkd3d-shader: Fix wrong enum for {CLIP,CULL}_DISTANCE
...
The wrong enum was used here... It was just returning the same thing
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-26 15:42:41 +02:00
Krzysztof Bogacki
c11d3eed17
vkd3d: Remove SPIRV-Tools-based debugging code
...
Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2020-06-26 13:43:08 +02:00
Joshua Ashton
da2c9a1043
vkd3d: Eliminate HAVE_SPIRV_UNIFIED1_SPIRV_H and HAVE_SPIRV_UNIFIED1_GLSL_STD_450_H
...
These are submodules now.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-23 14:55:43 +02:00
Joshua Ashton
bfd7127284
vkd3d-shader: Don't use return value semantics in void functions
...
Fixes warnings in MSVC.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-16 12:13:54 +02:00
Joshua Ashton
b9909854fe
vkd3d: Make nameless unions really nameless
...
This makes it consistent across tests and vkd3d.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-15 19:59:52 +02:00
Philip Rebohle
4cf8467b9d
vkd3d-shader: Introduce vkd3d_dxbc_compiler_find_register_info.
...
Does not generate logs when not finding a register, which reduces
some misleading spam in Anno 1800 tessellation shaders.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-15 13:32:55 +02:00
Hans-Kristian Arntzen
b3be23c066
vkd3d-shader: Only sample with the required number of components.
...
Works around a driver bug on NV which affected RE2 in particular, but
probably other titles as well.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-05-22 11:54:04 +02:00
Philip Rebohle
6478632dca
vkd3d-shader: Remove old Nvidia workaround for dref instructions.
...
This was fixed two years ago in the 396 and later 390 drivers.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
37b9875e98
vkd3d-shader: Implement sparse ld_uav_typed instruction.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
a1b2cef928
vkd3d-shader: Implement sparse ld_raw and ld_structured instructions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
7b9dbdc4ce
vkd3d-shader: Implement sparse ld instructions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
bb5e0969b2
vkd3d-shader: Implement sparse gather instructions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
1839d13ef3
vkd3d-shader: Implement sparse sample_c instructions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
45ec9b7f27
vkd3d-shader: Implement sparse sample instructions.
...
In addition to sparse feedback, these instructions also clamp the
LOD, with the minimum LOD being passed in as the last parameter.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
c09b66f404
vkd3d-shader: Implement check_access_fully_mapped instruction.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
277f731bd7
vkd3d-shader: Add helpers to deal with sparse instruction results.
...
OpImageSparse* operations return a struct containing a status value
and the sampled value, so we need to take it apart when storing results.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
26f6e59f3e
vkd3d-shader: Add helper to declare a struct once.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:13:30 +02:00
Philip Rebohle
bbfbf94c5e
vkd3d-shader: Always use private vars for arrayed builtins.
...
Fixes invalid shader code being generated in Monster Hunter World.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-16 10:30:51 +02:00
Philip Rebohle
0c2057ff68
vkd3d-shader: Support texel offset for sample_c instruction.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-16 10:30:51 +02:00
Philip Rebohle
407c740927
vkd3d: Rework vkd3d_dxbc_compiler_get_resource_binding.
...
Instead of taking the resource type, take the binding flag.
This allows us to also use this function for UAV counters.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-10 14:32:33 +02:00
Philip Rebohle
56df26d845
vkd3d-shader: Implement support for stencil export.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-06 11:53:09 +02:00
Philip Rebohle
3ee4ab56d7
vkd3d-shader: Enable SPV_EXT_shader_viewport_index_layer if necessary.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-06 11:53:09 +02:00
Philip Rebohle
c07f46f09c
vkd3d-shader: Look up existing register fpr built-in outputs.
...
Otherwise, if two built-in outputs share the same register, we
may end up multiple redundant private variables, only one of
which gets initialized, leading to uninitialized outputs.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-06 11:53:09 +02:00
Philip Rebohle
4d896bf53c
vkd3d-shader: Use correct addressing model for physical storage buffers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle
aca3e7636e
vkd3d-shader: Implement bindless UAV counter ops.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00