Commit Graph

147971 Commits

Author SHA1 Message Date
Qiang Yu c7d5e91b6b loader/dri3: replace is_pixmap with drawable type
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>
2021-12-07 03:26:13 +00:00
Qiang Yu d19013a199 loader/dri3: setup present event with drawable type info
If we already know the drawable type, setup event in a simpler way.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>
2021-12-07 03:26:13 +00:00
Qiang Yu 6508e5b4a1 loader/dri3: pack window present event setup into a function
For simplicity and latter commits.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>
2021-12-07 03:26:13 +00:00
Qiang Yu 9faa2892b9 loader/dri3: remove unused present capability query
The query result is not used anywhere.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>
2021-12-07 03:26:13 +00:00
Qiang Yu 13bf30583c loader/dri3: add drawable type set by GLX and EGL
Drawable type include more information which can be used
to distinguish pixmap and pbuffer which both treated as
pixmap before.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>
2021-12-07 03:26:13 +00:00
Qiang Yu 887f5a6320 glx: add drawable type argument when create drawable
For distinguish different behavior of pixmap and pbuffer
in latter commits.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>
2021-12-07 03:26:13 +00:00
Qiang Yu 6625c960c5 glx: check drawable type before create drawble
If glxDrawable is not a X window ID, we can only support
GLXPbuffer now.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>
2021-12-07 03:26:13 +00:00
Qiang Yu bc8a51a79a glx: no need to create extra pixmap for pbuffer
XServer already created a pixmap with same id as pbuffer,
so that other client can use the pbuffer id to do
glXMakeCurrent(). But with a hidden pixmap, we can't do
this.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13750>
2021-12-07 03:26:13 +00:00
Timothy Arceri 51f71e0483 util: add workaround for SNK HEROINES Tag Team Frenzy
The game makes use of builtin functions that were moved to
compatibility shaders in GLSL 4.20 in its GLSL 4.20 shaders
without declaring the compatibility token.

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

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14040>
2021-12-07 02:53:04 +00:00
Timothy Arceri f225e0679a util: add dri config option force_compat_shaders
This allows us to force all shaders to offer shader features only
provided to compatibility shaders.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14040>
2021-12-07 02:53:04 +00:00
Kenneth Graunke 2d7c25fb9d isl: Move some genxml surface state helpers into an include file
On XeHP, the XY_BLOCK_COPY_BLT command has a number of fields that
describe the layout of the surface, much like SURFACE_STATE does.

