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
Marek Olšák
d1d27e9db4
radeonsi: remove redundant info.uses_fbfetch
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782 >
2020-09-25 04:37:23 -04:00
Marek Olšák
7b1e01fec7
radeonsi: remove redundant variables from struct si_compute
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782 >
2020-09-25 04:37:23 -04:00
Marek Olšák
16afaf0355
radeonsi: assume that constant load_local_group_size has been optimized out
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782 >
2020-09-25 04:37:23 -04:00
Marek Olšák
0492adaca7
radeonsi: run NIR optimizations that glsl_to_nir runs but other places might not
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782 >
2020-09-25 04:37:23 -04:00
Marek Olšák
8a1d556c5a
radeonsi: get input/output usage flags from shader_info directly
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782 >
2020-09-25 04:37:23 -04:00
Marek Olšák
0280cc75ba
radeonsi: get information about FS color outputs from shader_info directly
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782 >
2020-09-25 04:37:23 -04:00
Marek Olšák
343e5caa75
radeonsi: use info.system_values_read
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782 >
2020-09-25 04:37:23 -04:00
Marek Olšák
cce3556abd
radeonsi: call nir_shader_gather_info after lowering and optimizing NIR
...
to get more accurate info
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782 >
2020-09-25 04:37:23 -04:00
Marek Olšák
8be46d6558
radeonsi: fix indirect dispatches with variable block sizes
...
The block size input was uninitialized.
Fixes: 77c81164bc
"radeonsi: support ARB_compute_variable_group_size"
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782 >
2020-09-25 04:37:23 -04:00
Christian Gmeiner
a7e3cc7a0e
etnaviv: simplify linear stride implementation
...
As documented in the galcore kernel driver "only LOD0 is valid
for this register". This makes sense, as NTE's LINEAR_STRIDE is
only capable to store one linear stride value per sampler.
This fixes linear textures in sampler slot != 0.
Fixes: 34458c1cf6
("etnaviv: add linear sampling support")
CC: <mesa-stable@lists.freedesktop.org >
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Michael Tretter <m.tretter@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3285 >
2020-09-25 08:03:17 +00:00
Boris Brezillon
f7583bda8f
ci: Extend meson-clang coverage by compiling all gallium drivers
...
Some compile-time regressions go unnoticed because not all gallium
drivers are compiled as part of the meson-clang job. Let's pass an
explicit list of drivers to compile instead of setting GALLIUM_DRIVERS
to "auto" to increase CI coverage.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6811 >
2020-09-25 09:08:34 +02:00