This is analogous to VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
from Vulkan, and GL_HANDLE_TYPE_D3D12_RESOURCE_EXT from
GL_EXT_external_objects_win32.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>
We still need a fallback for the case where the application makes
WSI allocations without a surface (Zink), but for the general case,
this is the right way to do this, as it would ensure that we use
the same display connection that was used to create the surface.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7631>
num_stream_output_components has to be set for non-GS too.
Fixes: 81d106d6ec - radeonsi: lower IO intrinsics - complete rewrite of input/output scanning
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542>
This both fixes its metadata handling (it was flagging dirty regardless
of progress) and reduces the entire pass to 21 LOC including whitespace
by making better use of helpers.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>
This adds a standalone library which can convert through the pipeline of
OpenCL C -> SPIR -> SPIR-V -> NIR -> DXIL. It can add in the libclc
implementations of various library functions in the NIR phase, and
also massages the NIR to shift it more towards graphics-style compute.
This is leveraged by the out-of-tree OpenCLOn12 runtime
(https://github.com/microsoft/OpenCLOn12).
This is the combination of a lot of commits from our development branch,
containing code by several authors.
Co-authored-by: Boris Brezillon <boris.brezillon@collabora.com>
Co-authored-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>
nir_build_deref_offset() can be extended to support calculating an
offset relative to a base pointer.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>
It's basically the same as the LocalSize version except it fills
the local_size_hint array.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>
We need to make sure we never return a denorm float, either by flushing
the denorm to 0 or by adjusting the minimum non-zero value.
v2 (Rhys): Use shader float controls execution mode instead of a dedicated option
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>
The one we had was tied to nir_var_mem_constant but we also need it for
global and, one day, I can imagine us needing it for shared (though
there's currently no spec that requires it).
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>
This patch fixes this build error.
../src/microsoft/compiler/dxil_nir.c: In function 'extract_comps_from_vec32':
../src/microsoft/compiler/dxil_nir.c:52:10: error: a label can only be part of a statement and a declaration is not a statement
52 | unsigned dst_offs = i * comps_per32b;
| ^~~~~~~~
Fixes: b9c61379ab ("microsoft/compiler: translate nir to dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7563>
This patch fixes this build error.
In file included from ../src/microsoft/compiler/dxil_enums.c:24:
../src/microsoft/compiler/dxil_enums.h:323:58: warning: 'struct glsl_type' declared inside parameter list will not be visible outside of this definition or declaration
323 | enum dxil_component_type dxil_get_comp_type(const struct glsl_type *type);
| ^~~~~~~~~
../src/microsoft/compiler/dxil_enums.h:325:71: warning: 'struct glsl_type' declared inside parameter list will not be visible outside of this definition or declaration
325 | enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type);
| ^~~~~~~~~
../src/microsoft/compiler/dxil_enums.h:327:61: warning: 'struct glsl_type' declared inside parameter list will not be visible outside of this definition or declaration
327 | enum dxil_resource_kind dxil_get_resource_kind(const struct glsl_type *type);
| ^~~~~~~~~
../src/microsoft/compiler/dxil_enums.c:31:30: error: conflicting types for 'dxil_get_prog_sig_comp_type'
31 | enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/microsoft/compiler/dxil_enums.c:24:
../src/microsoft/compiler/dxil_enums.h:325:30: note: previous declaration of 'dxil_get_prog_sig_comp_type' was here
325 | enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: b9c61379ab ("microsoft/compiler: translate nir to dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7562>
This patch fixes this build error.
In file included from ../src/microsoft/compiler/dxil_container.c:24:
../src/microsoft/compiler/dxil_container.h:98:42: warning: ‘struct dxil_features’ declared inside parameter list will not be visible outside of this definition or declaration
98 | const struct dxil_features *features);
| ^~~~~~~~~~~~~
../src/microsoft/compiler/dxil_container.c:72:1: error: conflicting types for ‘dxil_container_add_features’
72 | dxil_container_add_features(struct dxil_container *c,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/microsoft/compiler/dxil_container.c:24:
../src/microsoft/compiler/dxil_container.h:97:1: note: previous declaration of ‘dxil_container_add_features’ was here
97 | dxil_container_add_features(struct dxil_container *c,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: b9c61379ab ("microsoft/compiler: translate nir to dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7560>
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member nodes is not initialized in this
constructor nor in any functions that it calls.
uninit_member: Non-static class member nodeCount is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7522>
so that display lists don't have to disable it and drivers are simpler.
This will also enable unification with Gallium.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441>