Commit Graph

136854 Commits

Author SHA1 Message Date
Nanley Chery 9acf0316ec iris: Use the aux BO and surf less during init
res->aux.bo and res->aux.surf will be NULL and zeroed, respectively, for
CCS on XeHP. Move and modify iris_resource_init_aux_buf to support this.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13555>
2021-12-11 04:14:20 +00:00
Nanley Chery 02bbdb0e92 iris: Change a param of iris_resource_init_aux_buf
Have iris_resource_init_aux_buf compute the clear color state size
(with an iris_screen struct) instead of passing it in directly.

We're going to move the function call soon. This keeps us from having to
move a passed in variable along with it.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13555>
2021-12-11 04:14:20 +00:00
Nanley Chery 18231fc548 intel/blorp: Modify get_fast_clear_rect for XeHP
The alignment and scale down values have changed on this platform.

To support drivers that won't use a CCS surface on this platform, this
patch computes the CCS fast clear rectangle using the main surface.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13555>
2021-12-11 04:14:20 +00:00
Nanley Chery c35b8a2889 intel/blorp: Modify the SKL+ CCS resolve rectangle
According to Bspec 2424, "Render Target Resolve":

   The Resolve Rectangle size is same as Clear Rectangle size from SKL+.

Use get_fast_clear_rect in blorp_ccs_resolve for SKL+.

Note that the Bspec differs from Vol7 of the Sky Lake PRM, which only
specifies aligning by the scaledown factors.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13555>
2021-12-11 04:14:20 +00:00
Nanley Chery 91128b1a0f intel/isl: Require aux map for some 64K alignment
The comment states that 64K alignment of surfaces is required when an
aux map is present on the platform. However, the code checks for GFX12
instead of dev->info->has_aux_map. Update the code to match the comment.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13555>
2021-12-11 04:14:20 +00:00
Jesse Natalie 46ef1e8389 ci/windows: Remove line numbers from assertions in spirv2dxil tests
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14156>
2021-12-11 03:43:11 +00:00
Lucas Stach fc17f79f2c etnaviv: fix alpha blend with dither on older GPUs
While setting up DITHER_MODE allows alpha blending to work properly
together with dithering on new GPUs (those with PE_DITHER_FIX), older
cores still change the render target. As dithering is optional and
implementation defined we can simply disable it on the affected GPUs,
when alpha blending is enabled to work around this bug.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13396>
2021-12-11 03:06:15 +00:00
Emma Anholt d199d65c3a nir/nir_opt_move,sink: Include load_ubo_vec4 as a load_ubo instr.
We weren't doing much motion in nir-to-tgsi because we considered all our
lowered load-ubos as unmovable.

softpipe shader-db:

total temps in shared programs: 563942 -> 563136 (-0.14%)
temps in affected programs: 9833 -> 9027 (-8.20%)

r300 shader-db:

instructions in affected programs: 22858 -> 23575 (3.14%)
temps in affected programs: 2039 -> 1813 (-11.08%)

(NIR had given r300 -19% instrs for +40% temps, so this feels like a
worthwhile trade back).

Reivewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14138>
2021-12-11 02:12:27 +00:00
Erico Nunes 013900c4d2 mesa: fix GL_MAX_SAMPLES with GLES2
EXT_multisampled_render_to_texture on GLES2 allows the
GL_MAX_SAMPLES_EXT enum to be used.

Move the condition from the GLES3 section to the GLES2 one so
that it stops returning GL_INVALID_ENUM in that case.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13967>
2021-12-11 01:31:59 +00:00
Silvestrs Timofejevs c02b75d22e egl: add config debug printout
Feature to print out EGL returned configs for debug purposes.

'eglChooseConfig' and 'eglGetConfigs' debug information printout is
enabled when the log level equals '_EGL_DEBUG'. The configs are
printed, and if any of them are "chosen" they are marked with their
index in the chosen configs array.

v2:
   a) re-factor the code in line with review comments
   b) rename function _snprintfStrcat, split it out and put into the
      src/util/u_string.h, make it a separate patch.
v3:
   remove unnecessary 'const' qualifiers from the function prototype
v4:
   a) re-factor the code in line with review comments
   b) move util_strnappend from utils back to eglconfigdebug.c. In my
      opinion this function is the best way of achieving the desired
      result, so it still used but made private to eglconfigdebug.c.
v5:
   a) drop unused parameter from function signature
   b) more const annotations
   c) directly access config parameters instead of going
      through _eglGetConfigKey

Signed-off-by: Silvestrs Timofejevs <silvestrs.timofejevs@imgtec.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13705>
2021-12-11 00:25:04 +00:00
Silvestrs Timofejevs f927a5c3d2 egl: introduce a log level getter function
Being able to retrieve the log level can be useful to enable/disable
debug code. The alternative, which is calling 'getenv' function every
time to retrieve the log level, is more "expensive".