Several of them are encoded in such a similar manner that we really
would like to reuse the isl helpers for emitting those.  This commit
moves them into a new isl_genX_helpers.h file which I can include
from the BLORP code.  (The alternative would be to add XY_BLOCK_COPY_BLT
filling commands to isl, but that...seems more like a BLORP feature.)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14094>
2021-12-06 17:23:56 -08:00
Kenneth Graunke b3b63c795f iris: Rename is_render_target to is_dest in a few blit functions
When targeting the blitter or compute engines, the destination is not
really a render target.  But it's still useful to know whether we're
talking about the source or destination.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14094>
2021-12-06 17:23:56 -08:00
Emma Anholt 65e343dda3 r300: Fix mis-optimization turning -1 - x into 1 - x.
Cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14092>
2021-12-07 01:08:01 +00:00
Emma Anholt 0e0a49039b r300: Turn a comment about presub into an assert.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14092>
2021-12-07 01:08:01 +00:00
Emma Anholt ce0e228ff4 r300: Add deqp expectations for RV515.
This may not be a complete set, as I haven't been able to run dEQP-GLES2
to completion (GPU hangs at some point, no particular test seems to be
guilty).  But this will help me assess NIR-to-TGSI for the driver.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14092>
2021-12-07 01:08:01 +00:00
Timothy Arceri 3580ffaa44 doc: update source tree doc to reflect recent classic/swrast deletions
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14078>
2021-12-07 01:01:37 +00:00
Dylan Baker 2636e8681a fixup! gallium/swr: Remove driver source
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>
2021-12-06 23:37:50 +00:00
Dylan Baker fb4fc1fd50 new_features: Add OpenSWR removal
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>
2021-12-06 23:37:50 +00:00
Dylan Baker 7dd12694f1 CODEOWNERS: remove OpenSWR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>
2021-12-06 23:37:50 +00:00
Jan Zielinski ce4c96ea1b gallium/swr: clean up the documentation after SWR removal from main
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>
2021-12-06 23:37:50 +00:00
Jan Zielinski e2de00876a gallium/swr: Remove common code and build options
This commit removes all OpenSWR references from common Mesa code
and build system.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>
2021-12-06 23:37:50 +00:00
Jan Zielinski 855793c6c6 gallium/swr: Remove driver source
The OpenSWR will be maintained on a classic/LTS branch.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11264>
2021-12-06 23:37:50 +00:00
Pierre Moreau d22d328859 nv50/nir: Switch to the common NIR options
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14069>
2021-12-06 23:25:28 +00:00
Alyssa Rosenzweig 46b758cbcc pan/va: Add table parameter to LD_ATTR_IMM
..and test the instruction.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>
2021-12-06 23:06:59 +00:00
Alyssa Rosenzweig a5084127eb pan/va: Add sample/update modes to LD_VAR
..and test the new instructions. As usual, the semantics are the same as
bifrost, but the encoding is simpler.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>
2021-12-06 23:06:59 +00:00
Alyssa Rosenzweig 3485e9dd3d pan/va: Make LD_VAR index more fine-grained
Index in bytes instead of vec4s, since varyings on Valhall are no longer
vec4 based like on previous Malis.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>
2021-12-06 23:06:59 +00:00
Alyssa Rosenzweig 7d157ae50e pan/va: Add more assembler tests
For new patterns

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>
2021-12-06 23:06:59 +00:00
Alyssa Rosenzweig f3d4d074da pan/va: Disambiguate sign of CSEL instructions
The naming scheme is a bit simpler than Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>
2021-12-06 23:06:59 +00:00
Alyssa Rosenzweig 9da627fd6d pan/va: Improve assembler unit test output
Instead of using Python hex() to print the result, print the result in
the same format as the disassembler for easy visual comparison. This
means we don't need to reprint the expectation. This gives output like:

   7c 7d 11 33 04 80 66 00    LD_ATTR_IMM.v4.f16.slot0 @r0:r1, `r60, `r61, index:0x1
   7c 7d 10 33 04 80 66 00    Incorrect assembly

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14065>
2021-12-06 23:06:59 +00:00
Dylan Baker 3ae3569d82 meson: restore dri.pc file
Which was accidentally deleted.

Fixes: ea8fa10edd
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5717
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14090>
2021-12-06 22:42:34 +00:00
Dave Airlie 2feee3b0b0 mesa/externalobject: delete unused functions
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>
2021-12-06 22:08:40 +00:00
Dave Airlie 2db58c3f89 mesa/barrier: remove unused barrier functions
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>
2021-12-06 22:08:40 +00:00
Dave Airlie 26bd234d06 mesa/transformfeedback: remove unused transform feedback code
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>
2021-12-06 22:08:39 +00:00
Dave Airlie b7eb7bd47b mesa: remove unused buffer object code.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>
2021-12-06 22:08:39 +00:00
Dave Airlie a7c7f55a3b mesa/syncobj: drop unused syncobj code.
This is all done in the state tracker now

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>
2021-12-06 22:08:39 +00:00
Dave Airlie ae9c96ea17 mesa/query: remove all the mesa queryobj code.
This is all unused in favour of the state tracker code.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14075>
2021-12-06 22:08:39 +00:00
Dave Airlie 711176bc0c iris/ci: comment out iris-cml-traces-performance due to hw unavailable
This job seems to be timing out, daniels said hw was having some
availability issues, so turn off for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14088>
2021-12-06 21:19:51 +00:00
Alyssa Rosenzweig 9b068f186a panfrost: Add Valhall support to pandecode
Valhall v9 introduces a number of new data structures since Bifrost v7,
and removes a number of traditional data structures. Add decode routines
for the new Valhall data structures, and condition the old routines on
(PAN_ARCH <= 7) to remain buildable and warning-free.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>
2021-12-06 20:46:09 +00:00
Alyssa Rosenzweig 745d7db748 panfrost: Don't shadow Mesa's fui()
Will fix a compiler error when we #include the Valhall disassembler
header from pandecode.

