Commit Graph

736 Commits

Author SHA1 Message Date
David Heidelberg bc34217978 ci/dzn: add flake
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19858>
2022-11-18 23:04:14 +00:00
Yonggang Luo d1e1911d82 ci: Update dozen flakes
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7549

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19824>
2022-11-17 23:42:46 +00:00
Jesse Natalie 2a1bb4df95 dzn: Ensure SRV ResourceMinLODClamp is set to 0.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19537>
2022-11-17 00:13:33 +00:00
Jesse Natalie 2f8d2a91a6 dzn: Use cube-array views for misaligned cubes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19537>
2022-11-17 00:13:33 +00:00
Jesse Natalie 6e7896aa44 dzn: Use DEPTH_STENCIL_DESC2 for front/back stencil read/write masks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19537>
2022-11-17 00:13:33 +00:00
Jesse Natalie 73c9cfb61b dzn: Use ID3D12GraphicsCommandList8 for front/back stencil ref
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19537>
2022-11-17 00:13:33 +00:00
Jesse Natalie c5b6d0c882 dzn: Get options14
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19537>
2022-11-17 00:13:33 +00:00
Jesse Natalie 6b887034be dzn: Use CreateCommandList1
We don't need to do the command list destroy/re-create dance if the
only reference to an allocator is a *closed* command list. Using
CreateCommandList1 gives us a closed command list to start with,
which better matches the semantics of Vulkan's begin/end for
command buffers.

Now that dzn's cmdbuf reset logic puts the cmdbuf back to the
*initial* state, move the command list reset to BeginCommandBuffer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19537>
2022-11-17 00:13:33 +00:00
Jesse Natalie 56d4e038dd dzn: Use common command buffer state tracking
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19537>
2022-11-17 00:13:33 +00:00
Jesse Natalie f3b631f1dc dzn: Upgrade baseline from ID3D12Device2 to 4
This is pretty old already and we'll want to use CreateCommandList1

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19537>
2022-11-17 00:13:33 +00:00
Jesse Natalie a3dbc9ac25 microsoft/compiler: Emit sampleCmpLevel when needed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19537>
2022-11-17 00:13:33 +00:00
David Heidelberg e93de8a75e dzn: add triangle_strip flake
Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7672

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19782>
2022-11-16 17:49:50 +00:00
M Henning f3ee9be836 glsl: Drop borrow/carry lowerings in favor of nir
Unconditionally lowering prevents GL drivers from natively
implementing these ops. Drivers that need lowering should set
lower_uadd_carry and lower_usub_borrow on nir_shader_compiler_options to
get the nir lowerings.

