Commit Graph

163421 Commits

Author SHA1 Message Date
David Heidelberg 4a8134975e ci/alpine: bump to 3.17, new GCC 12 and LLVM 15
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19959>
2022-11-24 22:36:03 +01:00
David Heidelberg 629e940b2c ci/alpine: enable Mold linker
Alpine has Mold 1.7.1 in the repository.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19959>
2022-11-24 22:36:03 +01:00
Martin Roukala (né Peres) c85d09bcdd radv/ci: do not create jobs that will fail outside of mesa's namespace
Mirror what is done for the freedreno project and do not allow manual
execution of jobs that require restricted access to a CI farm.

This fixes pushing new branches with non-radv-related changes.

Fixes: #7773
Reported-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19984>
2022-11-24 18:06:47 +00:00
Italo Nicola 4b63667f31 hud: add GALLIUM_HUD_ROTATION option
The user can use GALLIUM_HUD_ROTATION={0,90,180,270} to rotate the hud
by the specified amount.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19854>
2022-11-24 17:13:46 +00:00
Timur Kristóf 8ec6cb06e3 ac/nir: Avoid data race with task shader payloads.
Device memory scope is necessary because we need to ensure there is
always a waitcnt_vscnt instruction in order to avoid a race condition
between payload stores and their loads after mesh shaders launch.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19967>
2022-11-24 13:18:37 +00:00
Erik Faye-Lund a2a0ac21e4 docs/zink: add missing required device-feature
Seems I forgot to add this to the list of required features.

