Commit Graph

155097 Commits

Author SHA1 Message Date
Mike Blumenkrantz f67bd8adfa egl/wayland: manually swap backbuffer when using zink
this would usually occur through dri2_wl_swrast_commit_backbuffer(),
but zink triggers this functionality using vulkan wsi, which fails to
perform these updates as expected

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16814>
2022-06-03 18:22:22 +00:00
SureshGuttula 5d0f922834 Revert "radeon: hardcode uvd/vce encoder not_referenced value to false"
This reverts commit 96b276b327.

This patch enable SVC encoding support on VCE/UVD.

Signed-off-by: Suresh Guttula <suresh.guttula@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16768>
2022-06-03 17:46:28 +00:00
Yonggang Luo ca700dcb0a microsoft/clc: Fixes compiling of microsoft clc with mingw
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/16767>
2022-06-03 16:33:00 +00:00
Yonggang Luo 1720672e33 dzn: Fixes compiling error by include `<unknwn.h>`
In mingw's `<unknwn.h>`, it's defeind __REQUIRED_RPCNDR_H_VERSION__ to 475,
so that gcc/mingw won't raise compiling error that because directx/d3d12.h
define __REQUIRED_RPCNDR_H_VERSION__ to 500, but the maximal supported __REQUIRED_RPCNDR_H_VERSION__ in mingw
are 475.

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/16767>
2022-06-03 16:33:00 +00:00
Yonggang Luo 0445bfdc1b dzn: Fixes compiling error when build with msys2/mingw
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/16767>
2022-06-03 16:33:00 +00:00
Yonggang Luo 6f61b1e1da d3d12/wgl/test: Fixes wgl_tests.cpp for d3d12 with mingw
wgl needs dxguids/dxguids.h for correct GUID

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/16767>
2022-06-03 16:33:00 +00:00
Yonggang Luo e26f58e001 d3d12: `#include <windows.h>` instead `#include <Windows.h>` for building under linux with mingw
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/16767>
2022-06-03 16:33:00 +00:00
Yonggang Luo 64b10ade2b d3d12: Fixes compiling error by include `<unknwn.h>`
In mingw's `<unknwn.h>`, it's defeind __REQUIRED_RPCNDR_H_VERSION__ to 475,
so that gcc/mingw won't raise compiling error that because directx/d3d12.h
define __REQUIRED_RPCNDR_H_VERSION__ to 500, but the maximal supported __REQUIRED_RPCNDR_H_VERSION__ in mingw
are 475.

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/16767>
2022-06-03 16:33:00 +00:00
Yonggang Luo d493e2ef7d d3d12: Move shared code that include d3d12 headers into d3d12_common.h
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/16767>
2022-06-03 16:33:00 +00:00
Yonggang Luo b4f701f962 d3d12: Fixes d3d12 compiling errors in `D3D12ResourceState.h` for mingw
```
In file included from ../../src/gallium/drivers/d3d12/D3D12ResourceState.cpp:24:
../../src/gallium/drivers/d3d12/D3D12ResourceState.h:51:45: error: call to non-'constexpr' function 'D3D12_RESOURCE_STATES operator|(D3D12_RESOURCE_STATES, D3D12_RESOURCE_STATES)'
   45 | D3D12_RESOURCE_STATE_RENDER_TARGET          |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   46 | D3D12_RESOURCE_STATE_UNORDERED_ACCESS       |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   47 | D3D12_RESOURCE_STATE_DEPTH_WRITE            |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   48 | D3D12_RESOURCE_STATE_STREAM_OUT             |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   49 | D3D12_RESOURCE_STATE_COPY_DEST              |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   50 | D3D12_RESOURCE_STATE_RESOLVE_DEST           |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   51 | D3D12_RESOURCE_STATE_VIDEO_DECODE_WRITE     |
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   52 | D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE;
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/CI-Tools/msys64/mingw64/include/minwindef.h:163,
                 from C:/CI-Tools/msys64/mingw64/include/windef.h:9,
                 from C:/CI-Tools/msys64/mingw64/include/windows.h:69,
                 from C:/CI-Tools/msys64/mingw64/include/rpc.h:16,
                 from ../../subprojects/DirectX-Headers-1.0/include/directx/d3d12.h:26,
                 from ../../src/gallium/drivers/d3d12/D3D12ResourceState.h:33,
                 from ../../src/gallium/drivers/d3d12/D3D12ResourceState.cpp:24:
../../subprojects/DirectX-Headers-1.0/include/directx/d3d12.h:2865:1: note: 'D3D12_RESOURCE_STATES operator|(D3D12_RESOURCE_STATES, D3D12_RESOURCE_STATES)' declared here
 2865 | DEFINE_ENUM_FLAG_OPERATORS( D3D12_RESOURCE_STATES );
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
```

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/16767>
2022-06-03 16:33:00 +00:00
Mike Blumenkrantz 50bc8efe18 zink: disable compute pbos on turnip
this saves ~15 minutes in cts somehow

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16548>
2022-06-03 15:48:45 +00:00
Jesse Natalie 3cd320c5fa meson: Use a C99 STDC_VERSION for flex
Fixes: 8575d0e8 ("meson: modernize win_flex stdint.h logic")
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16839>
2022-06-03 15:13:10 +00:00
Konstantin Seurer ae19e9c292 radv: Some acceleration structure cleanups
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16782>
2022-06-03 13:28:37 +00:00
Konstantin Seurer 5c5021de27 radv: Add and use radv_cp_dma_wait_for_stages
Adds a small helper for handling cp dma sync. This
Also adds the missing handling for some stage
flags in write_event.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16782>
2022-06-03 13:28:37 +00:00
Hoe Hao Cheng 687fd67557 zink/codegen: do not automatically consider extensions promoted
...until an entry is added to VERSIONS in zink_device_info.py.

