Commit Graph

126952 Commits

Author SHA1 Message Date
Lionel Landwerlin 42cb068d9f intel/dump_gpu: only map in GTT buffers not previously mapped
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
2020-08-07 11:27:54 +00:00
Lionel Landwerlin 22b512ea5b intel/dump_gpu: add an only-capture option
This option allows for smaller aub files to be generated by only
storing the BOs flagged with EXEC_OBJECT_CAPTURE.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
2020-08-07 11:27:54 +00:00
Lionel Landwerlin f0e13827aa intel/dump_gpu: set default device_override
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
2020-08-07 11:27:54 +00:00
Lionel Landwerlin c4bfa6dfbb intel/dump_gpu: further track mapping of BOs
We can go further in tracking what BOs are written to by the driver by
tracking when a buffer in unmapped. A BO could be mmap, written, unmap
and never be written to again. In such case we can just write the BO's
content on the first exec buf after unmap and never write it again.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
2020-08-07 11:27:54 +00:00
Lionel Landwerlin 63c90acc9e intel/dump_gpu: only write BOs mapped by the driver
Track what BOs are mapped by the driver and only write those. We can
safely assume that when not mapped there is no data to save.

v2: Don't forget to return the ret (Rafael)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>
2020-08-07 11:27:54 +00:00
Mike Blumenkrantz 54c68498d4 zink: set primitive restart cap
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912>
2020-08-07 11:17:04 +00:00
Mike Blumenkrantz 5959178381 zink: use util_draw_vbo_without_prim_restart for unsupported prim modes
this fixes up primitive restart functionality for the primitive types that
vulkan doesn't support using primitive restart with

fixes #2873

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912>
2020-08-07 11:17:04 +00:00
Mike Blumenkrantz f4583b4086 zink: move 8bit index handling out of u_primconvert path
putting this through util_translate_prim_restart_ib reduces our reliance on
u_primconvert, which ideally we don't want to be using

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912>
2020-08-07 11:17:04 +00:00
Mike Blumenkrantz 5edaf081cd zink: basic primitive restart support for strip/fan topologies
this conditionally handles rewriting the index buffer to use vk-compatible
restart indexes and then enables it in the pipeline for supported draw
modes

fixes #3174

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5912>
2020-08-07 11:17:04 +00:00
Bas Nieuwenhuizen 8531830038 radv: Add ETC2 support on RAVEN2.
I did a whole bunch of validation and it essentially works.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6215>
2020-08-07 10:54:58 +00:00
Samuel Pitoiset bea8930468 radv: allow to force-enable LLVM internally for a specific shader stage
For ACO debugging purposes, developers only.

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/6208>
2020-08-07 07:45:06 +00:00
Christian Gmeiner e63a7882a0 etnaviv: call nir_lower_bool_to_bitsize
Starting with commit 6f394343b1 ("nir/algebraic: i2f(f2i()) -> trunc()")
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_vertex
ends with an unsuppored flt instruction. Use nir_lower_bool_to_bitsize to
convert this flt to a flt32 which is supported. This fixes the introduced
regression.

Cc: 20.2 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6182>
2020-08-07 03:25:36 +00:00
Alyssa Rosenzweig c5b2319628 panfrost: Drop compiler cmdstream deps
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig 1d0b3ef051 panfrost: Treat texture dimension as first-class
Instead of hiding behind a cmdstream enum. The raw values have a very
simple interpretation as dimension.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig 5a3088e85f panfrost: Inline max rt into compilers
Another dep.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig 54f96544ec pan/bi: Drop use of MALI_POSITIVE
Contributing to a dep on the main cmdstream. It's a fancy word for
subtract one...

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig c94013c819 panfrost: Add panloader/ to .gitignore
For out-of-tree trace infrastructure.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig 52e3a67bb1 panfrost: Reduce bit dependency to disassembly only
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig 14bb72c68b pan/bi: Separate disasm/compiler targets
Likewise.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig b792d613e6 pan/mdg: Separate disassembler and compiler targets
The compiler depends on the disassembler, which is okay. But the
disassembler now no longer depends on the compiler circularly, avoiding
the need to being in GLSL/NIR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig d62a6e7c5f panfrost: Move pandecode into lib/
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig 1c62b5528a panfrost: Rename encoder/ to lib/
We'll want both encoding and decoding here, as a generic hardware
interface library based on GenXML.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig 956b09653c panfrost: Don't export exception_status
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig 4ddc6e543c panfrost: Remove panfrost-misc.h
Now unused.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig 64f3c9da87 panfrost: Inline panfrost-misc.h into panfrost-job.h
We only need a small subset of the defines here.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig ebf7e87f2c pan/decode: Remove shader replacement artefact
Did this ever work?

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig e4df95bf9f panfrost: Move format stringify to decode.c
Let's simplify pandecode before moving it around. We don't need to share
this routine right now, and we'll be generating it soon.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Alyssa Rosenzweig b80e753940 panfrost: Remove blend prettyprinters
Unused and mostly wrong too.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6196>
2020-08-06 23:54:24 +00:00
Lionel Landwerlin b43bcb05a1 anv: fix incorrect realloc failure handling
We don't want to leak in case of failure.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: Ivan Briano <ivan.briano@intel.com>
Fixes: 246261f0ad ("anv: prepare the driver for delayed submissions")
Fixes: 34f32a6d66 ("anv: implement VK_KHR_timeline_semaphore")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6200>
2020-08-06 23:07:56 +00:00
Rhys Perry 21b47cbd99 aco: fix C++11/C++14 compilation
static_assert without a message is only available since C++17.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: d1f992f3c2 ('aco: rework barriers and replace can_reorder')
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3374
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6216>
2020-08-06 23:51:14 +01:00
Danylo Piliaiev 782ba8d3ae st/mesa: Treat vertex outputs absent in outputMapping as zero in mesa_to_tgsi
After updating vertex outputs being written based on optimized NIR, they may
go out of sync with outputs in mesa IR. Which is translated to TGSI and used
together with NIR if draw doesn't have llvm.

