Commit Graph

128690 Commits

Author SHA1 Message Date
Erik Faye-Lund 96ac7115db docs: escape backquote character
This unescaped backquote charcter confuses Sphinx, making it emit a
warning and slightly confused HTML in the end.

Let's escape it instead, to keep things sane.

Fixes: fdff24d930 ("docs: add release notes for 20.1.8")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6863>
2020-09-28 07:43:28 +00:00
Andreas Baierl 92831412d9 lima: set clear depth value to 0x00ffffff as default
According to the specs, the initial depth value for a
depth buffer clear is 1. Use 0x00ffffff like the blob does.

We can remove setting this value in lima_clear, because it's
set during job creation now.

Fixes the following dEQP tests:

dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgb565_depth_component16
dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgb5_a1_depth_component16
dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgb4_depth_component16
dEQP-GLES2.functional.fbo.render.shared_depthbuffer.tex2d_rgba_depth_component16
dEQP-GLES2.functional.fbo.render.shared_depthbuffer.tex2d_rgb_depth_component16

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6842>
2020-09-28 07:35:07 +00:00
Mauro Rossi 9a221095d2 android: pan/bi: fix typo in bifrost_gen_disasm.c gen rules
Gen rules were erroneusly named as bifrost_gen_disasm*s*
This patch fixes them

Fixes: 792b51713b ("android: pan/bi: Use new disassembler")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6873>
2020-09-28 09:19:46 +02:00
Boris Brezillon 2e9599b34d panfrost: Fix bifrost tiler job emission
The tiler descriptor pointer and padding sections were not filled.

Fixes: d289209ea6 ("panfrost: XML-ify the compute job descriptor")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6859>
2020-09-28 09:07:33 +02:00
Boris Brezillon 6abb4cd8b9 panfrost: Fix bifrost tiler descriptor definition
The bifrost tiler descriptor definition was wrong, leading to a buffer
overflow.

Fixes: efce73d99d ("panfrost: XML-ify the bifrost tiler descriptors")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6859>
2020-09-28 09:06:37 +02:00
Samuel Pitoiset 4017116fa0 ci: add dEQP-VK.info.device_extensions to the list of skipped tests
It regularly fails when a new KHR extension is implemented.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6843>
2020-09-28 06:32:18 +00:00
Serge Martin a3543adc26 clover: set LLVM min version to 8.0.1
It also bump from 8.0.0 to .1 for AMD gallium and VK

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6336>
2020-09-26 11:06:42 +02:00
Jason Ekstrand bf80fb7c30 clover/nir: Call the memcpy lowering pass
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6713>
2020-09-25 23:48:03 +00:00
Jason Ekstrand 8323c03bbf spirv: Add support for OpCopyMemorySized
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6713>
2020-09-25 23:48:03 +00:00
Jason Ekstrand a3177cca99 nir: Add a lowering pass to lower memcpy
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6713>
2020-09-25 23:48:03 +00:00
Jason Ekstrand b2899f7265 nir: Add a new memcpy intrinsic
This matches SPIR-V's OpCopyMemorySized

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6713>
2020-09-25 23:48:03 +00:00
Jason Ekstrand 8cbb6640f0 spirv: Use the new types helpers
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6713>
2020-09-25 23:48:03 +00:00
Jason Ekstrand de295b61da compiler/types: Add glsl_baseN_t_type(bit_size) helpers
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6713>
2020-09-25 23:48:03 +00:00
Marek Olšák 4cb6a8d2de gallivm: add support for lowered IO in vertex shaders
for Selection/Feedback/RasterPos in st/mesa.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6698>
2020-09-25 21:55:07 +00:00
Dylan Baker 465460943a meson/anv: Use variable that checks for --build-id
fixes: d1992255bb
       ("meson: Add build Intel "anv" vulkan driver")

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6819>
2020-09-25 20:53:17 +00:00
Jesse Natalie 5f1855d896 vtn/opencl: Switch fma to conditionally use libclc for 32bit floats
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 13:20:39 -07:00
Jesse Natalie 8fb25c48a4 vtn/opencl: Only use libclc ldexp when lower_ldexp is set
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 13:14:46 -07:00
Jesse Natalie 09bca4cb95 vtn/opencl: Switch some nir-sequence ops to use libclc
All of these are pretty well-defined. Rather than implementing them
as a sequence of nir ops, we can just use the libclc implementation.