Signed-off-by: Silvestrs Timofejevs <silvestrs.timofejevs@imgtec.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13705>
2021-12-11 00:25:04 +00:00
Jordan Justen fd2a558bf8 intel/l3: Make DG1 urb-size exception more generic
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14136>
2021-12-11 00:09:50 +00:00
Rhys Perry c7fa15b381 aco: improve clrx disassembly
- remove uninteresting lines of output
- remove binary offset before instructions, for easier diffing
- replace generated labels with block numbers
- add encoded instructions at the end of lines, like LLVM dissaembly
- print constant data instead of trying to disassemble it

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14042>
2021-12-10 23:46:30 +00:00
Jesse Natalie 11eb03c44e microsoft/compiler: Remove algebaric pass for inot
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14140>
2021-12-10 23:23:29 +00:00
Jesse Natalie 45354be410 microsoft/compiler: Implement inot
Fixes: cb283616 ("nir/algebraic: Small optimizations for SpvOpFOrdNotEqual and SpvOpFUnordEqual")
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14140>
2021-12-10 23:23:29 +00:00
Khem Raj 249556dad8 v3dv: account for 64bit time_t on 32bit arches
This makes is a bit more portable, especially on 32bit architectures
with 64bit time_t defaults. Especially on musl its a must.

Fixes
../mesa-21.3.0/src/broadcom/vulkan/v3dv_bo.c:71:15: error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat]
              time.tv_sec);
              ^~~~~~~~~~~

Also reported here [1]

[1] https://github.com/agherzan/meta-raspberrypi/issues/969

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14118>
2021-12-10 22:26:56 +00:00
Samuel Pitoiset e2ad92eb22 radv: do not perform depth/stencil resolves for suspended render pass
From the Vulkan spec:

    "Store and resolve operations are only performed at the end of a
     render pass instance that does not specify the
     VK_RENDERING_SUSPENDING_BIT_KHR flag."

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/14112>
2021-12-10 22:03:00 +00:00
Samuel Pitoiset c27348a3f7 Revert "radv: Add bufferDeviceAddressMultiDevice support."
This was a workaround for fixing a crash with Baldur's Gate 3 at start
but the game fixed it since.

This reverts commit 1fe375e7cf.

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/14134>
2021-12-10 21:38:00 +00:00
Jason Ekstrand b8d04863e2 intel/fs: Drop high_quality_derivatives
We've never bothered to hook it up in crocus or iris.  If we do in the
future, it should probably be a NIR pasa anyway.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14056>
2021-12-10 21:20:47 +00:00
Jason Ekstrand 6dc9958bf3 intel/compiler: Get rid of wm_prog_key::frag_coord_adds_sample_pos
This hasn't actually done anything for a while.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14056>
2021-12-10 21:20:47 +00:00
Jason Ekstrand 278d12f991 intel/fs,vec4: Drop prog_data binding tables
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14056>
2021-12-10 21:20:47 +00:00
Jason Ekstrand e49f65dfe0 intel/blorp: Stop depending on prog_data binding tables
Instead, set BLORP_TEXTURE_BT_INDEX on the texture instructions
directly.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14056>
2021-12-10 21:20:47 +00:00
Jason Ekstrand 4fa58d27a5 intel/fs,vec4: Drop support for shader time
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14056>
2021-12-10 21:20:47 +00:00
Jason Ekstrand 8f3c100d61 intel/fs,vec4: Drop uniform compaction and pull constant support
The only driver using these was i965 and it's gone now.  This is all
dead code.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14056>
2021-12-10 21:20:47 +00:00
Jason Ekstrand 4175ed5099 crocus: wm_prog_key::key_alpha_test uses GL enums
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14141>
2021-12-10 21:09:00 +00:00
Danylo Piliaiev c82d7e3617 turnip: Fix operator precedence in address calculation macros for queries
Fixes crash in Oblivion, Skyrim, Crysis running through DXVK on 32b
systems.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5723
Fixes: 937dd76426 "turnip: Implement VK_KHR_performance_query"

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14148>
2021-12-10 17:45:02 +00:00
Emma Anholt 5887768f48 nir_to_tgsi: Enable nir_opt_move.
This moves some ops down to when they're needed, generally reducing the
number of temps in use.  It's not always a win -- sometimes you can end up
moving a generator of a component used by a nir_op_vec down, which means
that op's sources stay live while the vec (whose register likely gets
coalesced with the ops creating it) is also live.  But it's generally
good.

softpipe results:

temps in affected programs: 18115 -> 18026 (-0.49%)
imm in affected programs: 19 -> 22 (15.79%)

r300 results:

instructions in affected programs: 174 -> 178 (2.30%)
vinst in affected programs: 156 -> 160 (2.56%)
sinst in affected programs: 54 -> 50 (-7.41%)
temps in affected programs: 2634 -> 2169 (-17.65%)

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14096>
2021-12-09 22:15:53 +00:00
Emma Anholt 7d2ea9b0ed r300: Request NIR shaders from mesa/st and use NIR-to-TGSI.
This brings us into parity on state tracker paths with most other
supported drivers, and a lot of additional optimization on our shaders.

Results on a subset of shader-db that doesn't crash:

instructions in affected programs: 59502 -> 47991 (-19.35%)
vinst in affected programs: 17633 -> 15197 (-13.82%)
sinst in affected programs: 9296 -> 7319 (-21.27%)
flowcontrol in affected programs: 627 -> 310 (-50.56%)
presub in affected programs: 4220 -> 1554 (-63.18%)
temps in affected programs: 5775 -> 8570 (48.40%)
lits in affected programs: 215 -> 37 (-82.79%)

The temps (register usage) increase is unfortunate, but it seems that
instruction counts tend to be our limit before reg counts are.

