Louis-Francis Ratté-Boulianne
8bbc31aba2
d3d12: Release swapchain buffers before resizing them
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:18:53 +01:00
Jesse Natalie
be4475c4a7
d3d12: Implement winsys framebuffer
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:18:37 +01:00
Louis-Francis Ratté-Boulianne
e74b3e570a
wgl: Wrap stw_pixelformat.h into extern C
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:18:24 +01:00
Louis-Francis Ratté-Boulianne
584061bdcd
wgl: Create third buffer when drawing to front buffer
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:18:05 +01:00
Louis-Francis Ratté-Boulianne
ece2cc3352
wgl: Wait for fence when not using winsys framebuffer
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:17:43 +01:00
Louis-Francis Ratté-Boulianne
f49ff1548b
wgl: Call flush_resource() before presenting
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:17:29 +01:00
Louis-Francis Ratté-Boulianne
0e79ee3741
wgl: Flush in-between resolving buffer and presenting
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:17:17 +01:00
Jesse Natalie
d60913e392
wgl: Use winsys framebuffer interface if present
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:16:54 +01:00
Jesse Natalie
23bfe03567
wgl: Add winsys framebuffer object
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:16:42 +01:00
Jesse Natalie
acf8af458f
wgl: Add PFD flags based on stw_winsys callback response
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:16:29 +01:00
Jesse Natalie
c28eb3c6aa
wgl: Add stw_winsys callback to check which PFD flags should be added
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:16:08 +01:00
Louis-Francis Ratté-Boulianne
bb9cc7ede4
d3d12: Add D3D12 WGL winsys
...
Add a winsys for code paths common to the libgl-gdi and
libgl-d3d12 targets when using the D3D12 gallium driver.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:15:51 +01:00
Jesse Natalie
3b034e9771
wgl: Implement get_adapter_luid callback
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:15:34 +01:00
Jesse Natalie
f6d2d3cb58
wgl: Marshal HDC into screen creation and LUID querying
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:15:17 +01:00
Jesse Natalie
494bd9cfa6
d3d12: Pipe adapter LUID from callbacks to D3D12 screen init
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:14:39 +01:00
Jesse Natalie
29996b88c2
d3d12: Add glon12 target which only includes d3d12 driver
...
This driver has no WGL or GL entrypoints, only the ones required by the
driver-loader.
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:14:01 +01:00
Erik Faye-Lund
fd361dde65
d3d12: Support WINSYS_HANDLE_TYPE_D3D12_RES
...
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535 >
2020-11-18 11:13:16 +01:00
Erik Faye-Lund
7145cd6e73
mesa/st: Introduce WINSYS_HANDLE_TYPE_D3D12_RES
...
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 >
2020-11-18 11:12:42 +01:00
Iago Toral Quiroga
5c305c8e36
v3dv: use VkSurface to retrieve an authenticated display fd
...
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 >
2020-11-18 08:11:37 +00:00
Samuel Pitoiset
0fcd379184
aco: fix combining max(-min(a, b), c) if a or b uses the neg modifier
...
No fossils-db changes.
Cc: 20.2, 20.3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7657 >
2020-11-18 08:00:28 +00:00
Marek Olšák
ff22fcf450
radeonsi: fix scan_instruction for bindless inc_wrap/dec_wrap atomics
...
Fixes: 25fff591c1
- radeonsi: add support for nir atomic_inc_wrap/atomic_dec_wrap
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
d0657ee837
radeonsi: fix NGG streamout regression
...
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 >
2020-11-18 06:19:59 +00:00
Marek Olšák
be905b74f7
radeonsi: don't add num_vbos_in_user_sgprs to the shader cache key for non-VS
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
4753235406
radeonsi: don't do VGT_FLUSH before fast launch on gfx10.3
...
I don't see any hangs here. Blender and the Factorio trace work fine.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
e2b784e74b
ac: rename num_sh_per_se -> num_sa_per_se
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
603b5340b9
ac: rename num_render_backends -> max_render_backends
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
f2977a162a
ac: fix min/max_good_num_cu_per_sa on gfx10.3 with disabled SEs
...
Fixes: 9538b9a68e
- radeonsi: add support for Sienna Cichlid
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
b635dff256
ac: fix detection of Pro graphics
...
Fixes: bfb928759
"ac: add radeon_info::is_pro_graphics"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
d425d765bf
ac: add build_alloca with an initializer
...
combining alloca_undef + BuildStore.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
025bc9e50e
radeonsi: add options.inline_uniforms to the shader cache key
...
It affects how shaders are finalized before caching.
Fixes: b7501184b9
("radeonsi: implement inlinable uniforms")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
a73bdf4853
radeonsi: remove VS input loads when culling with rasterizer discard
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
0ab7ab40c8
radeonsi: tweak triangle list culling performance for GS fast launch
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
2b2b22f496
radeonsi: read vs_state_bits in vs_prolog correctly
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
ea90d8a744
radeonsi: don't subtract max_verts_per_prim from hw_max_esverts on gfx10.3
...
gfx10.3 does it properly. This change enables the last 2 lanes in a workgroup
on gfx10.3.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
e29e41a3cd
radeonsi: determine correctly if switching from normal launch to fast launch
...
Fixes: 3da91b3327
- radeonsi/ngg: add VGT_FLUSH when enabling fast launch
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:59 +00:00
Marek Olšák
8d2876a343
radeonsi: only do VGT_FLUSH for fast launch if previous draw was normal launch
...
Fixes: 3da91b3327
- radeonsi/ngg: add VGT_FLUSH when enabling fast launch
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:58 +00:00
Marek Olšák
c4ebdf9ee7
radeonsi: do VGT_FLUSH when switching NGG -> legacy on Sienna Cichlid
...
Other chips don't need this.
Fixes: 9538b9a68e
- radeonsi: add support for Sienna Cichlid
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:58 +00:00
Marek Olšák
74ea26f613
radeonsi: fix min_direct_count value
...
It was always 0.
Fixes: 0ce68852c
"radeonsi: implement multi_draw but supporting only 1 draw"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542 >
2020-11-18 06:19:58 +00:00
Jason Ekstrand
802fabdaa4
Revert "anv/image: Define anv_image_get_aux_addr (v3)"
...
This reverts commit 87dc3106b0
.
Fixes: 87dc3106b0
"anv/image: Define anv_image_get_aux_addr (v3)"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3826
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7670 >
2020-11-17 23:27:42 -06:00
Jason Ekstrand
783b895ec9
nir: Rewrite lower_undef_to_zero
...
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 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
ff05da7f8d
microsoft: Add CLC frontend and kernel/compute support to DXIL converter
...
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 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
1885e356e6
spirv: Allow spirv_to_nir callers to provide a float execution mode
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
a0aaba26cd
nir_load_libclc: Mark libclc shader as internal
...
This allows NIR_PRINT to skip passes run on it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Boris Brezillon
cab995b463
nir: Make nir_build_deref_offset() support ptr_as_array
...
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 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
949f8572ec
vtn/opencl: Fix alignment for half vload/vstore
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
9c4dce1d96
nir: Add nir_alu_type -> glsl_base_type conversion helper
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Boris Brezillon
7d3aec9905
compiler/spirv: Handle the LocalSizeHint execution modes
...
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 >
2020-11-18 04:05:37 +00:00
Boris Brezillon
a42c846d24
nir: Fix nextafter() for hardware that don't support denorms
...
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 >
2020-11-18 04:05:37 +00:00
Jesse Natalie
b94b827add
panfrost/util: Move nir_undef_to_zero into core nir and add 'lower'
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00
Jason Ekstrand
c730ace12b
nir,clover: Drop nir_lower_mem_constant_vars
...
We have a more generic helper now so clover doesn't need quite as many
special paths.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565 >
2020-11-18 04:05:37 +00:00