v2 (idr): Delete functions that are now unused.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 13:14:45 -07:00
Jesse Natalie 03fd217d21 vtn/opencl: Switch division-related ops to use libclc
Specifically, fmod only uses libclc if it was going to be lowered.
Also, add missing half_divide and half_recip handling.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie 2624faf137 vtn/opencl: Switch exp/pow/log to use libclc
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie 4cc9ad4eeb vtn/opencl: Switch non-native trig to use libclc
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie 6aee49578f vtn/opencl: Hook up OpenCL async copy and group wait opcodes via libclc
Adds an additional hook for spirv_to_nir to handle a core opcode via
the OpenCL libclc infrastructure, and adds handling for SpvOpGroupAsyncCopy and
SpvOpGroupWaitEvents.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie 00261d883d vtn/opencl: Rework handle_instr to be able to handle core SPIR-V opcodes via libclc
The OpenCL async copy/wait opcodes are core SPIR-V, rather than OpenCL extension opcodes.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie b08fd45be0 vtn/opencl: Implement a lot of opcodes via libclc
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Dave Airlie f33b417652 clover: handle libclc shader (v3)
This works by taking the spirv produced by libclc which contains
a lot of mangled function entrypoints identified with LinkageAttribute decorations.

This patch just sets up clover to load the libclc blob and convert it to
library nir, and support inlining application nir with calls to libclc.

v2: Add a disk cache support for this object, to avoid the spirv parsing
overheads each time. move spirv->nir to lazy instantiation to avoid
the mess with glsl types and constructor ordering.
v3: make disk cache optional

v1-Reviewed-by: Jesse Natalie <jenatali@microsoft.com>

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Dave Airlie 14bc2dcaae util: add missing extern C
This code is included in c++ code via disk_cache in theory,
in practice it never has been.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie 6436e3ac18 vtn/opencl: Add infrastructure for calling out to libclc
This patch adds a function remap table with name mangling, which
can convert a SPIR-V OpenCL extension opcode to a call to the external
libclc shader, which will be lowered/inlined after conversion.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Dave Airlie 45d43ad2b8 clover/nir: add libclc lowering pass
This pass goes through all the functions in the shader, checks
if the matching function is in the clc spir-v library and inlines
the replacement from there it is.