Fixes: 688827f3c5 ("pan/va: Add disassembler generator")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>
2021-12-06 20:46:09 +00:00
Alyssa Rosenzweig 244f3704d4 panfrost: Zero initialize disassembler stats
Keep it simple for introducing new support.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>
2021-12-06 20:46:09 +00:00
Alyssa Rosenzweig 96acad5cd5 panfrost: Add XML for Valhall data structures
Fork the latest canonical XML (Bifrost v7) and adapt to the data
structures found in the earliest Valhall GPU I could get my hands on
(Valhall v9). This should minimize the churn needed for the port by
keeping the Valhall model close to the Bifrost we already supported.

It is not known what happened to v8. It appears to have been yeeted from
existence.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>
2021-12-06 20:46:09 +00:00
Alyssa Rosenzweig 6eb0770be8 panfrost: Add "hex" type to GenXML
Although known fields wouldn't be given the type "hex", it is useful as
the default type for unknown fields while reverse-engineering, and as
such is used in the Valhall XML.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>
2021-12-06 20:46:09 +00:00
Alyssa Rosenzweig 72b3f21cd4 pan/va: Only hex dump when verbosely disassembling
Closer behaviour to Bifrost, making the entrypoints symmetric.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>
2021-12-06 20:46:09 +00:00
Alyssa Rosenzweig 7fa5382ad6 pan/bi: Link with Valhall disassembler
For pandecode's use.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>
2021-12-06 20:46:09 +00:00
Marek Olšák de5c863a52 mesa: use simple_mtx_t for TexMutex (v2)
change mtx_recursive -> mtx_plain, there's no recursive locking

Let's try this again!  This was originally landed as f6abb3445b
("mesa: use simple_mtx_t for TexMutex") and then reverted with
781c0eafcf ("Revert "mesa: use simple_mtx_t for TexMutex"") because it
broke i965.  Now that i965 is no longer in the tree, we can restore it.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> (v1)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14053>
2021-12-06 20:17:02 +00:00
Ian Romanick b88202b0e4 nir/constant_folding: Optimize txb with bias of constant zero to tex
v2: Fail gracefully when bias_idx < 0.  See comment in the code for the
rationale.  See also issue #5722.

All Haswell and newer Intel GPUs had similar results. (Ice Lake shown)
total instructions in shared programs: 19757733 -> 19753431 (-0.02%)
instructions in affected programs: 277248 -> 272946 (-1.55%)
helped: 1644
HURT: 1
helped stats (abs) min: 1 max: 16 x̄: 2.62 x̃: 2
helped stats (rel) min: 0.05% max: 11.11% x̄: 2.11% x̃: 1.61%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.35% max: 0.35% x̄: 0.35% x̃: 0.35%
95% mean confidence interval for instructions value: -2.72 -2.51
95% mean confidence interval for instructions %-change: -2.19% -2.03%
Instructions are helped.

total cycles in shared programs: 938517439 -> 938384079 (-0.01%)
cycles in affected programs: 19548849 -> 19415489 (-0.68%)
helped: 1358
HURT: 269
helped stats (abs) min: 1 max: 2328 x̄: 133.01 x̃: 16
helped stats (rel) min: <.01% max: 41.12% x̄: 1.40% x̃: 0.48%
HURT stats (abs)   min: 1 max: 1302 x̄: 175.70 x̃: 30
HURT stats (rel)   min: <.01% max: 69.03% x̄: 6.24% x̃: 1.04%
95% mean confidence interval for cycles value: -99.14 -64.79
95% mean confidence interval for cycles %-change: -0.47% 0.19%
Inconclusive result (%-change mean confidence interval includes 0).