Now that we stop obtaining feature structs of promoted extensions when the VK
impl is new enough, it's possible for things to break when someone updates
vk.xml, and extensions get promoted but the codegen is not updated to include
e.g. info->feats13 and info->props13 (or newer) in zink_device_info

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16265>
2022-06-03 13:06:34 +00:00
Hoe Hao Cheng 07565e8852 zink/codegen: do not include compilation structs with extension structs
(compilation structs refer to VkPhysicalDeviceVulkanXYFeatures/Properties, as
they consist of all features added by extensions promoted in VK X.Y)

The spec prohibits this, so instead we map the fields in the compilation
structs onto the fields in extension structs.

Some extensions' feature/properties structs are not promoted, and the spec
allows including both compilation structs and extension structs in such cases.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16265>
2022-06-03 13:06:34 +00:00
Hoe Hao Cheng 0d344e96c0 zink/codegen: remember the fields in feats/props structs of extensions
this will be useful in the next commit, where we reapply fields from one struct
to another.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16265>
2022-06-03 13:06:34 +00:00
Pierre-Eric Pelloux-Prayer b51e40ebde st/mesa: use mutex in st_get_texture_sampler_view_from_stobj
st_texture_release_all_sampler_views uses the validate_mutex,
but st_get_texture_sampler_view_from_stobj didn't.

Since they both modify stObj->view we could have threadA in
st_get_texture_sampler_view_from_stobj with a non-NULL sv,
so expecting sv->view to be non-NULL, while threadB was in
st_texture_release_all_sampler_views clearing sv->view.

It's also needed to protect st_sampler_view::private_refcount,
which is supposed to be used from the owning context thread,
but can also be used by any context in st_texture_release_all_sampler_views.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6088
Fixes: ef5d427413 ("st/mesa: add a mechanism to bypass atomics when binding sampler views")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16779>
2022-06-03 14:10:28 +02:00
Tapani Pälli d07ec3f038 anv: use anv_cmd_dirty_mask_t type for dynamic state
We were using both uint32_t and anv_cmd_dirty_mask_t, this is
a cleanup making type usage consistent. Commit also changes type of
the mask to be enum anv_cmd_dirty_bits.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16849>
2022-06-03 14:11:04 +03:00
Boris Brezillon 2feef505c1 microsoft/spirv_to_dxil: Fix the push_constant UBO size calculation
Right now, we just consider the size of the accessed portion of the
push constant array, but it doesn't necessarily reflect the size
of the UBO we should declare.

