Commit Graph

1088 Commits

Author SHA1 Message Date
Józef Kucia
bcd60c21ca vkd3d-shader: Do not enable SpvCapabilityUniformBufferArrayDynamicIndexing.
This capability is for dynamic indexing *arrays* of uniform buffers.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:41:28 +01:00
Józef Kucia
27b4779930 vkd3d-shader: Check shader visibility for combined samplers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:41:25 +01:00
Józef Kucia
3a3bc772b1 vkd3d: Ignore redundant SetPipelineState() calls.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:41:23 +01:00
Józef Kucia
f3c9229cc3 vkd3d: Ignore redundant IASetPrimitiveTopology() calls.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 18:41:20 +01:00
Józef Kucia
e9574e1f39 vkd3d: Validate box in d3d12_command_list_CopyTextureRegion().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 16:53:56 +01:00
Józef Kucia
a4d02360ed vkd3d: Fix copying texture regions from textures to buffers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 16:53:52 +01:00
Józef Kucia
cd6ddd2418 vkd3d: Do not ignore "src_box" in d3d12_command_list_CopyTextureRegion().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 16:53:48 +01:00
Józef Kucia
f523c642a4 vkd3d: Remove FIXME() from vkd3d_get_format().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:53:40 +01:00
Józef Kucia
05666d3385 vkd3d: Add VKD3D_VULKAN_DEVICE debug environment variable.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:53:34 +01:00
Józef Kucia
c6477964a3 vkd3d-shader: Translate eval_centroid shader instructions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:53:29 +01:00
Józef Kucia
38f5081496 vkd3d-shader: Translate eval_sample_index shader instructions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:53:27 +01:00
Józef Kucia
b0c8561cff vkd3d: Fix feature queries for depth/stencil formats.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 19:17:27 +01:00
Józef Kucia
f1bfb1305e vkd3d: Update command list to ID3D12GraphicsCommandList1.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:14 +01:00
Józef Kucia
d0f8443ac5 vkd3d: Do not crash on NULL views in IASetIndexBuffers().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:12 +01:00
Józef Kucia
a844d8f0a8 vkd3d: Validate image views before creating framebuffers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:10 +01:00
Józef Kucia
fd48757d25 vkd3d: Allow more memory types for custom heaps.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:08 +01:00
Józef Kucia
3629787aad vkd3d: Add more formats.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 19:01:06 +01:00
Józef Kucia
19f9745adf vkd3d-shader: Use epilogue functions for fork and join phases.
In order to handle packed outputs properly.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:39 +01:00
Józef Kucia
74c8ca0f64 vkd3d-shader: Add basic support for vocp registers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:37 +01:00
Józef Kucia
7fc98ade64 vkd3d-shader: Use SPIR-V built-ins for hull shader inputs.
I missed this case before because apps don't seem to use SV_Position
for hull shader inputs. vkd3d_siv_from_sysval() needs to be restored
for hull shaders.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:34 +01:00
Józef Kucia
67a160683d vkd3d-shader: Take into account dst write mask for scalar stores.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:32 +01:00
Józef Kucia
f640602ce8 vkd3d: Add feature level 11_1.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:27 +01:00
Józef Kucia
38e3c5d2d3 vkd3d: Rework Vulkan queues initialisation.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 16:00:25 +01:00
Józef Kucia
085456005c vkd3d: Set Vulkan object names for NULL CBV resources.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:20 +01:00
Józef Kucia
7858eb6a83 vkd3d: Prefer cached memory for readback heaps.
Reading uncached memory is slow.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:12 +01:00
Józef Kucia
401739a387 vkd3d: Emulate NULL CBV descriptors.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:05 +01:00
Józef Kucia
02ca005ada vkd3d: Use vkCmdResolveImage() to resolve typeless resources if possible.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 16:37:52 +01:00
Józef Kucia
0ffaf4a2b7 vkd3d-shader: Introduce is_control_point_phase() helper.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:19 +01:00
Józef Kucia
ff132543c1 vkd3d-shader: Index control point phase outputs by InvocationId.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:16 +01:00
Józef Kucia
0328118947 vkd3d-shader: Handle partial shader output updates in epilogue functions.
Fork and join phases quite often write only a few components of an
output variable.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:14 +01:00
Józef Kucia
bc441fd6c6 vkd3d-shader: Add more advanced helper for vector shuffle.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:10 +01:00
Józef Kucia
6c70edf511 vkd3d-shader: Remove output register symbols while leaving control point phase.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-26 22:08:08 +01:00
Józef Kucia
02cbc53b96 vkd3d-shader: Get rid of vkd3d_dxbc_compiler_emit_swizzle_ext().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:08:05 +01:00
Józef Kucia
cb24be8e83 vkd3d-shader: Do not assume float type for arrayed shader outputs.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:08:03 +01:00
Józef Kucia
04e2091afa vkd3d-shader: Do not assume vec4 destination in vkd3d_dxbc_compiler_emit_store().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:08:01 +01:00
Józef Kucia
95b6d5222d vkd3d-shader: Call vkd3d_dxbc_compiler_leave_shader_phase() also for last phase.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:59 +01:00
Józef Kucia
38f75846b4 vkd3d-shader: Emit epilogue functions while leaving shader phases.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:57 +01:00
Józef Kucia
61aeaae0c2 vkd3d-shader: Factor out vkd3d_dxbc_compiler_emit_store().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:55 +01:00
Józef Kucia
64f7ff3898 vkd3d-shader: Merge ifs in vkd3d_dxbc_compiler_emit_swizzle_ext().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:52 +01:00
Philip Rebohle
c560fdfa26 vkd3d-shader: Decorate integer fragment shader builtins as flat.
From the Vulkan spec, 8.13 "Interpolation Decorations":

    Fragment shader inputs that are signed or unsigned integers,
    integer vectors, or any double-precision floating-point type
    must be decorated with Flat.