v2 (daniels): Also copy variables from the libclc shader
v3 (jekstrand): Fix progress return, only run variable inlining once
v4 (jekstrand): Have function inlining also copy vars for us

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie 2013903bc2 vtn/opencl: Rework type handling for CL extension opcodes
- Change dest type information to be vtn_type rather than glsl_type
 - Add source type information, also in vtn_type form

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie 938be4d6fa nir/vtn: Add handling for SPIR-V event variables
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Dave Airlie c9a6b94f9e vtn: add an option to create a nir library from spirv
This adds an options to turn a spir-v library into a set of nir
functions. There is no entry point and all function implentations
are emitted.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie 2826a5a923 nir: Add glsl_base_type unsigned -> signed version helper
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Jesse Natalie 93db59e066 nir: Add an internal flag to shader_info
Don't print the shader if it's marked internal, unless NIR_PRINT
has been explicitly set to 2 (or higher).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6035>
2020-09-25 20:09:08 +00:00
Eric Anholt b4a087ce1b driconf: Use nesting macros for defining options.
Manually balancing the BEGIN/ENDs is a recipe for xml validation failures,
just make the macros do the balancing.  The only ugly bit I think is that
enums take a list of DRI_CONF_ENUM() without ','s in between them.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6753>
2020-09-25 19:36:23 +00:00
Eric Anholt e5d2481bfe virgl: Clean up the driconf definition of GLES_SAMPLES_PASSED_VALUE.
The right values ended up being passed to DRI_CONF_OPT_BEGIN_V, they were just
named wrong.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6753>
2020-09-25 19:36:23 +00:00
Eric Anholt 1eb79dfade util/xmlconfig: Add a unit test of the code.
I want to build a non-XML-based alternative for Android, and to do that I
want to know that my equivalent code still works.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6753>
2020-09-25 19:36:23 +00:00
Nanley Chery 7f3e881c6c blorp: Ensure aligned HIZ_CCS_WT partial clears
Fixes: 5425fcf2cb ("intel/blorp: Satisfy HIZ_CCS fast-clear alignments")
Reported-by: Sagar Ghuge <sagar.ghuge@intel.com>
Tested-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6854>
2020-09-25 19:18:51 +00:00
zhu yong 7898993bcd meson: add support for loongson's mips/mips64 arch.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6836>
2020-09-25 17:04:04 +00:00
Samuel Iglesias Gonsálvez b54a0bb528 freedreno/layout: add tile_all flag to the layout
Added a new tile_all flag which is used to set the TILE_ALL flag of
the texture. Enabled tile_all to depth/stencil images are they are
non-linear.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6848>
2020-09-25 15:38:47 +00:00
Jason Ekstrand 0206fb3941 nir/liveness: Consider if uses in nir_ssa_defs_interfere
Fixes: f86902e75d "nir: Add an SSA-based liveness analysis pass"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3428
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6824>
2020-09-25 14:16:15 +00:00
Jonathan Marek dcba32bac0 turnip: implement VK_EXT_extended_dynamic_state
Passes dEQP-VK.pipeline.extended_dynamic_state.*

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5641>
2020-09-25 12:59:02 +00:00
Jonathan Marek b2fa2d99ae turnip: move A6XX_RB_ALPHA_CONTROL write to init_hw
Its always 0.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5641>
2020-09-25 12:59:02 +00:00
Jonathan Marek d1588c78ab turnip: fix wrong indentation in tu6_draw_common
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5641>
2020-09-25 12:59:02 +00:00
Rhys Perry a18c84ecce nir/instr_set: hash intrinsic sources
ministat (CSE only):
Difference at 95.0% confidence
	-9.80325 +/- 0.173089
	-41.4434% +/- 0.461972%
	(Student's t, pooled s = 0.0763653)

ministat (entire run):
Difference at 95.0% confidence
	-3.13667 +/- 0.61519
	-5.11107% +/- 0.990737%
	(Student's t, pooled s = 0.271416)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6860>
2020-09-25 10:18:36 +00:00
Andreas Baierl b8c31ac06d lima: fix glCopyTexSubImage2D
The reload texture descriptor needs to take care of the mipmap level
and the layer in case of GL_TEXTURE_CUBE_MAP.

glCopyTexSubImage2D triggers the lima_blit function which ends in a draw.
A reload is necessary. The reload texture descriptor is always built with
just one mipmap level, but this needs to be the level we want to reload,
not just 0. We also have to take care of the cubemap face.

This fixes the following dEQP tests:

dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_rgb
dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_rgba
dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_rgb
dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_rgba

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6816>
2020-09-25 10:11:36 +00:00
Guido Günther 7b9cf779f2 kmsro: Extend to include imx-dcss
This allows using the dcss display controllers (with the dcss drm
modesetting driver) along with the Etnaviv render-only drivers. DCSS is
found on i.MX SoCs.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3449>
2020-09-25 09:55:15 +00:00
Danylo Piliaiev 77486db867 intel/fs: Disable sample mask predication for scratch stores
Scratch stores are being lowered to the instructions with side-effects,
however they should be enabled in fs helper invocations, since they
are produced from operations which don't imply side-effects.

To fix this - we move the decision of whether the sample mask predication
is enable to the point where logical brw instructions are created.

GLSL example of the issue:

 int tmp[1024];
 ...
 do {
   // changes to tmp
 } while (some_condition(tmp))

If `tmp` is lowered to scrach memory, `some_condition` would be
undefined if scratch write is predicated on sample mask, making
possible for the while loop to become infinite and hang the GPU.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3256
Fixes: 53bfcdeecf
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6056>
2020-09-25 09:48:06 +00:00
Erik Faye-Lund cbef2dc7d3 zink: only set stencil-ref for back if two-sided
Otherwise, we want to set both front and back to the same state.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6853>
2020-09-25 09:16:27 +00:00
Erik Faye-Lund 4b2525b68d zink: store base-object of DSA-state
This is useful in the next commit, where we need to inspect the
base-state.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6853>
2020-09-25 09:16:27 +00:00
Erik Faye-Lund 9e94dcca67 zink: correct typo in stencil-setup
Without this, we end up using two-sided stencil when one-sided stencil
should be used. Whoops.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6853>
2020-09-25 09:16:27 +00:00