Fixes: de1e941c59 ("microsoft/spirv_to_dxil: Lower push constant loads to UBO loads")
Reviewed-by: Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16703>
2022-06-03 10:43:18 +00:00
Boris Brezillon 6783a88455 microsoft/spirv_to_dxil: Fix push_constants type declaration
We're not declaring an array of bytes but an array of uint32. Let's
fix the element_count we pass to glsl_array_type().

Fixes: de1e941c59 ("microsoft/spirv_to_dxil: Lower push constant loads to UBO loads")
Reviewed-by: Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16703>
2022-06-03 10:43:17 +00:00
Daniel Schürmann b56fcefa0f nir/opt_vectorize: refactor src rewriting to avoid unnecessary mov instructions
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15647>
2022-06-03 08:53:18 +00:00
Samuel Pitoiset fe9f1d064a radv: enable radv_zero_vram for Hammerting
This native Vulkan game is broken, it has TON of Vulkan validation
errors and hangs without RADV_DEBUG=zerovram. Also tested with PRO
and AMDVLK.

The application name is also not really descriptive but the executable
name 'boot.exe' is worst.

https://github.com/ValveSoftware/Proton/issues/4347#issuecomment-1141415515

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16832>
2022-06-03 08:29:58 +00:00
Danylo Piliaiev eb5f4c2f6b spirv: Workaround for RelaxedPrecision on OpLogical* in 3DMark
Per spec RelaxedPrecision cannot be applied to bool types, however
3DMark Wild Life does it:

OpDecorate %171 RelaxedPrecision
...
%171 = OpLogicalAnd %bool %169 %170

Fixes crash in 3DMark Wild Life on Android.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16746>
2022-06-03 07:50:53 +00:00
Erik Faye-Lund c21dfe3348 meson: add back -Werror=vla to msvc compat flags
Back when STATIC_ASSERT was prepared for use in common code, the
-Werror=vla flag was removed from the MSVC compat flags. But now we're
using C++11 / C11 static asserts instead, so we can add it back again.

This should help us noticing some breakages before they happen.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund 45fb815a75 util: implement STATIC_ASSERT using c++11 / c11 primitives
Since we now require C11 and C++14, we can use the standard
static_asserts from the standard library instead of rolling our own
compiler-specific versions.

To avoid needing scopes around usage in switch cases, keep the
while-wrapping from before. This means it still can't be used outside of
functions, but that should be fine; we should probably just use
static_assert directly in those cases anyway.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund f1023571e8 util: use static_assert directly
For some reason, Clang doesn't love the STATIC_ASSERT implementation
we're about switch to in this *one* particular case. Other cases seems
to work fine, so let's just use static_assert directly here.

It lets us give a better error string anyway, so yay.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund 873ec432b3 broadcom/compiler: use macro for power-of-two check
This will allow the use of static_assert here instead of our
compiler-specific implementation.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund 2a134347cb intel/compiler: use macro for power-of-two check
This will allow the use of static_assert here instead of our
compiler-specific implementation.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund 9ecb6f8820 util: add IS_POT macro
This macro kinda complements util_is_power_of_two_*, but is implemented
as a macro. This means that it can expand to a constant integral
expression, and thus be used in static_assert.

Because we don't really need the added complexity, this doesn't handle
zero correctly. But that's OK, because the call-sites will.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund cf52d79d24 v3dv: do not do STATIC_ASSERT on variables
Use an enum value instead, so it's guaranteed to be constant.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund d8e34243ae freedreno: degrade STATIC_ASSERT to assert
dirty is a variable, and C standard doesn't guarantee that the compiler
can see that it's always passed a constant. So this isn't appropriate to
use for static_assert, which we're about to convert STATIC_ASSERT to
expand to.

If we really want to do this compile-time, we need to make
fd_context_dirty a macro instead. But it seems reaonable to just use a
run-time assert instead here.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund 8376fb0f33 iris: do not do STATIC_ASSERT on variables
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund d33fe53c8d freedreno: do not do STATIC_ASSERT on variables
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund 200091aad0 freedreno: do not use variable in STATIC_ASSERT
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund 08f8ccfc60 turnip: do not do STATIC_ASSERT on a variable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Erik Faye-Lund f7efa2858f pvr: do not use c_msvc_compat_args
This code isn't MSVC compatible, as it uses VLAs (for instance).