This also matches glslang behaviour.

Specifically, this fixes tone-mapping in Unreal Engine 4 on RADV
and AMDGPU-PRO, where gl_Layer is used as a fragment shader input.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-25 19:07:50 +01:00
Józef Kucia
d1e0ac115c vkd3d-shader: Avoid generating unique array types for immediate constant buffers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:44 +01:00
Józef Kucia
a0069d9fb7 vkd3d-shader: Use correct base index for relative addressing of aggregates.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:39 +01:00
Józef Kucia
d300e6f84c vkd3d-shader: Remove v{Fork, Join}InstanceID from symbol table when leaving shader phase.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:37 +01:00
Józef Kucia
9c46011b43 vkd3d-shader: Simplify vkd3d_dxbc_compiler_get_register_id().
Special casing is not needed.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:35 +01:00
Józef Kucia
3cbdad5f29 vkd3d-shader: Translate vPrim register.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:33 +01:00
Józef Kucia
7466758f08 vkd3d-shader: Fix swizzle for scalars.
In rare cases, OpCompositeExtract was generated for scalars.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:30:30 +01:00
Józef Kucia
197c1d9612 vkd3d-shader: Handle VKD3DSPR_INCONTROLPOINT in vkd3d_dxbc_compiler_get_register_id().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 19:15:14 +01:00
Józef Kucia
b6de566e3a vkd3d-shader: Add basic support for dcl_index_range.
We can address SPIR-V arrays dynamically.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 19:15:10 +01:00
Józef Kucia
d274318fe2 vkd3d-shader: Avoid using SPIR-V built-ins for shader interface between tessellation stages.
We can do this because both tessellation shaders are required in
Direct3D.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 19:15:04 +01:00
Józef Kucia
2ce7b2305a vkd3d: Implement SO statistics queries.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-20 19:15:03 +01:00