LOST:   21
GAINED: 32

All Ivy Bridge and older Intel GPUs had similar results. (Ivy Bridge shown)
total instructions in shared programs: 15302017 -> 15301485 (<.01%)
instructions in affected programs: 22565 -> 22033 (-2.36%)
helped: 168
HURT: 0
helped stats (abs) min: 1 max: 7 x̄: 3.17 x̃: 3
helped stats (rel) min: 0.04% max: 4.39% x̄: 3.05% x̃: 3.27%
95% mean confidence interval for instructions value: -3.45 -2.89
95% mean confidence interval for instructions %-change: -3.19% -2.91%
Instructions are helped.

total cycles in shared programs: 550119761 -> 549989147 (-0.02%)
cycles in affected programs: 12834251 -> 12703637 (-1.02%)
helped: 164
HURT: 0
helped stats (abs) min: 20 max: 4547 x̄: 796.43 x̃: 294
helped stats (rel) min: 0.23% max: 53.84% x̄: 2.05% x̃: 0.37%
95% mean confidence interval for cycles value: -942.62 -650.24
95% mean confidence interval for cycles %-change: -3.17% -0.94%
Cycles are helped.

fossil-db results:

Tiger Lake, Ice Lake, and Skylake had similar results. (Ice Lake shown)
Instructions in all programs: 142073649 -> 141307526 (-0.5%)
SENDs in all programs: 6876848 -> 6876778 (-0.0%)
Loops in all programs: 38283 -> 38283 (+0.0%)
Cycles in all programs: 8410049681 -> 8402902960 (-0.1%)
Spills in all programs: 190623 -> 190599 (-0.0%)
Fills in all programs: 297780 -> 297756 (-0.0%)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14025>
2021-12-06 19:50:42 +00:00
Michel Zou fadb4b92c5 llvmpipe: Fix Wpointer-to-int-cast
Fixes: 2771fd4a (gallium, windows: Use HANDLE instead of FD for external objects)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14021>
2021-12-06 19:00:29 +00:00
Emma Anholt 9b2600da87 mesa/st: Remove GL_ARB_depth_clamp emulation support.
This was useful for emulating GL 3.2 in virgl on a GLES3 host renderer,
before GL_EXT_depth_clamp introduced the ability for hardware drivers to
expose the feature on GLES.  Now that we have that, the desktop-GL-capable
HW that virgl cares about can expose desktop GL even on its GLES renderer
on the host without this emulation.  I don't think anyone particularly
cares about hitting higher GL versions on actually-core-GLES hosts with
virgl.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13729>
2021-12-06 18:17:25 +00:00
Yonggang Luo c691149f3e win32: Fixes thread local on win32 with clang/mingw (!14062)
The mingw compiling error:
```
../../src/mapi/glapi/glapi.h:86:66: error: '_glapi_tls_Dispatch' cannot be thread local when declared 'dllimport'
_GLAPI_EXPORT extern __THREAD_INITIAL_EXEC struct _glapi_table * _glapi_tls_Dispatch;
                                                                 ^
../../src/mapi/glapi/glapi.h:88:51: error: '_glapi_tls_Context' cannot be thread local when declared 'dllimport'
_GLAPI_EXPORT extern __THREAD_INITIAL_EXEC void * _glapi_tls_Context;
```

Fixes: c47fd3dc ("windows: Use TLS context/dispatch with shared-glapi")

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/14062>
2021-12-06 14:55:54 +00:00
Jesse Natalie 9626595026 nir: Add an 'external' texture type for parity with samplers
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14046>
2021-12-06 14:21:38 +00:00