Fixes: #3354
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14096>
2021-12-09 22:15:53 +00:00
Emma Anholt e68a9b0339 r300: Disable loop unrolling on r500.
It's buggy, and we should just trust GLSL or NIR to do unrolling for us.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14096>
2021-12-09 22:15:53 +00:00
Emma Anholt 495a4cfbc3 nir_to_tgsi: Make !native_integers front face input match glsl_to_tgsi.
Avoids regression on r300, which has 0.0 vs 1.0 frontface despite what
tgsi.rst says.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14096>
2021-12-09 22:15:53 +00:00
Emma Anholt f1647525ab nir/nir_to_tgsi: Add support for "if" statements with !native_integers
Previously we've only used this on HW that had all ifs lowered.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14096>
2021-12-09 22:15:53 +00:00
Emma Anholt 0b651db795 r300/ci: Add some piglit expectations.
Not a full run, but a bit of sanity-check for the NTT change.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14096>
2021-12-09 22:15:53 +00:00
Ian Romanick c5d731ac5c intel/stub: Implement I915_PARAM_HAS_USERPTR_PROBE
Just say no for now.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14132>
2021-12-09 10:57:57 -08:00
Ian Romanick 832db9d900 intel/stub: Implement DRM_I915_QUERY_MEMORY_REGIONS
Borrowed from sim-drm.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14132>
2021-12-09 10:57:55 -08:00
Ian Romanick 4c429b6be6 intel/stub: Implement DRM_I915_QUERY_ENGINE_INFO
Borrowed from sim-drm.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14132>
2021-12-09 10:57:53 -08:00
Ian Romanick 12d35892e0 intel/stub: Suppress warnings about DRM_I915_QUERY_PERF_CONFIG
There's not a useful way to implement this, so just silence the warning
to cleanup shader-db runs.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14132>
2021-12-09 10:57:48 -08:00
Rhys Perry 786d434397 aco: don't create unnecessary addition in indirect get_sampler_desc()
I don't think this has any effect on GFX9+ because the addition is
combined into the load.

fossil-db (polaris10):
Totals from 12595 (9.29% of 135627) affected shaders:
SGPRs: 1054348 -> 1054860 (+0.05%); split: -0.02%, +0.07%
VGPRs: 667240 -> 667320 (+0.01%); split: -0.01%, +0.02%
CodeSize: 82761508 -> 82512816 (-0.30%); split: -0.30%, +0.00%
MaxWaves: 62182 -> 62181 (-0.00%)
Instrs: 16072934 -> 16010764 (-0.39%); split: -0.39%, +0.00%
Latency: 582819635 -> 582287964 (-0.09%); split: -0.13%, +0.04%
InvThroughput: 276460536 -> 276417613 (-0.02%); split: -0.06%, +0.05%
VClause: 261656 -> 261654 (-0.00%); split: -0.01%, +0.01%
SClause: 680952 -> 680854 (-0.01%); split: -0.05%, +0.04%
Copies: 1727202 -> 1727742 (+0.03%); split: -0.12%, +0.15%
Branches: 547050 -> 547033 (-0.00%); split: -0.01%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14043>
2021-12-09 17:58:54 +00:00
Timur Kristóf 77db4e27b1 aco: Clean up and fix quad group instructions with WQM.
According to the Vulkan spec chapter 9.25 Helper Invocations,
quad group operations have to be executed by helper invocations.

This commit cleans up the code for quad group instructions by
unifying the code path of quad broadcast with the others, and then
calling emit_wqm just once at the end.

Fixes: 93c8ebfa78
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5570
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13929>
2021-12-09 17:36:51 +00:00
Emma Anholt af163d7220 loader: Restore i915g support.
The cleanup of i915c cleaned up our PCI ID list.

Fixes: 0cad451f00 ("classic/i915: Remove driver")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14131>
2021-12-09 09:05:23 -08:00
Qiang Yu c50bdacbda glx: fix regression for drawable type detection
Newer version of XServer supporting GLX_DRAWABLE_TYPE query also
support query with raw X11 window ID besides GLXWindow ID. So we
should not limit the suppported type to GLXPbuffer when query
success.

Otherwise can't start GLX application on newer XServer with:

  libGL error: GLX drawable type is not supported
  libGL error: GLX drawable type is not supported
  X Error of failed request:  GLXBadContext
    Major opcode of failed request:  149 (GLX)
    Minor opcode of failed request:  5 (X_GLXMakeCurrent)
    Serial number of failed request:  35
    Current serial number in output stream:  35

Fixes: 6625c960c5 ("glx: check drawable type before create drawble")

Tested-by: Mike Lothian <mike@fireburn.co.uk>
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/14120>
2021-12-09 00:52:17 +00:00
Ian Romanick ff74d5dd1b intel/compiler: Don't store "scalar stage" bits on Gfx8 or Gfx9
Since 1d71b1a311, only Gfx7 and earlier have any vec4 stages ever.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14128>
2021-12-08 14:59:32 -08:00
Ian Romanick 4563261ad1 intel/compiler: Don't predicate a WHILE if there is a CONT
Previously a predicated BREAK that appeared immediately before the WHILE
would get merged into the WHILE.  This doesn't work if other flow
control (e.g., a CONT) can transfer directly to the WHILE.

On Intel platforms, this fixes the CTS test
dEQP-VK.graphicsfuzz.stable-binarysearch-tree-nested-if-and-conditional.

No shader-db changes on any Intel platform.

When this commit was first created (over a month before it is going to
land), there were some regressions that were prevented by other commits
in MR !13095.  That does not appear to be the case now, so I don't know
what changed.  Basically, the treatment of discard as a combination of
demote and terminate causes additional continues in some loops, and
those continues trigger this bug.  The other commits from that MR
prevent those continues from being generated in the first place.

