Commit Graph

593 Commits

Author SHA1 Message Date
Joshua Ashton 7609c5e59e vkd3d-shader: Implement 64-bit immediate constants
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Joshua Ashton 73a2ad19ea vkd3d-shader: Implement DRCP
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Joshua Ashton e3a61ebad1 vkd3d-shader: Implement DTOF, FTOD, DTOI, DTOU, ITOD and UTOD
Implement double -> other type conversions

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Joshua Ashton aff1391026 vkd3d-shader: Implement DEQ, DGE, DLT and DNE
Implement double comparisons

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Joshua Ashton cdedfd596e vkd3d-shader: Implement DMOVC
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Joshua Ashton f8646bff5a vkd3d-shader: Implement DADD, DMUL, DDIV, DMAX, DMIN, DFMA and DMOV
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Joshua Ashton a581f296ea vkd3d-shader: Handle double-related global flags
Decode and handle DOUBLE_PRECISION_FLOAT_OPS and 11_1_DOUBLE_EXTENSIONS

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Joshua Ashton ac2456b01f vkd3d-shader: Implement double data type
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Joshua Ashton 8e896cd25a vkd3d-shader: Support 64-bit constants
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-23 12:40:38 +02:00
Hans-Kristian Arntzen 16f09a0ba0 vkd3d: Do not perform any alignment analysis for SSBOs.
We cannot rely on alignment analysis since games are buggy and screw up
RAW vs structured on occasion.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-22 13:07:05 +02:00
Hans-Kristian Arntzen 50ffdb1850 vkd3d-shader: Don't warn about not finding a RAW_SSBO binding.
This is expected if host implementation does not support RAW_SSBO
alignment.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-21 14:34:37 +02:00
Joshua Ashton aadf3e15f9 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 11:49:31 +02:00
Joshua Ashton b70182420a vkd3d-shader: Implement EMIT_THEN_CUT
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 11:49:31 +02:00
Joshua Ashton 31901597d9 vkd3d-shader: Implement EVAL_SNAPPED
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 11:49:31 +02:00
Joshua Ashton 1673d14841 vkd3d-shader: Implement UMUL
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 11:49:31 +02:00
Joshua Ashton 7c693fe26f vkd3d-shader: Implement UMAD
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-21 11:49:31 +02: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
Philip Rebohle cb9775ca05 vkd3d-shader: Respect bindless flag for UAV counter bindings.
Also stores the type ID of the pointer to the UAV counter struct,
since we need to load the pointer before we can access the counter.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle 11a9ac6c19 vkd3d-shader: Emit declarations for bindless UAV counters.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Philip Rebohle 3fa194ce21 vkd3d-shader: Support nonuniform qualifier for bindless UAVs.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle fb92b7c113 vkd3d-shader: Emit bindless UAV declarations.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle 8dd73f3e45 vkd3d-shader: Explicitly pass flags to get_global_binding.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle a0c1ce4e55 vkd3d-shader: Explicitly pass image format to get_global_binding.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle 18caa8adc3 vkd3d-shader: Pass resource binding struct to get_global_binding.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle 81ee079449 vkd3d-shader: Move atomic counter declaration.
Allows us to have bindless UAVs without a special code path
for bindless UAV counters for now.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-26 12:05:47 +01:00
Philip Rebohle a9ba32a6c4 vkd3d-shader: Add option to declare bindless CBVs as SSBOs.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 14:35:35 +01:00
Philip Rebohle 5bf4b207f2 vkd3d-shader: Bound-check root constant reads.
Safety measure in case a broken app performs out-of-bounds reads.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 11:57:35 +01:00
Philip Rebohle 423bb09b46 vkd3d-shader: Unroll root constant buffers.
Fixes spec violations when we have root constant ranges not
aligned to 16 bytes.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 11:57:35 +01:00
Philip Rebohle d129e477f6 vkd3d-shader: Load constant buffer components individually.
Enables us to unroll root constant buffers. Not loading unneeded
components early may also help some drivers generate better code.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 11:57:35 +01:00
Philip Rebohle 01098e194e vkd3d-shader: Simplify vkd3d_dxbc_compiler_emit_mov.
Having a lot of special code here just makes it harder for
us to implement UBO-specific load path, not to mention that
the mov instruction itself is very rare.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-18 11:57:35 +01:00
Philip Rebohle be5cdd2e55 vkd3d-shader: Optionally declare push constant buffer as UBO.
Will be used on implementations that do not support enough
push constants to hold all root signature data.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Philip Rebohle 02e98e3d5c vkd3d-shader: Unroll descriptor table offsets.
Avoids having to use 16-byte array strides when using an
inline uniform block to store the table offsets.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Philip Rebohle 77bc640f3f vkd3d-shader: Implement dynamic UBO indexing.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-12 11:32:41 +01:00
Philip Rebohle 6a7f1b95e5 vkd3d-shader: Add global UBO binding declarations.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-12 11:32:41 +01:00
Philip Rebohle b11b95f34d vkd3d-shader: Factor out bindless resource index computation.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-12 11:32:41 +01:00
Philip Rebohle 5700b37aa4 vkd3d-shader: Work around games not declaring bindings properly.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle a7fbb728ec vkd3d-shader: Apply NonUniformEXT decorations to resources as needed.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle 1c9b07e8b3 vkd3d-shader: Scan multi-register descriptor ranges properly.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle ffaa31e1d9 vkd3d-shader: Implement bindless sampler declarations and indexing.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle 6f20fcc488 vkd3d-shader: Implement bindless resource indexing.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle 6c4a476318 vkd3d-shader: Implement bindless resource declarations.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle ade87e6c47 vkd3d-shader: Add push constants for descriptor table offsets.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle 4218009e79 vkd3d-shader: Add helpers to declare runtime arrays.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle 324da790db vkd3d-shader: Simplify UAV counter interface declaration.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-02 12:16:30 +01:00
Philip Rebohle 0689d8396d vkd3d-shader: Change the way UAV bindings are tracked.
Makes UAV-related code more readable and supports up to 64
UAV bindings, which is enough to support resource binding
tier 2.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-02 12:16:30 +01:00
Hans-Kristian Arntzen edd4c990ed vkd3d-shader: Move vkd3d_find_shader into private header.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-27 15:20:10 +01:00
Philip Rebohle 82f9f76931 vkd3d-shader: Rework SPIR-V extension enablement.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-27 10:30:34 +01:00
Philip Rebohle 7cccf5756a vkd3d-shader: Rework SPIR-V capability enablement.
We're going to need more capabilities outside the 0-63 range
going forward, so a bitmask doesn't cut it and adding extra
struct members for each capability seems excessive.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-27 10:30:34 +01:00
Hans-Kristian Arntzen 0c241ff54f vkd3d: Fix regression with UAV counters.
Need to report back actual bindings, not 0/0.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 13:00:10 +01:00
Philip Rebohle 27595a8147 vkd3d-shader: Drop support for OpenGL targets.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-26 10:18:30 +01:00
Philip Rebohle c4c9fa82b0 vkd3d-shader: Drop support for combined resource samplers.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-26 10:18:30 +01:00
Philip Rebohle c3871951ad vkd3d-shader: Factor out methods to retrieve resource binding info.
Allows us to get more detailed info about any given binding.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-26 10:18:30 +01:00
Philip Rebohle 74e706cbe3 vkd3d-shader: Introduce vkd3d_shader_descriptor_type_from_register_type helper.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-26 10:18:30 +01:00
Philip Rebohle d95762db65 vkd3d-shader: Also log register space for unmapped bindings.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-26 10:18:30 +01:00
Hans-Kristian Arntzen 93e4b6ff9b vkd3d: Deal correctly with SM 5.1 register spaces.
Resource index is found in idx[0] in SM 5.0, but idx[1] when using SM
5.1, and register space is encoded separately. An rb_tree keeps track of
the internal resource index idx[0] and can map that to space/binding as
required when emitting SPIR-V.

For this to work, we must also make UAV counters register space aware.
In earlier implementation, UAV counter mask was assumed to correlate 1:1
with register_index, which breaks on SM 5.1.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-24 12:32:29 +01:00
Hans-Kristian Arntzen 022500044f vkd3d-shader: Use correct register offset.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-12 14:15:55 +01:00
Hans-Kristian Arntzen c6fd8e442a vkd3d-shader: Fix TessFactor order for isolines.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-12 14:15:55 +01:00
Hans-Kristian Arntzen 5a7ebf7630 vkd3d-shader: Deal with reading packed TessFactor in DS.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-12 14:15:55 +01:00