It's much easier to treat such outputs as zero because there is no pass to
entirely get rid of them.

Similar to eeab9c93db but now for outputs.

Fixes: d684fb37bf
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3365
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6187>
2020-08-06 16:53:50 +00:00
Dylan Baker a92cfa66b4 Bump development version and clear new_features
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
2020-08-06 09:34:42 -07:00
Jason Ekstrand 7f06d194fd anv: Advertise shaderIntegerFunctions2
We advertised the extension string but never the feature bit.  Doh!

Fixes: c57338b924 "anv: Enable SPV_INTEL_shader_integer_functions2..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6033>
2020-08-06 16:14:16 +00:00
Icenowy Zheng 9e397956b0 panfrost: signal syncobj if nothing is going to be flushed
When nothing is going to be flushed, the kernel will get no job that
signals the syncobj.

Signal it by ourselves, otherwise it will never get signaled.

Closes: #3371

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6190>
2020-08-06 13:16:25 +00:00
Bas Nieuwenhuizen c6aadbae71 radv: Don't use both DCC and CMASK for single sample images.
Fixes: c67ef7695a "radv: Use ac_surface to allocate aux surfaces."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6194>
2020-08-06 10:50:22 +00:00
Jose Fonseca e2c614a415 appveyor: Use Python3.
This implied upgrading to the Visual Studio 2019 image, not for VS
itself, but for the newer Python 3.8.5 version it contains, to avoid
UnicodeDecodeError inside modulefinder module when attempting to decode
our UTF-8 encoded Python scripts with cp1252 encoding.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6184>
2020-08-06 09:46:48 +00:00
Jose Fonseca 0f9fb7ffaa appveyor: Upgrade pip.
To avoid all those warnings.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6184>
2020-08-06 09:46:48 +00:00
Vinson Lee 2e665458a9 util: Fix SCons build.
Fixes: 848e7b947d ("util: Move stack debug functions to src/util")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6199>
2020-08-05 22:55:06 -07:00
Eric Anholt 56ab105182 freedreno: Add more asserts for DST_OFF/NUM_UNIT in indirect const uploads.
These are just empirical alignment numbers from looking at dEQP traces of
the blob driver (a330, a418, a540, a618, a630), with one exception noted
in the comments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990>
2020-08-05 23:06:55 +00:00
Eric Anholt 3e970de360 freedreno: Increase the NUM_UNIT on compute's consts in indirect dispatch.
Avoids tripping the assert in the next commit -- the blob never uses
num_unit % 4 != 0 for indirect const uploads.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990>
2020-08-05 23:06:55 +00:00
Eric Anholt f07e25bc6d freedreno/ir3: Clean up instrlen setup.
We were calculating it with the gpu_id check in two places, do it once and
use ir3_compiler for the gpu_id dependency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990>
2020-08-05 23:06:55 +00:00
Eric Anholt 8f637d66cc freedreno: Split ir3_const's user buffer and indirect upload APIs.
They're almost entirely split by whether you're uploading user buffer or
from a BO.  While I'm rewriting the API, drop the emit_const ->
fdN_emit_const wrapper in favor of a #define before the header and a
little helper for the asserts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990>
2020-08-05 23:06:55 +00:00
Eric Anholt 154299934d freedreno: Rename emit_const_bo() to emit_const_ptrs().
I keep thinking it's the "upload from inside a BO" path when it's not.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990>
2020-08-05 23:06:55 +00:00
Eric Anholt 51acfe2230 freedreno/ir3: Simpify the immediates from an array of vec4 to array of dwords.
We usually had to split the idx/swiz out of the dword index anyway.  Note
that incidentally, immediates_size now increments in vec4s instad of
4*vec4s.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990>
2020-08-05 23:06:55 +00:00
Eric Anholt e873c4da08 freedreno/ir3: Merge the redundant immediate_idx/immediates_count fields
I got tripped up again with the index vs count vs size fields and I'd
rather we didn't store the redundant info.  Settle on immediates_count as
"how many dwords of immediates we have"

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5990>
2020-08-05 23:06:55 +00:00
Rob Clark 5e922fbc16 glsl_to_nir: fix bitfield_extract with 16-bit operands
These are defined to explicitly take 32b values.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6073>
2020-08-05 22:04:47 +00:00
Marek Olšák 92f5e94a93 glsl: improve precision determination for calls
Don't leave the precision as NONE for non-lowerable calls. Set it to HIGH
if a function really returns highp.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6073>
2020-08-05 22:04:47 +00:00
Marek Olšák 282a1e6288 glsl: don't lower to mediump for desktop OpenGL
Desktop OpenGL ignores all precision qualifiers.

Also, the lowering pass doesn't work if precision qualifiers are not set,
which is only possible with desktop OpenGL, causing random behavior.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6073>
2020-08-05 22:04:47 +00:00
Marek Olšák 01e0085637 glsl: don't create conversion opcodes for array types
Instead, convert all elements one by one.
This fixes piglit shaders@glsl-bug-110796.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6073>
2020-08-05 22:04:47 +00:00
Marek Olšák 5020403c70 glsl: don't lower atomic functions to mediump
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6073>
2020-08-05 22:04:47 +00:00