Tested with dEQP-GLES31.functional.shaders.builtin_functions.integer.*

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19704>
2022-11-15 21:51:04 +00:00
Jesse Natalie 72d66aa987 microsoft/compiler: Delete now-unused memcpy lowering pass
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19752>
2022-11-15 18:29:26 +00:00
Jesse Natalie fb7fd02a2b microsoft/clc: Optimize memcpys
Use the optimization pass to try to remove them, and if that fails,
at least use the core nir lowering pass which is better about fixed-
size memcpys compared to the one we wrote for DXIL.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19752>
2022-11-15 18:29:26 +00:00
Caio Oliveira e63d6ed85e spirv: Make vtn_fail and friends trap in debug mode
The SPIR-V parser catches its failures and failed assertions, clean up
and return a failure to the caller.  This is a good default behavior, but
when debugging sometimes is useful to hook the debugger right in the
failed assertion.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19663>
2022-11-13 07:07:56 +00:00
Yonggang Luo e39afa1ae8 microsoft: Fixes error: unknown type name ‘boolean’ in nir_to_dxil.c
error message:
../../src/microsoft/compiler/nir_to_dxil.c:1711:8: error: unknown type name ‘boolean’
 1711 | static boolean

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19649>
2022-11-11 06:48:46 +00:00
Yonggang Luo e399dc3544 util: normalize include files under src/util/*.h with util/ prefix in mesa code base
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19546>
2022-11-10 06:27:25 +00:00
Boris Brezillon 1c567ae3a2 dzn: Hook-up format-casting
This was only partially supported, with not way to cross D3D12
old compatibility boundary. With the RelaxedFormatCastingSupported
feature, we can cast any format to any other format with the same
block size, which maps pretty well to how Vulkan see things.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17339>
2022-11-04 17:39:46 +00:00
Boris Brezillon bda14ae998 dzn: Try to get a ID3D12Device10 object
Will be needed to support format casting.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17339>
2022-11-04 17:39:46 +00:00
Boris Brezillon bbc4b4f59a dzn: Query D3D12_FEATURE_DATA_D3D12_OPTIONS12
Needed to detect whether relaxed format casting is supported or not.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17339>
2022-11-04 17:39:46 +00:00
Jesse Natalie 798aa43b6b microsoft/spirv2dxil: Lower sample pos for fragment shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19471>
2022-11-04 01:40:17 +00:00
Jesse Natalie 1399f37a3b d3d12: Move lower_sample_pos to microsoft/compiler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19471>
2022-11-04 01:40:17 +00:00
Jesse Natalie d79da61ffa dzn: Set Agility SDK parameters and update test expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19178>
2022-11-03 23:54:45 +00:00
Jesse Natalie 70039dcad6 microsoft/compiler: Fix feature flag handling for 64-bit bitcasts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19178>
2022-11-03 23:54:45 +00:00
Illia Abernikhin aa4ac5ff8b utils: Merge util/debug.* into util/u_debug.* and remove util/debug.*
Rename env_var_as_unsigned() -> debug_get_num_option(), because duplicate
Rename env_var_as_bool() -> debug_get_bool_option(), because duplicate

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7177

Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19336>
2022-11-02 07:25:39 +00:00
Kenneth Graunke fde99747e9 nir: Drop infer_non_readable option for nir_opt_access()
Everybody sets it to true now, and the only reason for the option to
exist was to work around a bug that's now been fixed.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19162>
2022-11-02 03:42:04 +00:00
Jesse Natalie 61afaa0c68 dzn: Set factory flags before creating device
I got this in d3d12 but missed it in dzn

Fixes: 74d1c72b ("dzn: Support device factories in addition to global device creation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19420>
2022-10-31 18:03:02 +00:00
Iago Toral Quiroga 9deef4cde6 vulkan/runtime: include robustness info when hashing a shader stage
Suggested by Jason Ekstrand.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18883>
2022-10-27 08:17:11 +00:00
Pedro J. Estébanez 413f8d0e9b microsoft/spirv2dxil: Support pack_32_2x16 and pack_32_4x8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19273>
2022-10-24 17:39:59 +00:00
Pedro J. Estébanez 811794f8d8 microsoft/spirv2dxil: Change `spirv_to_dxil()` to receive SM and validator versions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19227>
2022-10-24 16:15:31 +00:00
Pedro J. Estébanez 0bf5bbb3e4 microsoft/spirv2dxil: Refactor to make SM and validator versions public
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19227>
2022-10-24 16:15:31 +00:00
Yonggang Luo 8897f309ca ci: Trigger building visual studio docker image
Update Dozen fails for new deqp

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19187>
2022-10-20 22:52:06 +00:00
Jesse Natalie 9edc23f075 ci/windows: Update vk-gl-cts to pick up new zlib dependency
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19187>
2022-10-20 22:52:06 +00:00
Jesse Natalie 93febe1198 dzn: Use ID3D12DeviceConfiguration for root signature serialization
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>
2022-10-20 14:40:49 +00:00
Jesse Natalie 6fc619470d dzn: Attempt to use the Agility SDK
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>
2022-10-20 14:40:49 +00:00
Jesse Natalie fd653ee33f dzn: Use architecture props to return correct device type
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>
2022-10-20 14:40:49 +00:00
Jesse Natalie 74d1c72b35 dzn: Support device factories in addition to global device creation
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>
2022-10-20 14:40:49 +00:00
Jesse Natalie 4696aa484f dzn: Store the d3d12 module reference on the instance
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18306>
2022-10-20 14:40:49 +00:00
Yonggang Luo b6e4aa6f31 meson/mesa/wide: define WIN32_LEAN_AND_MEAN with pre_args
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18425>
2022-10-20 03:04:56 +00:00
Yonggang Luo 574b4c547f meson: add dep_valgrind dependency for 'dxil_compiler'
The error when include simple_mtx.h in glsl_types.h:
../src/microsoft/compiler/dxil_function.c
In file included from ../src/compiler/glsl_types.h:37,
                 from ../src/compiler/nir_types.h:36,
                 from ../src/compiler/nir/nir.h:44,
                 from ../src/microsoft/compiler/dxil_signature.h:28,
                 from ../src/microsoft/compiler/dxil_module.h:37,
                 from ../src/microsoft/compiler/dxil_function.h:48,
                 from ../src/microsoft/compiler/dxil_function.c:24:
../src/util/simple_mtx.h:37:12: fatal error: valgrind.h: No such file or directory
   37 | #  include <valgrind.h>

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19154>
2022-10-20 01:32:47 +00:00
Pedro J. Estébanez 842a0c6ef1 nir2dxil: Use native helper lane intrinsic on SM >= 6.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19170>
2022-10-19 22:25:51 +00:00
Pedro J. Estébanez 6558a9e1fb nir2dxil: Lower texture projections
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19115>
2022-10-19 02:30:16 +00:00
Yonggang Luo c8e14d5d47 dzn: rename module_dir to icd_lib_path for consistence
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18747>
2022-09-22 17:54:24 +00:00
Jason Ekstrand 44ab076fea vulkan: Add a vk_command_buffer_ops struct
This is the standard pattern in the kernel for providing vfunc tables
for C objects.  We're using it in the pipeline cache code but we're
about to start adding more stuff and so it really helps if we have it
for command buffers as well.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18324>
2022-09-01 20:17:25 +00:00
Jason Ekstrand 5c143b132a vulkan: Re-order arguments to vk_command_buffer_init
Most other init functions follow the Vulkan API convention of putting
the parent object first.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18324>
2022-09-01 20:17:25 +00:00
Dave Airlie 8318f73384 dozen: move to use common command buffer result code.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16918>
2022-09-01 14:11:55 +00:00
Jason Ekstrand cc6ad491ea vulkan/cmd_queue: Drop vk_cmd_queue::error
Instead, we return errors from each of the enqueue functions and record
those errors (if any) in vk_command_buffer::record_result.  This also
involves some awkward changes to each of the three drivers that uses
vk_cmd_queue but those are resolved in later commits as we convert those
drivers to the common error tracking.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16918>
2022-09-01 14:11:55 +00:00
Rhys Perry 69ba1c4d59 nir: adjust nir_src_copy signature to take a nir_instr *
This is almost always a nir_instr and updating the src of a nir_if will
have to work slightly differently in the future.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12910>
2022-08-30 18:21:44 +00:00
Rhys Perry aa2d6e020b Revert "nir: Drop the unused instr arg for src/dest copy functions."
This reverts commit c3a0184118.

Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12910>
2022-08-30 18:21:44 +00:00