Fixes: eb0195358c ("zink: only inspect dual-src limit if feature enabled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
2022-11-24 12:57:46 +00:00
Erik Faye-Lund 13bccac5a7 zink: update textureCompressionBC requirement
The mesa state-tracker can now emulate all formats indicated by this
feature-flag, so we don't require this for OpenGL 4.2 any more.

It's however a good idea to support for power-usage and performance
reasons, saving on memory bandwidth. So let's move it to the
gl46_optimal block instead.

Fixes: e4ff42684b ("mesa/st: enable bptc extension with fallback")
Fixes: 2ea481b2f0 ("Zink: add Zink profiles file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
2022-11-24 12:57:46 +00:00
Erik Faye-Lund 754353c417 zink: fix incorrect requirements
These were in the wrong list all along.

Fixes: a466c2a783 ("zink: check for stores and atomics features")
Fixes: 2644835f03 ("zink: add missing required feature")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
2022-11-24 12:57:46 +00:00
Erik Faye-Lund b60bc52992 zink: remove needless requirements
We never required the uniform texel buffer bit for more than
bufferFeatures for a bunch of these formats.

Similarly, we *don't* need the uniform texel buffer bit for sampled
image access.

For the image-dimensions, the Mesa frontend doesn't validate the max 1D,
3D or Cube sizes, nor the max texture layers. So we'll expose GL 4.1
without these, even if that's not conformant.

Finally, we don't require robustImageAccess2 for OpenGL 4.3 at all. All
we need is the robustBufferAccess feature.

Fixes: 2ea481b2f0 ("Zink: add Zink profiles file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
2022-11-24 12:57:46 +00:00
Erik Faye-Lund b707cf24a3 zink: fix json-errors in profile-file
There's some stray commas here, let's get rid of them.

Fixes: 2ea481b2f0 ("Zink: add Zink profiles file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19779>
2022-11-24 12:57:46 +00:00
Iago Toral Quiroga f71944ae0e v3dv: specialize query copy pipelines
Instead of having one shader that checks the various flags and emits
conditional code, create specialized pipelines for each relevant
combination of flags values so we can produce more optimized
pipelines with less conditional code for each scenario.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
2022-11-24 12:21:59 +00:00
Iago Toral Quiroga ae4351e939 v3dv: allocate one BO for both occlusion results and availability
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
2022-11-24 12:21:59 +00:00
Iago Toral Quiroga 7a65b3f006 v3dv: reimplement occlusion queries
Our implementation was mostly CPU-based, with things such as query
resets and result copying handled in the CPU, as well as some aspects
of query availability tracking.

This new implementation handles all GPU-side query functions by
dispatching compute shaders to push the work to the GPU. This
involves query availability, reset and result copying.

For now, only occlusion queries are managed this way. Performance
queries can also be implemented in a similar fashion in the future
with some additional work, however, for timestamp queries our only
option to improve this would be to execute the actual timestamp in the
kernel, since we can't take a timestamp from a shader.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
2022-11-24 12:21:59 +00:00
Iago Toral Quiroga 4050086439 v3dv: add a helper to create compute pipelines from nir
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
2022-11-24 12:21:59 +00:00
Iago Toral Quiroga cc9db4eac2 v3dv: reset pending cpu job state once processed
If we have any pending jobs queued in the command buffer state
to be emitted at the end of a given job, make sure we reset
that state once these have been processed.

cc: mesa-table

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
2022-11-24 12:21:59 +00:00
Erik Faye-Lund 7906361787 Apply 1 suggestion(s) to 1 file(s)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19974>
2022-11-24 08:55:20 +00:00
Lionel Landwerlin 61bdc2a2e0 docs/perfetto: update section about vulkan app tracing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 18e820009d ("common/utrace: Refactor and combine all envvars into `GPU_TRACES`")
Fixes: 8370a0d6bf ("common/utrace: Prefix all environment variables with `MESA_`")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19974>
2022-11-24 10:40:04 +02:00
Filip Gawin a126ed19f9 r300: fix r300_max_vertex_count
(seems like we counted size twice)

Helps with:
dEQP-GLES2.functional.draw.draw_elements.points.single_attribute
dEQP-GLES2.functional.draw.draw_elements.points.multiple_attributes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19703>
2022-11-24 08:06:22 +00:00
Samuel Pitoiset 00bc06bc27 zink/ci: mark the two remaining GLES3 failures as CTS test bug
This means Zink/RADV could be conformant against GLES3!

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7395
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19932>
2022-11-24 07:41:20 +00:00
Martin Roukala (né Peres) e3506dd06f radv/ci: don't download back the vkd3d-proton.cache files
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>
2022-11-24 06:54:44 +00:00
Martin Roukala (né Peres) 909fa621c4 radv/ci: set B2C_JOB_VOLUME_EXCLUSIONS in all jobs
This will also speed up the execution time of non-vkcts jobs.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>
2022-11-24 06:54:44 +00:00
Martin Roukala (né Peres) bd743d7db5 radv/ci: do not sync back the install folder
When a job is over, we download back all the files generated by the
job. This however includes the mesa install/ folder which is close
to 1G in size.

This commit adds the install/ folder to the exclusion list for the
volume mirroring.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>
2022-11-24 06:54:44 +00:00
Martin Roukala (né Peres) 128a19caf1 radv/ci: run test automatically only for the mesa namespace
The Valve CI Farm uses allow lists for projects/users to prevent abuse,
so only enable automatic testing when running in the context of Mesa to
prevent failures in forks.

Suggested-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19930>
2022-11-24 06:54:44 +00:00
Yonggang Luo 3bf7791e93 util: Remove unused WIN32 and MSVC related staff in p_compiler.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19918>
2022-11-24 06:21:39 +00:00
Yonggang Luo f70f20433b util: Rename PIPE_CDECL to UTIL_CDECL and moved into util/macros.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19918>
2022-11-24 06:21:39 +00:00
Yonggang Luo b0203b5d47 util: Move EXCLUSIVE_CACHELINE and CACHE_LINE_SIZE macros into u_memory.h
They are coupled with MALLOC_STRUCT_CL,  so  move them into a single place and accessed consistently

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19918>
2022-11-24 06:21:39 +00:00
Yonggang Luo 50ab93afde util: Remove the latest PIPE_ALIGN_VAR in p_compiler.h
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19918>
2022-11-24 06:21:39 +00:00
Yonggang Luo 5670636598 clover: Fixes -Wundef in memory.cpp
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/19926>
2022-11-24 04:33:07 +00:00
Yonggang Luo 172e8a0e6a gallium: Fixes -Wundef in draw_gs.c
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/19926>
2022-11-24 04:33:07 +00:00
Yonggang Luo 84d6a615ea util: Fixes -Wundef in u_debug_stack_test.cpp
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/19926>
2022-11-24 04:33:07 +00:00
Yonggang Luo 485505d550 util: Fixes -Wundef in u_qsort.h
Partial of: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7680

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/19926>
2022-11-24 04:33:07 +00:00
Yonggang Luo d1d2e0efcd mesa: Fixes -Wundef in arbprogparse.c
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/19926>
2022-11-24 04:33:07 +00:00
Yonggang Luo 37e863f3c1 util: Fixes -Wundef in util/compiler.h
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/19926>
2022-11-24 04:33:07 +00:00
Yonggang Luo b461921ed8 gallivm: use valid LLVM_VERSION_MAJOR instead of LLVM_VERSION
Partial of: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7680
Fixes: 203920d4c6 ("gallivm: add atomic 32-bit float support")

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/19926>
2022-11-24 04:33:07 +00:00
Yonggang Luo 970c8dfd98 r600: Fixes -Werror,-Wunused-but-set-variable for clang-15
one of the error messages:
../../src/gallium/drivers/r600/r600_asm.c:2528:8: error: variable 'o' set but not used [-Werror,-Wunused-but-set-variable]
                        int o = 0;
                            ^

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>
2022-11-24 02:56:03 +00:00
Yonggang Luo cdbe1ad570 aco: Fixes -Werror,-Wbitwise-instead-of-logical for clang-15 in aco_optimizer.cpp
error message:
error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>
2022-11-24 02:56:03 +00:00
Yonggang Luo 55b35e6193 mesa: fixes -Werror,-Wunused-but-set-variable for clang-15 in program_parse.y
error message:
src/mesa/program/program_parse.tab.c:1952:9: error: variable 'yynerrs' set but not used [-Werror,-Wunused-but-set-variable]
    int yynerrs = 0;
        ^

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>
2022-11-24 02:56:03 +00:00
Yonggang Luo 77c29bfffd mesa: indent fixes after replace tab with 3 space by find and replace in program/program_parse.y
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>
2022-11-24 02:56:03 +00:00
Yonggang Luo 59fb86ea6f mesa: replace tab with 3 space in mesa/program/program_parse.y by tools
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19969>
2022-11-24 02:56:03 +00:00
Thomas Debesse 20c936bee1 rusticl: print missing context features
Signed-off-by: Thomas Debesse <dev@illwieckz.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19498>
2022-11-23 23:55:29 +00:00
Alyssa Rosenzweig bdc240e13e meson: Don't depend on expat for !use_xmlconfig
If we don't use xmlconfig, expat becomes an optional dependency on
Linux/BSD, which may be convenient for embedded systems that do not
otherwise need expat. (expat is so ubiquitous that this
probably doesn't matter a ton in practice, but fewer required Mesa deps
is probably nice anyway.)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
2022-11-23 23:14:10 +00:00
Alyssa Rosenzweig 6cd392cbe2 util: Gate installing drirc on use_xmlconfig
Pointless otherwise. This should shrink the on-disk size of the Android and
Windows builds slightly, but I have not tested this.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
2022-11-23 23:14:10 +00:00
Alyssa Rosenzweig 662bb5977b util: Add xmlconfig build option
On embedded Linux, we can hardcode the driconf file (00-mesa-defaults.conf) with
no possibility of the file changing after the build. The static driconf
implementation, used on Windows and Android, suffices for that use case. It is
undesireable for these platforms to depend on expat or to spend time during app
start-up parsing driconf XML.

We already have the static driconf implemented, all we need is a meson option to
opt-out of runtime xmlconfig on Linux and use the static version instead.

To opt-out of runtime xmlconfig, build Mesa with -Dxmlconfig=disabled.

v2: Expand out feature.require() since it was only added in meson 0.59.0.

v3: Use more concise Meson syntax (Dylan)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> [v2]
Reviewed-by: Eric Engestrom <eric@igalia.com> [v2]
Reviewed-by: Emma Anholt <emma@anholt.net>
Tested-by: Chris Healy <healych@amazon.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
2022-11-23 23:14:10 +00:00
Alyssa Rosenzweig fb0a4a5d6c util: Define WITH_XMLCONFIG from Meson
This will allow us to disable runtime xmlconfig even outside of Windows/Android.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
2022-11-23 23:14:10 +00:00
Alyssa Rosenzweig fc6bb13945 zink: Don't check WITH_XMLCONFIG
It's not necessary -- no other driver does this despite most drivers having a
driconf check like Zink does -- and it adds a problematic cross-tree dependency.
This was been a relic from when xmlconfig didn't work at all on Windows, added
in commit 834b69d1ef ("zink: fix win32 build"). That has been replaced the
"static" xmlconfig only, which is good for almost everyone enough in practice.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19626>
2022-11-23 23:14:10 +00:00
Alyssa Rosenzweig 218ddd032e docs/features: Get Asahi on the board
We support a good chunk of GL 3.x now ... let's get us on the board so that
Mesamatrix can get onto solving the challenging problem of deciding what colour
to use for Asahi ;-)

Table filled out to the best of my abilities, there may be inaccuracies or
omissions.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19944>
2022-11-23 23:08:03 +00:00
Christian Gmeiner 4f5e59d114 etnaviv: Hide MSAA support behind debug flag
With the current level of MSAA support we have some real world rendering
problems in Chromium/Skia (issue #7678). Convert the MSAA support to an
explicit opt-in by settings ETNA_MESA_DEBUG=msaa.

Cc: 22.3 mesa-stable
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19870>
2022-11-23 21:12:11 +00:00
Eric Engestrom 4002640f8d docs: update calendar for 22.3.0-rc4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19965>
2022-11-23 21:06:33 +00:00
Marek Olšák 3a406688f2 st/mesa: only call st_manager_validate_framebuffers at FBO change or SwapBuffers
Hopefully this doesn't break anything.

There are a lot of places that invalidate drawables, but no place attempted
to call the context directly like this. A few places don't even have
the context.

Explanation:

The DRI frontend uses a global atomic counter per drawable that is
incremented when that drawable changed buffers.
st_manager_validate_framebuffers checks for that atomic counter and
updates the framebuffer state if there is any change. This was called at
every state update, so likely before almost every draw (!!!).

This commit changes that. Everything is the same except that the change
of buffers will not be noticed until the beginning of the next frame or
when the framebuffer state update is triggered by something else.

The effect is that we don't waste time calling
st_manager_validate_framebuffers a million times per frame.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19775>
2022-11-23 20:37:02 +00:00
Alyssa Rosenzweig 044428211c pan/mdg: Fix out-of-order execution
We can go up to 15 instructions out of order (performance fix) but we
can't go past a branch (bug fix).

Fixes: 30a393f458 ("pan/mdg: Enable out-of-order execution after texture ops")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19762>
2022-11-23 20:23:50 +00:00