All Intel platforms had simlar fossil-db results. (Ice Lake shown)
Instructions in all programs: 144419989 -> 144419995 (+0.0%)
SENDs in all programs: 6947332 -> 6947332 (+0.0%)
Loops in all programs: 38277 -> 38277 (+0.0%)
Spills in all programs: 204075 -> 204075 (+0.0%)
Fills in all programs: 319480 -> 319480 (+0.0%)

A few shaders in Doom 2016 were hurt by one instruction each.  It seems
likely that these shaders would have experienced at least some
mis-rendering.

Closes: #4213
Fixes: d13bcdb3a9 ("i965/fs: Extend predicated break pass to predicate WHILE.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14128>
2021-12-08 14:56:32 -08:00
Dave Airlie d051854cca treewide: drop mtypes/macros includes from main
These aren't required in lots of places, so remove them.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14127>
2021-12-08 22:14:45 +00:00
Roman Stratiienko 72db15913f v3dv: Fix dEQP-VK.info#instance_extensions test
When mesa3d is built without VK_USE_PLATFORM_DISPLAY_KHR definition,
dEQP test fails:

    dEQP    : Test case 'dEQP-VK.info.instance_extensions'..
    dEQP    :   Fail (Extension VK_KHR_get_display_properties2 is missing
                                                 dependency: VK_KHR_display)
    dEQP    : DONE!

Enable KHR_get_display_properties2 only if VK_USE_PLATFORM_DISPLAY_KHR
is enabled.

Fixes: f884c2e3be ("v3dv: implement VK_KHR_get_display_properties2")
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14047>
2021-12-08 21:34:47 +00:00
Chia-I Wu b14dd3a866 venus: prefer VIRTGPU_BLOB_MEM_HOST3D for shmems
They are logically contiguously in the host.  More importantly, they
enable host process isolation.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13800>
2021-12-08 21:23:05 +00:00
Jesse Natalie fe3a800ad3 d3d12: Use overall resource format + plane format to get format info
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14123>
2021-12-08 20:46:22 +00:00
Jesse Natalie 0312142d96 d3d12: Allow creating planar resources
Also handle opening planar resources with a single handle, instead
of per-plane handles.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14123>
2021-12-08 20:46:22 +00:00
Jesse Natalie a6db805469 d3d12: Handle opening planar resources
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14123>
2021-12-08 20:46:22 +00:00
Jesse Natalie fb6479544b d3d12: Force emulation of all YUV formats using per-plane formats
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14123>
2021-12-08 20:46:22 +00:00
Bas Nieuwenhuizen 7f34b70474 radv: Use the winsys 0 cmdbuffer submission support.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14097>
2021-12-08 20:21:05 +00:00
Bas Nieuwenhuizen 7675d066ca radv/amdgpu: Add support for submitting 0 commandbuffers.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14097>
2021-12-08 20:21:05 +00:00
Bas Nieuwenhuizen 6eb0821315 radv/winsys: Add queue family param to submit.
Extracting it from the first CS will not go over well once we try
submitting 0 of them.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14097>
2021-12-08 20:21:05 +00:00
Bas Nieuwenhuizen c03d258046 radv/amdgpu: Add a syncobj per queue.
For merging our own dependencies in without submitting.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14097>
2021-12-08 20:21:05 +00:00
Dave Airlie 6d1a15f7fa mesa/st: drop Draw from dd function table.
Draw is only called in the feedback paths now, and the only thing
it is set to is the st feedback draw path.

So just always have the fallback call the draw feedback path and
get rid of the draw entry.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 5312511ea5 mesa/st: move draw indirect and xfb to direct calls.
These don't get used any other way.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 132ffc46dc mesa/st: move compute to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 28bd406f50 mesa/st: move msaa functions to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie d16f514f19 mesa/st: convert DrawTex to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 601c30c8c1 mesa/st: convert the non-optional egl image to direct calls
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 7b066ebfb3 mesa/st: move blit function to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie c9fec99c4a mesa/st: replace most of buffer funcs with direct calls.
This leaves invalidate buffer for later

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie f60add48ee mesa/st: move program calls to direct call
Can't move NewProgram yet as the GLSL standalone compiler relies
on it, can probably fix that up later.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 878cf8cae9 mesa/st: move copy image sub data to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 81eae71936 mesa/st: move viewport to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie ce9a50e6f8 mesa/st: move some context functions to direct calls
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie cb400f368a mesa/st: move clear/flush/finish to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 37fb8058fb mesa/st: move pixel/bitmap functions to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 4e13c7d46a mesa/st: move Clear to new direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 889ac0f1b9 mesa/st: move texture APIs to direct st calls
This is a bit more spreadout, but is still pretty straightforward

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 2d912b5caa mesa/st: move fbo code to direct calling
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 6d79ce5a58 mesa/dd: drop purgeable interface
This whole extension can likely be dropped, just remove dd.h
bits for now.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie b79d12bbb2 mesa/st: move perfomance monitor to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie 097646cf7c mesa/st: move perf query to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie df28e0a082 mesa/st: move query memory info to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie d0e48ef34f mesa/st: move Enable to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
Dave Airlie cc4964847b mesa/st: move rendermode to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
2021-12-08 19:06:48 +00:00
mwezdeck cdc480585c virgl/drm: New optimization for uploading textures
1. We can create resource with size of "1" on drm, because size
   is not passed to the renderer.
2. We can't create resource with size of "1" on vtest, because shmem
   is created based on that.
3. If renderer supports copy_transfer_from_host, then use staging
   buffer for transfer in both ways to and from host.

This will allow to reduce memory consumption in the guest.

v2:
   - add inline function for checking if we can use this optimization
   - add check in readback path. If renderer doesn't support
     copy transfer from host, then we need to go with previous
     path in readback (through transfer_get ioctl)

v3:
   - fix logic for readback

v4:
   - refactor the implementation to integrate it more to
     existing code base

v5:
   - reuse COPY_TRANSFER3D in both directions

v6:
   - encode direction in COPY_TRANSFER3D if host supports it

v7:
   - renamed cap bit
   - introduced COPY_TRANSFER3D_SIZE_LEGACY define

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13689>
2021-12-08 14:01:48 +00:00
Rhys Perry 420170fabc radv: initialize workgroup_size in radv_meta_init_shader
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14087>
2021-12-08 11:07:40 +00:00
Rhys Perry 85161fb8ac radv: clone shader in radv_shader_compile_to_nir
This way, radv_shader_compile_to_nir doesn't alter the NIR.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14087>
2021-12-08 11:07:40 +00:00
Rhys Perry 2020a1799b radv: include RT shaders in RADV_DEBUG=shaders,shaderstats
Instead of using module->nir or nir->info->name to determine if it's a
meta shader, use nir->info->internal.

This also has an effect of disabling printing of meta shaders with
NIR_DEBUG=print.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14087>
2021-12-08 11:07:40 +00:00
Rhys Perry d74498e617 radv: add radv_meta_init_shader
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14087>
2021-12-08 11:07:40 +00:00
James Jones c2550d1b7c gbm: Don't pass default usage flags on ABIs < 1
Older drivers will not expect any flags from the
GBM front-end when modifiers are in use, and will
likely fail the allocation or handle them
incorrectly as a result. Only specify usage flags
when allocating from a backend with an ABI >= 1,
as that's the ABI version that added support for
specifying usage flags along with modifiers.

Fixes: ad50b47a14 ("gbm: assume USE_SCANOUT in create_with_modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5709
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14049>
2021-12-08 09:49:47 +00:00
Samuel Pitoiset 31efef7b3a radv: mark GFX10.3 (aka RDNA2) as conformant products with CTS 1.2.7.1
https://www.khronos.org/conformance/adopters/conformant-products#submission_599

Also bump the CTS version for GFX8, GFX9 and GFX10 because they also
pass 1.2.7.1.

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/14076>
2021-12-08 09:27:26 +00:00
Samuel Pitoiset d2612bb424 radv: fix resume/suspend render pass with depth/stencil attachment
Shouldn't clear on resume.

This fixes dEQP-VK.dynamic_rendering.*resuming.

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/14113>
2021-12-08 09:06:27 +00:00
Samuel Pitoiset e18e857292 radv: add initial SPM support on GFX10+
RGP doesn't support previous generations. This can be enabled with
RADV_THREAD_TRACE_CACHE_COUNTERS=true.

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/13737>
2021-12-08 08:40:51 +00:00
Samuel Pitoiset f1fe91b847 radv: add few helpers for configuring performance counters
Only used for SPM but VK_KHR_performance_query will be added there.

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/13737>
2021-12-08 08:40:51 +00:00
Samuel Pitoiset 8a0052f099 radv/sqtt: always dump pipelines and shaders ISA
Even if instruction timing is disabled, both features are unrelated.

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/13648>
2021-12-08 08:18:26 +00:00
Alex Xu (Hello71) 3aab34171d Fix TSD stubs for non-initial-exec case (fixes #5667).
ppc64le TSD disabled for now since I am insufficiently familiar with ppc
asm. x86 pthread stubs deleted because adding USE_ELF_TLS to the #if is
isn't worth the effort since it only saves a single function call on
initial entry (TSD stubs are not used for read-only text now). also
potentially fix non-pthread TSD builds (_glapi_Dispatch was undefined),
but untested (could still be broken).

Tested-by: Jesse Natalie <jenatali@microsoft.com>
Tested-by: Jan Beich <jbeich@freebsd.org>
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13935>
2021-12-08 00:10:29 -05:00
Adam Jackson b713fca495 glapi: Remove remnants of EXT_paletted_texture and the imaging subset
The GLX code had to special case these for uninteresting reasons, but we
don't support them anymore in Mesa so all this would do is keep them
sorta-working over GLX protocol. Given that Mesa hasn't supported them
on the renderer side since ~2011 let's stop pretending they're real. If
we get around to modernizing the indirect GLX code (hah) we can revisit
these then.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14085>
2021-12-08 03:42:44 +00:00
Thong Thai 7ba0c68e31 radeon/vcn: implement encoder dpb management
Previously, the number of previously encoded frames the encoder handled
was 1 - the encoder now supports many more encoded pictures, so the
encoder now has to keep track of multiple reconstructed pictures.

v2: Add a check to make sure an array index is not negative (Boyuan)

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>
2021-12-08 03:27:42 +00:00
Thong Thai 96b276b327 radeon: hardcode uvd/vce encoder not_referenced value to false
Sets the not_referenced parameter to be the same as the previously
hardcoded frontends/va value (false) to ensure UVD/VCE encoding
functionality remains unaffected by the change in frontends/va code.

This commit will eventually be reverted once more testing is completed.

Fixes: a90802ef644 ("frontends/va/enc: allow for frames to be marked as (not) referenced")
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>
2021-12-08 03:27:42 +00:00
Thong Thai e44fef8dd6 frontends/va/enc: allow for frames to be marked as (not) referenced
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>
2021-12-08 03:27:42 +00:00
Thong Thai ad3ed91b1f radeon/vcn: increase encoder dpb size
Base the number of reconstructed pictures the encoder allocates based on
the number of reference pictures to be used for encoding. Also move the
calculation and allocation of reconstructed pictures to VCN 1, from VCN
2.

v2: Add back the accidentally deleted
'two_pass_search_center_map_offset' (Boyuan)

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>
2021-12-08 03:27:42 +00:00
Thong Thai 31b033eec2 frontends/va/enc: hardcode h265 encoder ref pic list size
Set the size of the ref pic list0 for the h265 encoder to 1.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>
2021-12-08 03:27:42 +00:00
Thong Thai c5b7fb998f frontends/va: disable packed header support for h264 encoder
Packed headers for the H.264 encoder has not been implemented yet, so
don't report packed header support for the H.264 encoder

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>
2021-12-08 03:27:42 +00:00
Cherser-s 934bc24fe9 radv: handle VK_DESCRIPTOR_TYPE_SAMPLER in VK_VALVE_mutable_descriptor_type extension
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13842>
2021-12-08 03:03:43 +00:00
Francisco Jerez de55fd358f intel/fs/xehp: Teach SWSB pass about the exec pipeline of FS_OPCODE_PACK_HALF_2x16_SPLIT.
This virtual instruction is translated into multiple half float
physical instructions, even though its destination is typically of
integer type, which prevents the software scoreboard pass from
inferring the correct execution pipeline for the virtual instruction
on XeHP+ platforms.  Teach the SWSB lowering pass about this
inconsistency between the IR and physical instruction types.

Fixes among other tests:

dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packhalf2x16_compute

Fixes: d4537770bb ("intel/fs: Add helper functions inferring sync and exec pipeline of an instruction.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5685
Reported-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14002>
2021-12-08 02:47:11 +00:00
Emma Anholt 7e9158761a r300/ci: Update loop expectations
from running "-t loops" which I hadn't totally covered before.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
2021-12-08 02:35:52 +00:00
Emma Anholt 8ddefb8ea5 r300: Route shader stats output to ARB_debug_output.
This lets us use shader-db to compare stats on shaders, rather than having
to manually review the RADEON_DEBUG=pstat output.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
2021-12-08 02:35:52 +00:00
Emma Anholt 141302e61f r300: Precompile the FS at shader creation time.
This should reduce jank at first draw, and is also good prep for doing
shader-db.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
2021-12-08 02:35:52 +00:00
Emma Anholt e9dd776ef9 r300: Remove the non_normalized_coords from the shader key.
TexSrcTarget has to be RECT when this is set, anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
2021-12-08 02:35:52 +00:00
Emma Anholt 26b3e2f7cd r300: Also consider ALU condition modifiers for loop DCE.
Since we typically use an ALU op to set the condition modifier for the
IF-BRK-ENDIF, we were particularly likely to remove the increment of the
loop counter!

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
2021-12-08 02:35:52 +00:00
Emma Anholt d6fed4ab7d r300: Ensure that immediates have matching negate flags too.
We only have one bit of negate, so we have to make sure that immediate
usage has matching negates on all used channels (or rewrite to do so).

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
2021-12-08 02:35:52 +00:00
Emma Anholt 915af8de8b r300: Cache the var list in the peephole_mul_omod() loop.
If we're not making progress (which the function was already giving us!),
then there's no need to recompute the list.  Reduces
pixmark-piano/7.shader_test compile time from 50 seconds to 10.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
2021-12-08 02:35:52 +00:00
Emma Anholt 42e8f48be7 r300: Move the instruction filter for r500_transform_IF() to the top.
rc_get_variables() is slow, don't call it if we're going to just exit
immediately anyway.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14117>
2021-12-08 02:35:52 +00:00
Mike Lothian 1050686afe meson: Fix dri.pc dridriverdir
Change dridriversdir to dridriverdir

Fixes: 3ae3569d82
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5726

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14111>
2021-12-08 01:30:00 +00:00
Ilia Mirkin 0db2e78788 freedreno/ci/a306: increase concurrency
No harm from using more threads, but not enough benefit to reduce
parallelism unfortunately.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14067>
2021-12-08 00:50:25 +00:00
Ilia Mirkin 3db30ea877 freedreno/ci/a306: add more skips
These come up with increased concurrency.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14067>
2021-12-08 00:50:25 +00:00
Dave Airlie 34804e1266 intel/crocus: push main/macros.h out to the users
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>
2021-12-07 23:59:58 +00:00
Dave Airlie 9105cf1955 intel/compiler: drop shader_info.h from compiler header
include it explicitly in the correct places

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>
2021-12-07 23:59:58 +00:00
Dave Airlie 9265d1d62d brw/compiler: drop mtypes.h from compiler
This adds a bunch of other headers in, and adds mtypes.h to iris
for perf query object.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>
2021-12-07 23:59:58 +00:00
Dave Airlie 3f35b5fdc9 anv: include futex.h explicitly in allocator.
This file needs futexes so make an explicit include, so it doesn't
come via the compiler

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>
2021-12-07 23:59:58 +00:00
Dave Airlie 244fa81c13 mesa: move _mesa_varying_slot_in_fs to shader_enums
This doesn't need anything from mtypes.h, just changes types
to non GL equivalents

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>
2021-12-07 23:59:58 +00:00
Nanley Chery 0733266706 intel/isl: Drop extra devinfo checks for CCS support
These checks are done in isl_format_supports_ccs_*. Since
isl_surf_supports_ccs calls these functions, it doesn't need to check
them itself.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14082>
2021-12-07 23:31:23 +00:00
Nanley Chery 99b320fc68 iris: Drop the YCRCB cases in finish_aux_import
We recently added native support for these formats in gallium and ISL.

See commits:
* (gallium/dri) f57c074270
* (intel/isl) 3fa16b3025

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14082>
2021-12-07 23:31:23 +00:00
Nanley Chery 0e075227d8 intel/isl: Restore CCS_E support for YUYV and UYVY
These formats are used when creating surfaces with the
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS modifier.

Makes iris pass the out-of-tree piglit test,
ext_image_dma_buf_import-intel-modifiers.

Fixes: 1433fe7860 ("intel/isl: Unify fmt checks in isl_surf_supports_ccs")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14082>
2021-12-07 23:31:23 +00:00
Manas Chaudhary def254b05f panvk: Add check for null fence
Signed-off-by: Manas Chaudhary <manas.chaudhary@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14108>
2021-12-07 21:18:44 +00:00
Danylo Piliaiev c749da6135 ir3,turnip: Add support for GL_KHR_shader_subgroup_quad
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13817>
2021-12-07 20:45:53 +00:00
Danylo Piliaiev 3dfd4230bb ir3,turnip: Enable subgroup ops support in all stages on gen4
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13817>
2021-12-07 20:45:53 +00:00
Danylo Piliaiev ded51fd39e ir3: Use getfiberid for SubgroupInvocationID on gen4
Since it requires (ss) categorize it as is_sfu() and not is_mem().

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13817>
2021-12-07 20:45:53 +00:00
Danylo Piliaiev d1c49901df ir3: Add gen4 new subgroup instructions
* getlast.w8 #4 - Perform jump for the first (CLUSTER_SIZE-1)
   fibers in a subgroup
* brcst.active.w8 - necessary to implement arithmetic subgroup
   operations with prefix sum.
* quad_shuffle.brcst - subgroupQuadBroadcast
* quad_shuffle.horiz - subgroupQuadSwapHorizontal
* quad_shuffle.vert - subgroupQuadSwapVertical
* quad_shuffle.diag - subgroupQuadSwapDiagonal
* getfiberid - gl_SubgroupID

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13817>
2021-12-07 20:45:53 +00:00
Samuel Pitoiset 943ef0edbd radv: avoid prefixing few VkXXX structures by struct
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/14115>
2021-12-07 20:23:48 +00:00
Lionel Landwerlin a3886fa471 util/u_vector: prevent C++ warning on cast from void* to something else
v2: fix windows build

v3: duplicate foreach macro for C/C++

v4: Extract casting macro

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (v3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13997>
2021-12-07 19:41:06 +00:00
Dave Airlie 55b396e743 mesa/crocus/iris/blorp: drop minify macro in favour of u_minify
This macro is duplicated, clean it up.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14103>
2021-12-07 19:04:01 +00:00
Adam Jackson d9f0991744 mesa: Make _mesa_generate_mipmap_level static
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 3731d21c68 mesa: Remove unused execmem code
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 68b7fabbe2 mesa/program: Dead code cleanup
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 087f196a08 mesa/vbo: Always use buffer objects for storage
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson b4ae8ee43e mesa: Remove unused _vbo_current_binding
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson d88398413a mesa: Remove unused _es_{,Get}TexGenfv
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 3f35fd71c3 mesa: Remove unused _es_RenderbufferStorageEXT
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 5b8eeaac3a mesa: Remove unused _es_color4ub
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 5d09812c2f mesa: Remove unused _mesa_compressed_image_address
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 74c29e1bf7 mesa: Remove unused _mesa_apply_ci_transfer_ops
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 1455d1cd30 mesa: Remove unused _check_*TexGen*OES
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 98ef86b3af mesa: Remove unused _mesa_DrawTexx{,v}
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 8f92e81718 mesa: Remove unused _mesa_get_render_format
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Adam Jackson 8aa776ab1f mesa: Remove unused _mesa_all_buffers_are_unmapped
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14098>
2021-12-07 18:21:52 +00:00
Samuel Pitoiset 31ad50d989 radv: fix dynamic rendering with VRS
The structure type was wrong. This fixes a bunch failures in
dEQP-VK.fragment_shading_rate.dynamic_rendering.*.

Fixes: 7f3aba37d2 ("radv: Support Begin/EndRendering.")
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/14106>
2021-12-07 17:30:47 +00:00
Samuel Pitoiset 92d84f189c radv: constify radv_vs_input_state() in more places
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/13857>
2021-12-07 14:27:29 +00:00
Samuel Pitoiset b83caef6d2 radv: constify radv_vertex_binding in CmdSetVertexInputEXT()
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/13857>
2021-12-07 14:27:29 +00:00
Samuel Pitoiset 45f181c482 radv: move a comment at the right place in CmdBindVertexBuffers2EXT()
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/13857>
2021-12-07 14:27:29 +00:00
Danylo Piliaiev e63ffc2f04 freedreno,tu: Limit the amount of instructions preloaded into icache
Inferring from blob's cmdstream the size of shader instruction
cache for:
- a630 is 64
- a650 is 128
- a660 is 128

On a650 and a660 gpu could hang if we exceed the limit. Though
it is not reproducible with computerator or a single amber
test. Also while blob limits the size to 128 - Turnip still
hangs with it but does not hang with the limit of 127.

On a630 there seem to be no hang when limit is exceeded.

Fixes the hang of compute shader in Alien Isolation on a650/a660.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14044>
2021-12-07 13:48:35 +00:00
Dave Airlie da24bb17a8 mesa/st: move external objects to direct calls
This moves the memory and semaphore objects to direct calls

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
2021-12-07 13:03:53 +00:00
Dave Airlie 830e2038fc mesa/st: move transformfeedback to direct calls
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
2021-12-07 13:03:53 +00:00
Dave Airlie 12f8475ff9 mesa/st: move barriers to direct call
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
2021-12-07 13:03:53 +00:00
Dave Airlie 8fe4ff2fda mesa/st: direct call sync object functions
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
2021-12-07 13:03:53 +00:00
Dave Airlie bd9adf3919 mesa/dd/st: direct wire queries/timestamp/condrender.
These were all interrelated, avoid the indirect calls here,
and call directly between main and state tracker

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
2021-12-07 13:03:53 +00:00
Dave Airlie 0d8610b099 mesa/dd/st: move get strings pointer out of dd.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
2021-12-07 13:03:53 +00:00
Dave Airlie b03db92720 meson: make mesa/tests/glx depend on gallium
If I start direct linking the state tracker to mesa, the tests fail
to build because they don't have gallium linked.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
2021-12-07 13:03:53 +00:00
Dave Airlie 9bb375b0be intel/compiler: drop glsl options from brw_compiler
Only the nir options are used now, since i965 was dropped,
the glsl options come from the state tracker

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14102>
2021-12-07 08:52:36 +00:00
Emma Anholt de33205f88 nir/algebraic: Move all the individual transforms to a common table.
Cuts 28% of the remaining relocations in libvulkan_intel.so, shrinks
binary size by 290kb.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>
2021-12-07 07:09:00 +00:00
Emma Anholt a29b54f014 nir/algebraic: Mark the automaton's filter tables as const.
Moves it to .rodata instead of .data.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>
2021-12-07 07:09:00 +00:00
Emma Anholt 45a8d11b6e nir/algebraic: Pack various bitfields in the nir_search_value_union.
This gets our union's size down to 22 bytes (now smaller than any of the
union's types were before we made the union!).  Cuts another 48kb off of
the drivers.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>
2021-12-07 07:09:00 +00:00
Emma Anholt 53f49b7066 nir/algebraic: Move relocations for variable conds to a table.
This helps concentrate the dirty pages from the relocations, reduces how
many relocations there are, and reduces the size of each variable assuming
variables mostly don't have conditions or the conditions are mostly
reused).  Reduces libvulkan_intel.so size by 49kb.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>
2021-12-07 07:09:00 +00:00
Emma Anholt 8485a78977 nir/algebraic: Move relocations for expression conds to a table.
This helps concentrate the dirty pages from the relocations, reduces how
many relocations there are, and reduces the size of each expression
(assuming expressions mostly don't have conditions or the conditions are
mostly reused).  Reduces libvulkan_intel.so size by 8.7kb.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>
2021-12-07 07:09:00 +00:00
Emma Anholt 7635379dc7 nir/algebraic: Remove array-of-cond code
You can't have an array of them after removing many-comm-expr, there's no
space in the struct.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>
2021-12-07 07:09:00 +00:00
Emma Anholt 5d82c61a30 nir/algebraic: Replace relocations for nir_search values with a table.
Even with packing all 3 types into a 40-byte union (nir_search_constant
being 24 bytes and nir_search_expression having formerly been 32), and
having a single array of them, this cuts 1.7MB from each of
libvulkan_intel.so and libgallium_dri.so.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>
2021-12-07 07:09:00 +00:00
Emma Anholt e7d8717375 nir/algebraic: Drop the check for cache == None.
The cache is always set.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>
2021-12-07 07:08:59 +00:00
Emma Anholt a263474d3b nir/algebraic: Move some generated-code algebraic opt args into a struct.
I'm going to be adding some more tables to reduce relocations in the
generated code, so move the current tables to a struct for arg-passing
sanity.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13987>
2021-12-07 07:08:59 +00:00
Emma Anholt 4b5692fa71 nouveau/nir: Use the address reg for indirect scratch access.
Fixes the dEQP regressions in dEQP-GLES2.functional.shaders.indexing.*.
TGSI used the address reg for these offsets too.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14083>
2021-12-07 06:57:27 +00:00
Timothy Arceri ca16c271fa mesa: make struct in gl_program a union and remove FIXME
Now that the classic drivers that were mixing the use of these asm
and glsl shader fields are gone we can finally use a union here.

This basically reverts commit 9d99dc4bc1 but also moves a
read of IsPositionInvariant inside an arb asm only code block
for safety.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14059>
2021-12-07 05:24:47 +00:00
Qiang Yu df6ff88fd0 loader/dri3: support glx pbuffer swap
Double buffered pbuffer need to update the front buffer,
otherwise we always get wrong value when glReadPixels().

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 e0311746cd loader/dri3: stop doing anything in swap buffer for some drawable
We are sure to have a back buffer in swap buffer now.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Singed-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 d67d1dddbe loader/dri3: rename dri3_fake_front_buffer
Sometimes this is the real front buffer depends on the place
called. Since it's the same LOADER_DRI3_FRONT_ID slot, just
name it dri3_front_buffer.

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 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
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
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