Until there's a reason to support MSVC, let's not even try. Otherwise,
we make it harder than needed to add flags to make the MSVC compat flags
more complete.

Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
2022-06-03 07:14:43 +00:00
Yonggang Luo 1d3727bcc6 radv: Remove usage of `cnd_monotonic.h`
Improve: 91fe0b5629 ("radv: Delete lots of sync code.")

As cnd_monotonic.h are include `util/os_time.h`, radv_debug.c and radv_debug.c needs `util/os_time.h`
So include in these files directly.

The compiling errors are:
```
../src/amd/vulkan/radv_debug.c:707:12: error: implicit declaration of function 'os_localtime' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   timep = os_localtime(&raw_time, &result);

../src/amd/vulkan/radv_device.c:97:11: error: implicit declaration of function 'os_time_get_nano' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   return os_time_get_nano();
          ^

../../src/amd/vulkan/radv_pipeline.c: In function 'radv_create_shaders':
../../src/amd/vulkan/radv_pipeline.c:4119:29: error: implicit declaration of function 'os_time_get_nano' [-Werror=implicit-function-declaration]
 4119 |    int64_t pipeline_start = os_time_get_nano();
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16536>
2022-06-03 06:46:38 +00:00
Mike Blumenkrantz 3aad93a47e aux/trace: implement pipe_screen::is_compute_copy_faster
stop crashing!

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16546>
2022-06-03 04:24:56 +00:00
Mike Blumenkrantz c90c742344 aux/trace: fix sampler view dumping
this should just dump the samplerview target, not the resource target too

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16546>
2022-06-03 04:24:56 +00:00
Mike Blumenkrantz 20427d01ac zink: fix framebuffer attachment usage asserts for dummy attachments
dummy attachments never overwrite existing attachments,
so they must be explicitly compared like this to avoid
erroneous crashing

Fixes: 3892c13381 ("zink: add an alternate path for EXT_color_write_enable usage")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16848>
2022-06-03 04:04:46 +00:00
Dave Airlie e90fe826a2 nouveau/codegen: drop gallium headers from the interface.
I know pipe defines are still used internally, but I'd want
better testing, before starting to remove that.

Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yusuf Khan<yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16763>
2022-06-03 03:57:18 +00:00
Dave Airlie ee93b32fdd nouveau/codegen: drop all ubytes from codegen.
There wasn't that many, so get rid of them in favour of real types.

Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yusuf Khan<yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16763>
2022-06-03 03:57:18 +00:00
Dave Airlie 1f754b7aae nouveau: move codegen to a common higher level directory.
This allows it to be built independently of the gallium driver.

Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yusuf Khan<yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16763>
2022-06-03 03:57:18 +00:00
Dave Airlie 702fbbdaa3 nouveau: move codegen into a standalone library.
This just moves the codegen build into a separate library,
this is just prep work for a future where another drivers wants
to reuse this code.

Acked-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Yusuf Khan<yusisamerican@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16763>
2022-06-03 03:57:18 +00:00
Dave Airlie b62dd20dea llvmpipe: handle timespec overflow on fence waits.
on 32-bit systems VK CTS was failing due to an overflow here,
detect the overflow and just do a normal wait.

Fixes: 5b284fe6bc ("llvmpipe: add lp_fence_timedwait() helper")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16847>
2022-06-03 03:37:21 +00:00
Hyunjun Ko 8eb5178a6d turnip: clamp to 1 for negative bottom-right of viewport.
This fixes a crash of spec@!opengl 3.0@viewport-clamp in
piglit(with zink).
Also fixes a crash of negativeviewportheight in Sascha's examples.

Closes: #6583

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16831>
2022-06-03 02:40:08 +00:00
Mike Blumenkrantz 7ff3c75ef3 zink: expand patch_vertices pipeline key bitsize
no need to compact the bits anymore, so make this a uint16

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16838>
2022-06-03 01:23:58 +00:00
Mike Blumenkrantz 1c0434dd95 zink: use dynamic patch vertices if available
this one's a little different from other dynamic states in that it
isn't expected to change much, so I've kept it outside of draw handling
since it can be trivially applied elsewhere with no chance of impacting perf

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16838>
2022-06-03 01:23:58 +00:00
Mike Blumenkrantz 76668ae4bd zink: break out pipeline dynamic state2 into struct
easier to expand

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16838>
2022-06-03 01:23:58 +00:00