Rhys Perry [Thu, 22 Oct 2020 11:05:34 +0000 (12:05 +0100)]
ci: disable check commits job for now
This job currently disallows reasonably long commit messages (for example,
CTS test names).
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7161>
Iago Toral Quiroga [Tue, 20 Oct 2020 10:51:50 +0000 (12:51 +0200)]
v3dv: handle buffer to linear depth/stencil image copies in blit path
We can't render to linear depth/stencil so we want to convert these to a
compatible color blit.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7247>
Iago Toral Quiroga [Fri, 9 Oct 2020 15:35:01 +0000 (17:35 +0200)]
v3dv: handle compressed image to buffer copies on the blit path
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7247>
Iago Toral Quiroga [Fri, 9 Oct 2020 17:11:30 +0000 (19:11 +0200)]
v3dv: fix Z coordinate for 3D blits
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7247>
Iago Toral Quiroga [Fri, 9 Oct 2020 16:41:20 +0000 (18:41 +0200)]
v3dv: do not attempt to blit from a linear image source
The hardware only supports texturing from tiled images.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7247>
Iago Toral Quiroga [Fri, 9 Oct 2020 12:57:57 +0000 (14:57 +0200)]
v3dv: fix multi-layered buffer to image copies on the blit path
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7247>
Iago Toral Quiroga [Thu, 8 Oct 2020 11:24:13 +0000 (13:24 +0200)]
v3dv: skip unnecessary tile loads when blitting
If we are blitting to tile boundaries we don't need to emit
tile loads. The exception to this is the case where we are
blitting only a subset of the pixel components in the image
(which we do for single aspect blits of D24S8), since in that
case we need to preserve the components we are not writing.
There is a corner case where some times we create framebuffers
that alias subregions of a larger image. In that case the edge
tiles are not padded and we can't skip the loads.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7247>
Tapani Pälli [Wed, 21 Oct 2020 05:43:25 +0000 (08:43 +0300)]
gallivm/nir: handle nir_op_flt in lp_build_nir_llvm
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3663
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7248>
Martin Peres [Tue, 20 Oct 2020 06:40:34 +0000 (09:40 +0300)]
driconf: allow higher compat version for Brink
This fixes the game on mesa classic drivers that still expose OpenGL
3.0 for compatibility profiles.
Suggested-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Fri, 16 Oct 2020 05:26:05 +0000 (08:26 +0300)]
driconf: disable GLX_OML_swap_method by default on Brink
Brink makes use of the WGL-equivalent extension, and Wine translates
that to GLX_OML_swap_method. However, Mesa does not expose the exchange
swap method, which is what Wine is looking for.
Not exposing the extension fixes everything, so let's keep things
simple!
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/106
Tested-by: Gregor Münch <gr.muench_at_gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Tue, 20 Oct 2020 13:20:20 +0000 (16:20 +0300)]
driconf: add a way to override indirect-GL extensions
Support for DRI1 is not implemented, but who still uses that?
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Thu, 15 Oct 2020 15:29:45 +0000 (18:29 +0300)]
driconf: add a way to override GLX extensions
Support for DRI1 is not implemented, but who still uses that?
v2:
- Add the option to the list of new features
- Drop overriding the Xorg-exposed extensions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Tue, 20 Oct 2020 13:05:24 +0000 (16:05 +0300)]
glx: let users force-enable/disable indirect GL extensions
This can be useful for debugging or working around bugs involving
indirect GL.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Thu, 15 Oct 2020 05:55:41 +0000 (08:55 +0300)]
glx: initial plumbing to let users force-enable/disable extensions
This can be useful for debugging or working around bugs such as
Mesa#106 where Wine is expecting to find a visual that isn't
available.
v2:
- split the indirect GL extension override to its own commit
- memset the bitfields to 0 in __glXExtensionsCtrScreen
Reviewed-by: Adam Jackson <ajax@redhat.com>
v3:
- slight rework necessary after splitting the computation of usable
extensions (Ian)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Ian Romanick [Wed, 21 Oct 2020 05:40:44 +0000 (08:40 +0300)]
glx: rework __glXCalculateUsableExtensions to be more readable
We are about to make the GLX extension equation even more complex by
adding force-enable/disable. Before doing so, split the line into
multiple stages that can get a proper comment to explain what is going
on.
The code is taken mostly verbatim from Ian Romanick's comment:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212#note_668045
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Tue, 20 Oct 2020 06:09:57 +0000 (09:09 +0300)]
glx: stop using hardcoded array sizes for bitfields
Replicate the solution used for OpenGL extensions by introducing
__GLX_EXT_BYTES.
Suggested-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Thu, 15 Oct 2020 05:47:50 +0000 (08:47 +0300)]
glx/extensions: split set_glx_extension into find_ and set_
An upcoming commit will require to find an extension in a list. Rather
than duplicating part of the code from set_glx_extension, split it into
find_extension and set_glx_extension.
NOTE: set_glx_extension is a bit of a misnomer since it is also used
for gl extensions. This is why the find function is named
find_extension rather than find_glx_extension.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Thu, 15 Oct 2020 12:23:05 +0000 (15:23 +0300)]
dri/DRI2ConfigQueryExtension: add support for string options
This will be useful to enable extension overriding as a drirc option.
v2 (Adam Jackson):
- Rename from configQuerystr to configQuerys for symmetry
- Increase the version number of the interface
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Thu, 15 Oct 2020 15:27:27 +0000 (18:27 +0300)]
driconf: initialize the option value before using it
ParseValue is freeing the pointer if the address is != 0. However,
since we allocate this value on the stack, we need to initialize the
data first.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Martin Peres [Fri, 5 Jun 2015 13:04:03 +0000 (16:04 +0300)]
driconf: bump the maximum string size from 25 to 1024
The soon-to-be-introduced string entries will potentially introduce
very long strings that should not be truncated.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Martin peres <martin.peres@linux.intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7212>
Mauro Rossi [Thu, 22 Oct 2020 00:06:59 +0000 (02:06 +0200)]
android: util,ac,aco,radv: Cross-platform memstream API
Fixes the following building errors:
external/mesa/src/amd/common/ac_debug.c:589:
error: undefined reference to 'u_memstream_open'
external/mesa/src/amd/common/ac_debug.c:593:
error: undefined reference to 'u_memstream_close'
Fixes:
af8d488ea5e1 ("util,ac,aco,radv: Cross-platform memstream API")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7267>
Vinson Lee [Mon, 19 Oct 2020 23:03:52 +0000 (16:03 -0700)]
glsl: Initialize ir_if_to_cond_assign_visitor members in constructor.
Fix defects reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member found_unsupported_op is not
initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member found_expensive_op is not
initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member found_dynamic_arrayref is not
initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member is_then is not initialized in
this constructor nor in any functions that it calls.
uninit_member: Non-static class member then_cost is not initialized in
this constructor nor in any functions that it calls.
uninit_member: Non-static class member else_cost is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7228>
Caio Marcelo de Oliveira Filho [Mon, 5 Oct 2020 21:25:10 +0000 (14:25 -0700)]
nir: Use a switch in nir_lower_explicit_io_instr
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7255>
Eric Anholt [Thu, 15 Oct 2020 21:15:42 +0000 (14:15 -0700)]
docs/v3d: Add a little stub of v3d documentation.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
Eric Anholt [Thu, 15 Oct 2020 23:19:51 +0000 (16:19 -0700)]
docs/vc4: Add information on the hw documentation available.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
Eric Anholt [Thu, 15 Oct 2020 20:54:38 +0000 (13:54 -0700)]
docs/vc4: Move my old vc4 wiki's documentation into docs.mesa3d.org.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
Eric Anholt [Fri, 16 Oct 2020 17:40:35 +0000 (10:40 -0700)]
docs/vmware: Move the vmware driver docs into the drivers section.
For more consistency with the other drivers.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
Eric Anholt [Fri, 16 Oct 2020 17:35:17 +0000 (10:35 -0700)]
docs: Move the gallium driver documentation to the top level.
I actually had never found these, buried under Developer Topics -> Gallium
-> Drivers. Given that driver documentation contains not just gallium
driver documentation but also end-user information, bring it to a much
more prominent location between User Topics and Developer Topics at the
top level.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
Erik Faye-Lund [Wed, 21 Oct 2020 11:50:11 +0000 (13:50 +0200)]
docs: specify redirects in conf.py instead
This makes it much easier to discover these.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
Erik Faye-Lund [Wed, 21 Oct 2020 11:42:30 +0000 (13:42 +0200)]
docs: specify redirects relative to docs-root
It's a lot easier to reason about redirects if they're specified
relative to thje docs-root, so let's do that instead.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
Erik Faye-Lund [Wed, 21 Oct 2020 11:38:23 +0000 (13:38 +0200)]
docs: verify that targets for relative redirects exist
This makes it a bit easier to update the redirects.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
Erik Faye-Lund [Wed, 21 Oct 2020 12:00:23 +0000 (14:00 +0200)]
docs: create leading directories for redirects
This will be useful when removing entire directories from the docs,
which will happen in an upcoming patch.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7174>
Ryan Neph [Wed, 21 Oct 2020 00:47:04 +0000 (00:47 +0000)]
virgl: Fixes portal2 binary name in tweak config
Portal 2 on virgl w/ GLES host requires bgraswz and emubgra tweaks.
Application binary name matching mismatch caused tweaks to default
to a disabled state.
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Fixes:
9760a7ed913 ("virgl: apply bgra dest swizzle and add Portal 2")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7246>
Juan A. Suarez Romero [Wed, 21 Oct 2020 09:45:08 +0000 (11:45 +0200)]
st/mesa: initialize lower alpha func to ALWAYS
The lower_alpha_func is initialized as COMPARE_FUNC_NEVER, and the
nir_lower_alpha_test() only executed if the alpha_func has changed.
This means when user runs an alpha test with GL_NEVER function the
lowering is never executed, and no fragment is discarded.
Rather, we would like to initialize the function as COMPARE_FUNC_ALWAYS,
and run the lowering when the alpha_func is different. If user runs the
alpha test with GL_ALWAYS, indeed the lowering is never executed; but
using GL_ALWAYS makes no fragment is discarded, so it is like not
executing the testing.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7251>
Erik Faye-Lund [Mon, 7 Oct 2019 10:19:15 +0000 (12:19 +0200)]
nir: drop unused alpha_ref_float
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7251>
Erik Faye-Lund [Mon, 7 Oct 2019 10:08:55 +0000 (12:08 +0200)]
nir: drop support for using load_alpha_ref_float
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7251>
Erik Faye-Lund [Mon, 7 Oct 2019 10:07:47 +0000 (12:07 +0200)]
vc4: do not report alpha-test as supported
This triggers lowering in the state-tracker, which makes things a bit
simpler.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7251>
Erik Faye-Lund [Mon, 7 Oct 2019 10:18:09 +0000 (12:18 +0200)]
v3d: do not report alpha-test as supported
This triggers lowering in the state-tracker, which makes things a bit
simpler.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7251>
Michel Dänzer [Thu, 6 Aug 2020 15:37:33 +0000 (17:37 +0200)]
ci: Add jobs running ci-fairy checks
These can catch various common issues in MR settings and Git commit
logs.
The "check mr" job only exists in pre-merge pipelines for MRs, and runs
automatically.
The "check commits" job only exists in pre-merge pipelines for MRs and
in pipelines for forked branches. It runs automatically in the former
case and can be manually triggered in the latter.
v2:
* Use git_archive docker image (Daniel Stone)
* Use a single sanity stage for both jobs (Tomeu Vizoso)
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6209>
Michel Dänzer [Thu, 6 Aug 2020 15:12:11 +0000 (17:12 +0200)]
ci: Add empty needs: to pages job
So it doesn't need to wait for jobs in earlier stages.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6209>
Michel Dänzer [Thu, 6 Aug 2020 15:10:08 +0000 (17:10 +0200)]
ci: Move test-docs job to deploy stage
We put it in the first container stage to prevent it from waiting for
jobs in previous stages, but empty needs: works for that as well.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6209>
Marek Olšák [Mon, 28 Sep 2020 22:18:43 +0000 (18:18 -0400)]
st/mesa: make sure prog->info is up to date for NIR (v2)
so that info changes from pipe_screem::finalize_nir are reflected
in gl_program
v2: don't call nir_shader_gather_info again, because it crashes with freedreno
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6950>
Marek Olšák [Mon, 28 Sep 2020 17:12:14 +0000 (13:12 -0400)]
Revert "st/mesa: don't pass NIR to draw module if IO is lowered"
This reverts commit
493fdcf44647ee471e934de3e63d193c6a3b6ff0.
The lowered IO support has been added to Draw recently:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6698
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6950>
Marek Olšák [Tue, 29 Sep 2020 01:09:40 +0000 (21:09 -0400)]
nir: consider load_color intrinsics as both inputs and sysval in gathering
src/mesa expects this somewhere.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6950>
Marek Olšák [Fri, 16 Oct 2020 12:14:11 +0000 (08:14 -0400)]
amd: update addrlib
All Mesa-specific includes and definitions have been moved to addrcommon.h.
Instead of suppressing warnings in the code, they are suppressed
in meson.build.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7188>
Adam Jackson [Fri, 16 Oct 2020 21:32:25 +0000 (17:32 -0400)]
glx: Move glXGet{ScreenDriver,DriverConfig} to common code
These no longer reference anything specific to a particular DRI
protocol.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7219>
Adam Jackson [Fri, 16 Oct 2020 21:18:18 +0000 (17:18 -0400)]
glx: Delegate the core of glXGetScreenDriver to the GLX screen vtable
This is a minor bugfix, in that the prior code required that the server
expose either XFree86-DRI or DRI2 to get the name; Xwayland exposed
neither, just DRI3. Now, for DRI2 and DRI3, we just ask the loader. It
also means we report "swrast" for the driver name when that's what we're
using, which is probably a good thing.
v2: Trust the driver name from the server for DRI2 (Michel Dänzer)
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7219>
Adam Jackson [Fri, 16 Oct 2020 20:17:54 +0000 (16:17 -0400)]
glx: move __glXGetUST into the DRI1 code
This is only used from the __DRI_SYSTEM_TIME loader extension, which
only the DRI1 drivers ever looked for.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7219>
Samuel Pitoiset [Tue, 20 Oct 2020 14:56:29 +0000 (16:56 +0200)]
radv,aco: fix use of texop_samples_identical in the resolve meta path
The return value of this texture intrinsic should be a NIR 1-bit bool.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7236>
Samuel Pitoiset [Tue, 20 Oct 2020 14:54:45 +0000 (16:54 +0200)]
ac/nir: do not sign-extend the result of texop_samples_identical
The return value should be a NIR 1-bit bool.
This fixes a regression with piglit
ext_shader_samples_identical-simple-fs 2 on RadeonSI.
Fixes:
e690a1b78bf ("ac/llvm: don't lower bool to int32, switch to native i1 bool")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7236>
Alejandro Piñeiro [Wed, 14 Oct 2020 07:48:44 +0000 (09:48 +0200)]
docs/features: add v3dv driver
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7125>
Thong Thai [Thu, 15 Oct 2020 19:32:47 +0000 (15:32 -0400)]
frontends/va/postproc: Un-break field flag
Fixes an issue where deinterlaced videos would play at half the
framerate, since only one field was repeated, instead of using both
fields. Reverts a change I made previously which broke this.
Fixes:
78786a219ea ("frontends/va: Fix deinterlace bottom field first flag")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3621
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7194>
Tony Wasserka [Tue, 6 Oct 2020 20:52:02 +0000 (22:52 +0200)]
aco/isel: Miscellaneous cleanups using the new Stage API
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7094>
Tony Wasserka [Wed, 7 Oct 2020 16:21:48 +0000 (18:21 +0200)]
aco: Clean up symbol names and comments related to NGG
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7094>
Tony Wasserka [Mon, 5 Oct 2020 15:50:37 +0000 (17:50 +0200)]
aco: Use strong typing to model SW<->HW stage mappings
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7094>
Eric Anholt [Tue, 20 Oct 2020 20:43:03 +0000 (13:43 -0700)]
nir: Only validate in passes that might have changed things.
If a pass returning boolean progress reports no change, we shouldn't need
to re-validate. If a pass breaks the NIR but also fails to report
progress correctly, it would be up to the next pass to catch that.
This should hopefully help with test timeouts on
KHR-GL33.texture_swizzle.functional since switching softpipe to
nir-to-tgsi and enabling NIR validation in CI (27s to 20s on my system).
Suggested-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7239>
Timothy Arceri [Fri, 16 Oct 2020 08:26:51 +0000 (19:26 +1100)]
glsl: relax rule on varying matching for shaders older than 4.00
Please see new code commment for full justification.
Fixes:
18004c338f6b ("glsl: fail when a shader's input var has not an equivalent out var in previous")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3648
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7184>
Icecream95 [Wed, 14 Oct 2020 11:08:36 +0000 (00:08 +1300)]
panfrost: Only enable occlusion queries when active
Fixes piglit tests:
- occlusion_query_meta_fragments
- occlusion_query_meta_save
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7074>
Icecream95 [Fri, 9 Oct 2020 07:01:16 +0000 (20:01 +1300)]
panfrost: Precise occlusion query support
In the "counter" occlusion query mode, each shader core has a separate
counter.
When MSAA is disabled, counter values need to be divided by four.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7074>
Eric Anholt [Wed, 26 Aug 2020 19:51:15 +0000 (12:51 -0700)]
st/mesa: Drop the TGSI paths for drawpixels and use nir-to-tgsi if needed.
Now that we have a NIR translator in gallium, we can drop this duplicated
code in the API implementation.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6477>
Eric Anholt [Wed, 26 Aug 2020 19:42:36 +0000 (12:42 -0700)]
st/mesa: Drop the TGSI paths for PBOs and use nir-to-tgsi if needed.
Now that we have a NIR translator in gallium, we can drop this duplicated
code in the API implementation.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6477>
Eric Anholt [Wed, 26 Aug 2020 19:14:42 +0000 (12:14 -0700)]
gallium/ntt: Add default compiler options for non-native-NIR drivers.
For using NIR internally in mesa/st, we need some compiler options. This
is the options wrote for softpipe, which should be enough for whatever NTT
we do.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6477>
Vinson Lee [Thu, 15 Oct 2020 00:20:14 +0000 (17:20 -0700)]
v3dv: Fix assert using assign instead of compare.
Fix defect reported by Coverity Scan.
Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT)
assign_where_compare_meant: use of "=" where "==" may have been intended
Fixes:
ca86c7c65a82 ("v3dv: assert command buffers are executable when submitting to a queue")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7156>
Bas Nieuwenhuizen [Fri, 18 Sep 2020 01:11:18 +0000 (03:11 +0200)]
radv: Advertise VK_KHR_shader_terminate_invocation.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7226>
Bas Nieuwenhuizen [Fri, 18 Sep 2020 01:09:19 +0000 (03:09 +0200)]
amd/llvm: Add VK_KHR_shader_terminate_invocation support.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7226>
Bas Nieuwenhuizen [Fri, 18 Sep 2020 01:08:43 +0000 (03:08 +0200)]
aco: Add VK_KHR_shader_terminate_invocation support.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7226>
Eric Anholt [Mon, 19 Oct 2020 18:54:24 +0000 (11:54 -0700)]
ci: Enable Werror on meson-arm64-build-test.
I found that it was warnings-clean already, let's make sure it stays that
way.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7224>
Eric Anholt [Mon, 19 Oct 2020 19:17:38 +0000 (12:17 -0700)]
turnip: Add error path handling for descriptor pool init.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7224>
Eric Anholt [Mon, 19 Oct 2020 19:14:26 +0000 (12:14 -0700)]
turnip: Handle the error path for tu/drm's vkResetFences().
OUT_OF_MEMORY is the only valid error code from this function, but this
error is more of a "things went horribly wrong, you can't talk to the GPU"
case. Set the device to be in error.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7224>
Eric Anholt [Mon, 19 Oct 2020 19:03:33 +0000 (12:03 -0700)]
turnip: Handle some error paths in allocating CS space from a command buffer.
Fixes some release-build warnings.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7224>
Eric Anholt [Mon, 19 Oct 2020 18:56:17 +0000 (11:56 -0700)]
freedreno/fdperf: Silence a compiler warning about current counter.
It seems like selecting the first here is a fine choice if we can't
find the counter.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7224>
Eric Anholt [Mon, 19 Oct 2020 18:46:43 +0000 (11:46 -0700)]
freedreno/tools: Fix compiler warnings about using sz in the error paths.
If we don't check for a NULL str, then sz might be undefined (as was
happening in the match_compatible path, and returning 0 makes us not match
as we should).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7224>
Eric Anholt [Mon, 19 Oct 2020 18:41:57 +0000 (11:41 -0700)]
freedreno/cffdec: Fix format overflow warning.
../src/freedreno/decode/cffdec.c: In function ‘reg_disasm_gpuaddr’:
../src/freedreno/decode/cffdec.c:404:29: error: ‘sprintf’ writing a
terminating nul past the end of the destination [-Werror=format-overflow=]
404 | sprintf(filename, "%04d.%s", n++, ext);
../src/freedreno/decode/cffdec.c:404:3: note: ‘sprintf’ output between
9 and 16 bytes into a destination of size 8
404 | sprintf(filename, "%04d.%s", n++, ext);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7224>
Karol Herbst [Sun, 11 Oct 2020 21:17:20 +0000 (23:17 +0200)]
llvmpipe: enable CL images
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Dave Airlie [Sun, 11 Oct 2020 23:45:40 +0000 (09:45 +1000)]
llvmpipe: fix sampler/image binding for clover.
Clover uses these APIs a bit different, avoid crashes
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Karol Herbst [Thu, 8 Oct 2020 11:18:07 +0000 (13:18 +0200)]
nvc0/CL: enable images
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Karol Herbst [Sat, 15 Aug 2020 10:57:03 +0000 (12:57 +0200)]
nouveau: hide SVM support behing a variable for now as kernel space is broken
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Karol Herbst [Thu, 8 Oct 2020 11:20:16 +0000 (13:20 +0200)]
clover/nir: set kernel_image cap
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Jason Ekstrand [Mon, 31 Aug 2020 23:09:44 +0000 (18:09 -0500)]
clover/nir: Add an image lowering pass
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Jason Ekstrand [Wed, 2 Sep 2020 23:19:35 +0000 (18:19 -0500)]
clover/nir: Calculate sizes of images and samplers properly
Clover uses very specific sizes and alignments for images and samplers
to pass various bits of data. We need to add a new size/align helper
for inputs which matches the standard CL size/align for most types but
also has the right size/align for images and samplers.
v2 (Karol): use sizeof(cl_mem) instead of 8 to fix 32 bit runtimes.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Karol Herbst [Thu, 15 Oct 2020 14:31:10 +0000 (16:31 +0200)]
clover/device: use PIPE_MAX_SHADER_SAMPLER_VIEWS for max_images_read
Read images are really just normal textures and OpenCL requires 128 anyway.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Serge Martin [Sun, 11 Oct 2020 18:12:12 +0000 (20:12 +0200)]
clover: clCreateImage: calculate image row_pitch and slice_pitch when not provided
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Karol Herbst [Wed, 14 Oct 2020 23:19:57 +0000 (01:19 +0200)]
clover: support custom driver strides
This is required by llvmpipe as it sets explicit strides on buffers and
textures.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Serge Martin [Sun, 11 Oct 2020 20:24:26 +0000 (22:24 +0200)]
clover: validate image_row_pitch and image_slice_pitch in clEnqueueMapImage
v2 (Karol Herbst): remove filling values as it was incorrect.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Aaron Watry [Wed, 6 Nov 2019 04:26:58 +0000 (22:26 -0600)]
clover: Fix incorrect error check in clGetSupportedImageFormats
From CL1.2 Section 5.3.2:
returns CL_INVALID_VALUE ... if num_entries is 0 and image_formats is not NULL.
We were checking the num_image_formats param, not num_entries.
Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Karol Herbst [Wed, 7 Oct 2020 21:08:43 +0000 (23:08 +0200)]
clover: use pipe_image_view for images instead of set_compute_resources
Long term we want to git rid of set_compute_resources, this is just one
piece. The other bit would be to use the proper const buffer interfaces,
but because that path is only hit with r600/radeonsi I won't touch it.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Jason Ekstrand [Tue, 6 Oct 2020 17:40:45 +0000 (12:40 -0500)]
compiler/types: Allow images and samplers in get_explicit_type_for_size_align
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Jason Ekstrand [Thu, 8 Oct 2020 07:14:47 +0000 (02:14 -0500)]
compiler/types: Assert non-zero alignments in get_explicit_type_for_size_align
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Jason Ekstrand [Thu, 8 Oct 2020 07:27:24 +0000 (02:27 -0500)]
nir/lower_io: Assert non-zero power-of-two alignments
The way the ALIGN_POT macro works, an alignment of 0 may cause
ALIGN_POT(x, 0) to return 0 for any x. Throw in an assert to guard
against this case.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Jason Ekstrand [Tue, 1 Sep 2020 00:33:51 +0000 (19:33 -0500)]
spirv: Add 0.5 to integer coordinates for OpImageSampleExplicitLod
Just casting to a float is insufficient because that gives us the upper-left corner
of the texel rather than the center.
Fixes:
701cb9d60c03 "nir/vtn: Handle integer sampling coordinates"
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7069>
Jason Ekstrand [Tue, 20 Oct 2020 03:36:07 +0000 (22:36 -0500)]
anv,iris: Use the data cache for UBO pulls on Gen12+
Now that we have the HDC, using the data cache for UBO pulls seems to
help things quite a bit:
GTA V DXVK 104.0%
Talos Principle GL 102.8%
Rise of Tomb Raider VK 102.8%
Dark Souls 3 DXVK 101.4%
Witcher3 DXVK 101.3%
Bioshock Infinite GL 100.5%
Doom 2016 VK 97.7%
Doom is a bit of a loss but it helps enough other stuff, it's probably
worth the hit.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7230>
Jason Ekstrand [Tue, 20 Oct 2020 03:33:05 +0000 (22:33 -0500)]
iris: Flush caches based on brw_compiler::indirect_ubos_use_sampler
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7230>
Marijn Suijten [Tue, 20 Oct 2020 18:00:18 +0000 (20:00 +0200)]
android: gallium/auxiliary: Deduplicate nir_to_tgsi.c inclusion
Both commits add nir_to_tgsi.c to a different variable, causing a
build-time error when compiling in an AOSP tree:
build/make/core/binary.mk:970: error: overriding commands for target `..../obj/STATIC_LIBRARIES/libmesa_gallium_intermediates/nir/nir_to_tgsi.o', previously defined at build/make/core/binary.mk:970
Move all sources into NIR_SOURCES to resolve this issue.
Fixes:
d0f8fe59091 ("softpipe: Switch to using NIR as the shader format from mesa/st.")
Fixes:
34cc6a804ec ("gallium: Add a nir-to-TGSI pass.")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7237>
Eric Anholt [Fri, 16 Oct 2020 22:50:40 +0000 (15:50 -0700)]
docs: Document how to build and install Android drivers.
This is what I've been using so far.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7227>
Eric Anholt [Mon, 19 Oct 2020 20:47:58 +0000 (13:47 -0700)]
meson: Don't enable libunwind by in 'auto' mode on Android.
On Android we're expected to use their backtrace library.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7227>
Eric Anholt [Mon, 19 Oct 2020 20:46:11 +0000 (13:46 -0700)]
meson: Don't try to build GLX by default on Android.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7227>
Eric Anholt [Mon, 19 Oct 2020 21:19:27 +0000 (14:19 -0700)]
freedreno: Use Android's libsync instead of libdrm's.
This should be equivalent, given that we only support the DRM backend so
far, but we'll want to have the compatibility for future KGSL freedreno.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7227>
Eric Anholt [Mon, 19 Oct 2020 19:28:17 +0000 (12:28 -0700)]
meson: Only require libexpat when a part of the build needs it.
Now that xmlconfig can be built without libexpat on Android, we can make
android builds not require the presence of libexpat for many drivers.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7223>
Michael Olbrich [Sun, 8 Sep 2019 11:14:40 +0000 (13:14 +0200)]
meson.build: xxf86vm is not needed for -Dglx-direct=false
It is only used in src/glx/glxcmds.c and when GLX_DIRECT_RENDERING is
defined.
So only depend on it if GLX direct rendering is actually enabled.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1905>
Eric Anholt [Wed, 1 Jan 2020 00:20:52 +0000 (16:20 -0800)]
softpipe: Switch to using NIR as the shader format from mesa/st.
This causes our TGSI to use far more temps, since NTT is currently not
releasing temps from registers. On the other hand, this interpreter is
already spectacularly slow, and if we wanted to go fast we should probably
write a scalar NIR intrepeter.
For now, using NTT means that we test that codepath in preparation for
switching TGSI-consuming HW drivers over, so that we can eventually
garbage collect st_glsl_to_tgsi.
As this is a major restructuring, there are some impacts on piglit:
- Several tests start assert failing about 64-bit NIR registers for temp
arrays not getting split to vec2s:
- fs-frexp-dvec4-variable-index.shader_test
- arb_gpu_shader_fp64/uniform_buffers/{vs,fs,gs}-array-copy.shader_test
- arb_gpu_shader_int64/execution/indirect-array-two-accesses.shader_test
- dEQP-GLES31.functional.primitive_bounding_box.wide_points.global_state.vertex_geometry_fragment.fbo_bbox_larger
starts crashing depending on various bits of state (previous tests run
before it, presence of valgrind, presence of glib's memcheck). Doesn't
seem really NTT-specific, added to flakes list with other GS flakes.
- Almost 200 fp64/int64-related tests start passing, mostly around i/o loayout.
shader-db:
total instructions in shared programs: 3492656 -> 3081674 (-11.77%)
total loops in shared programs: 1418 -> 1387 (-2.19%)
total temps in shared programs: 340041 -> 615527 (81.02%)
total const in shared programs: 3158970 -> 1528630 (-51.61%)
total imm in shared programs: 117586 -> 101349 (-13.81%)
Total CPU time (seconds): 430.36 -> 900.94 (109.35%)
FPS results:
glmark2 texture +7.32484% +/- 3.76528% (n=10)
glmark2 desktop:effect=shadow +20% +/- 0% (n=10)
glmark2 shadow +6.49351% +/- 3.65335% (n=7)
glmark2 conditionals +18.75% +/- 2.74658% (n=9)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3395>