Timothy Arceri [Thu, 6 Aug 2020 00:24:21 +0000 (10:24 +1000)]
disk_cache: move cache item loading code into disk_cache_load_item() helper
This should be helpful if someone chooses to implement cache support on
windows. Also providing this greater level of abstraction makes it easier
to implement alterative cache layouts in future.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6197>
Timothy Arceri [Wed, 5 Aug 2020 04:46:42 +0000 (14:46 +1000)]
disk_cache: add new OS specific helper disk_cache_evict_item()
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6197>
Timothy Arceri [Wed, 5 Aug 2020 04:35:12 +0000 (14:35 +1000)]
disk_cache: move get_cache_file() to an OS specific helper
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6197>
Timothy Arceri [Wed, 5 Aug 2020 04:21:24 +0000 (14:21 +1000)]
disk_cache: create new helper for writing cache items to disk
This pulls out the cache item writing code from cache_put() into
a new helper. In this patch we also move various functions called
by this code into the new disk_cache_os.c file.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6197>
Timothy Arceri [Wed, 5 Aug 2020 03:35:39 +0000 (13:35 +1000)]
disk_cache: move evict_lru_item() to an OS specific helper
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6197>
Timothy Arceri [Fri, 31 Jul 2020 04:29:12 +0000 (14:29 +1000)]
disk_cache: move munmap into an OS specific helper
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6197>
Timothy Arceri [Fri, 31 Jul 2020 04:23:56 +0000 (14:23 +1000)]
disk_cache: move index mmap into OS specific helper
This will make windows support easier to add in future.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6197>
Timothy Arceri [Fri, 31 Jul 2020 01:16:43 +0000 (11:16 +1000)]
disk_cache: add disk_cache_enabled() helper
This will make windows support easier to add in future.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6197>
Timothy Arceri [Thu, 30 Jul 2020 04:50:02 +0000 (14:50 +1000)]
disk_cache: move cache dir generation into OS specific helper file
This will make windows support easier to add in future. To avoid code
churn this temporarily duplicates the mkdir_if_needed() function, we
will delete the duplicate in a following patch.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6197>
Vinson Lee [Wed, 9 Sep 2020 22:08:55 +0000 (15:08 -0700)]
nv50/ir: Remove duplicate mask assignment.
A duplicate assignment was added in
f2924994bd3e ("nv50/ir: add
nv50_ir_prog_info_out").
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6674>
Vinson Lee [Tue, 8 Sep 2020 04:15:03 +0000 (21:15 -0700)]
nv50/ir: Add fallthrough statement.
Fix defect reported by Coverity Scan.
Missing break in switch (MISSING_BREAK)
unterminated_case: The case for value
nir_intrinsic_bindless_image_samples is not terminated by a 'break'
statement.
Suggested-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6645>
Marek Olšák [Sun, 6 Sep 2020 01:09:38 +0000 (21:09 -0400)]
nir/algebraic: add late optimizations that optimize out mediump conversions (v3)
v2: move *2*mp patterns to the end of late_optimizations
v3: remove ftrunc from the optimizations to fix:
dEQP-GLES3.functional.shaders.builtin_functions.common.modf.vec2_lowp_vertex
Reviewed-by: Rob Clark <robdclark@chromium.org> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
Marek Olšák [Fri, 4 Sep 2020 05:48:35 +0000 (01:48 -0400)]
nir/algebraic: collapse conversion opcodes (many patterns)
mediump inserts a lot of conversions. This cleans up the IR.
All other combinations are covered too.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
Marek Olšák [Fri, 4 Sep 2020 03:47:32 +0000 (23:47 -0400)]
nir: add new mediump opcodes f2[ui]mp, i2fmp, u2fmp
Algebraic optimizations will select them.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
Marek Olšák [Fri, 4 Sep 2020 06:07:43 +0000 (02:07 -0400)]
nir: enforce 32-bit src type requirement for f2fmp and i2imp
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
Marek Olšák [Fri, 4 Sep 2020 05:51:49 +0000 (01:51 -0400)]
nir: remove redundant opcode u2ump
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
Marek Olšák [Tue, 1 Sep 2020 06:20:34 +0000 (02:20 -0400)]
nir/algebraic: expand existing 32-bit patterns to all bit sizes using loops
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
Marek Olšák [Tue, 1 Sep 2020 04:12:08 +0000 (00:12 -0400)]
nir/algebraic: add flrp patterns for 16 and 64 bits
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
Alyssa Rosenzweig [Thu, 10 Sep 2020 20:47:37 +0000 (16:47 -0400)]
pan/mdg: Obey f2fmp size restriction in fuse_io_16
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6283>
Nanley Chery [Tue, 8 Sep 2020 14:34:50 +0000 (07:34 -0700)]
blorp: Drop trailing whitespace in blorp_clear.c
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6650>
Nanley Chery [Tue, 8 Sep 2020 14:33:59 +0000 (07:33 -0700)]
blorp: Fix alignment test for HIZ_CCS_WT fast-clears
Remove the extra logical ORs in the ternary operation.
Fixes:
5425fcf2cb3 ("intel/blorp: Satisfy HIZ_CCS fast-clear alignments")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6650>
Marek Olšák [Sun, 6 Sep 2020 04:25:05 +0000 (00:25 -0400)]
nir: fix lower_mediump_outputs to not require variables
If IO is lowered, NIR doesn't have to contain any IO variables
(and in fact radeonsi removes them and other drivers should too).
This makes the pass work without variables.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6621>
Marek Olšák [Sun, 6 Sep 2020 04:24:31 +0000 (00:24 -0400)]
nir: add mediump flag to IO semantics
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6621>
Adam Jackson [Wed, 9 Sep 2020 19:14:30 +0000 (15:14 -0400)]
glx/dri3: Implement GLX_EXT_swap_control_tear
Not wired up for DRI2 because it would require server-side support,
which I'm not especially interested in writing.
Fixes: mesa/mesa#96
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6671>
Adam Jackson [Wed, 9 Sep 2020 18:00:35 +0000 (14:00 -0400)]
glx: Implement GLX_EXT_swap_control for DRI2 and DRI3
This is a slight generalization of the existing SGI and MESA swap
control extensions, and a prerequisite for GLX_EXT_swap_control_tear.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6671>
Adam Jackson [Wed, 9 Sep 2020 19:54:21 +0000 (15:54 -0400)]
glx: Reject glXSwapIntervalMESA greater than INT_MAX
It wouldn't work in any case, as the internal API only stores a signed
int, and GLX_EXT_swap_control_tear will overload the meaning of negative
values so we should avoid ambiguity.
If your application needs a swap interval in excess of ~414.25 days, I'm
very sorry.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6671>
Adam Jackson [Wed, 9 Sep 2020 17:28:02 +0000 (13:28 -0400)]
glx: Collect all the non-applegl extensions in the GetProcAddress table
No functional change, just reducing #ifdef clutter.
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6671>
Adam Jackson [Wed, 9 Sep 2020 16:40:19 +0000 (12:40 -0400)]
glx: Use GLX_FUNCTION2 only for actually aliased function names
I find the __glX naming convention distasteful for a bunch of reasons,
not least that I expect "vi -t glXBindTexImageEXT" to take me someplace
useful. The functions we're referencing here should not be exported from
libGL (hence the static / _X_HIDDEN) but that's no reason not to name
them correctly.
This does have one possible, very minor, correct functional change,
glXGetMscRateOML now returns Bool (unsigned int) instead of GLboolean
(unsigned char); if your psABI really only writes to a single byte of
the return register when the return type is char-like, then we probably
would not have returned false when we meant to. At least for amd64 this
does not seem to be an issue; the old code wrote 0 to %eax, the new code
does a zero-extended load from %al to %eax (since the internal function
still returns GLboolean).
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6671>
Adam Jackson [Wed, 9 Sep 2020 21:03:11 +0000 (17:03 -0400)]
wsi/x11: Hook up VK_PRESENT_MODE_FIFO_RELAXED_KHR
This is just PresentOptionAsync.
Fixes: mesa/mesa#3483
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6673>
Christian Gmeiner [Wed, 9 Sep 2020 20:21:14 +0000 (22:21 +0200)]
ci: do not build libdrm for vc4, reedreno and etnaviv
They are using a in source tree version of the needed libdrm
functionality or are shipping all needed headers in the source tree.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6672>
Jonathan Marek [Wed, 9 Sep 2020 13:26:59 +0000 (09:26 -0400)]
turnip: rework vertex buffers draw state handling
This exploits a HW optimization for when only the size of a draw state is
changed, to make things simpler and more optimal (assuming a well behaved
user which doesn't unecessarily call CmdBindVertexBuffers many times)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6665>
Marcin Ślusarz [Wed, 9 Sep 2020 17:42:52 +0000 (19:42 +0200)]
intel/tools: fix possible randomly increased verbosity of error2aub
Found by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
Marcin Ślusarz [Wed, 9 Sep 2020 17:01:49 +0000 (19:01 +0200)]
intel/compiler: quiet Coverity warnings
Coverity complains about possible out-of-bounds write & read, because
it thinks that "loc + i" can be bigger than sizes of the 2 used arrays.
It's not obvious from the code it cannot happen, so add asserts here.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
Marcin Ślusarz [Wed, 9 Sep 2020 16:48:16 +0000 (18:48 +0200)]
intel/tools: handle ftell errors
Found by Coverity, as "argument cannot be negative", referring to
fread's 2nd argument.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
Marcin Ślusarz [Wed, 9 Sep 2020 16:45:08 +0000 (18:45 +0200)]
intel/tools: fix possible memory leak in the error path
Found by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
Marcin Ślusarz [Wed, 9 Sep 2020 16:13:43 +0000 (18:13 +0200)]
intel/compiler: initialize remaining fields of various classes
These variables seem to be initialized before being used, so this
patch is not fixing any bug, but leaving them unitialized may become
a bug after some refactoring.
These classes were affected: fs_reg_alloc, fs_visitor, fs_generator,
instruction_scheduler.
Found by Coverity.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
Marcin Ślusarz [Wed, 9 Sep 2020 16:26:56 +0000 (18:26 +0200)]
intel/compiler: remove unused fs_validator::param_size
Found by Coverity as unitialized variable.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
Marcin Ślusarz [Wed, 9 Sep 2020 15:59:41 +0000 (17:59 +0200)]
anv: fix minor gen_ioctl(I915_PERF_IOCTL_CONFIG) error handling issue
Found by Coverity.
Fixes:
2001a80d4a8 ("anv: Implement VK_KHR_performance_query")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6667>
Pierre-Eric Pelloux-Prayer [Mon, 17 Aug 2020 14:20:17 +0000 (16:20 +0200)]
driconf: add option to reuse GL names
Fix apps expecting name recycling.
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3144 is an example
of such issue, SPECviewperf13 has this problem too.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600>
Pierre-Eric Pelloux-Prayer [Mon, 17 Aug 2020 13:12:03 +0000 (15:12 +0200)]
mesa: use _mesa_HashFindFreeKeys for GL functions
This allows to implement name reuse if we want to.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600>
Pierre-Eric Pelloux-Prayer [Mon, 17 Aug 2020 13:10:31 +0000 (15:10 +0200)]
mesa: add _mesa_HashFindFreeKeys
_mesa_HashFindFreeKeyBlock function returns a name range, so it cannot be
used to recycle non-consecutive names.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600>
Pierre-Eric Pelloux-Prayer [Mon, 17 Aug 2020 14:18:50 +0000 (16:18 +0200)]
mesa: add GL name reuse support
This will allow drivers to adopt the behavior of proprietary drivers that seem
to return the lowest available name (while Mesa returns max_seen_name + 1).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600>
Pierre-Eric Pelloux-Prayer [Fri, 4 Sep 2020 12:07:04 +0000 (14:07 +0200)]
mesa: add a isGenName parameter to _mesa_HashInsert
Indicates if the given name has been returned by _mesa_HashFindFreeKeyBlock.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600>
Pierre-Eric Pelloux-Prayer [Mon, 7 Sep 2020 13:15:50 +0000 (15:15 +0200)]
util/idalloc: add lowest_free_idx to avoid iterating from 0
lowest_free_idx is a conservative estimation of the lowest index
where a free id can be found.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600>
Pierre-Eric Pelloux-Prayer [Mon, 7 Sep 2020 12:47:47 +0000 (14:47 +0200)]
util/idalloc: add util_idalloc_reserve
Can be used to mark an id as used (if it was reclaimed without using
util_idalloc_alloc).
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600>
Pierre-Eric Pelloux-Prayer [Tue, 8 Sep 2020 18:41:14 +0000 (20:41 +0200)]
mesa: move u_idalloc from gallium/aux/util to util
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6600>
Rob Clark [Tue, 8 Sep 2020 16:12:23 +0000 (09:12 -0700)]
freedreno/a6xx: Fix MSAA clear
We need to do MSAA clear on the 3d pipe, it seems to not work out
properly on 2d pipe (at least for 4x MSAA and heights that are not
multiple of 16).
This matches what blob and tu seem to do. Fixes the following with
DEQP_CONFIG=rgba8888d24s8ms4
dEQP-GLES31.functional.primitive_bounding_box.depth.builtin_depth.per_primitive_bbox_equal
dEQP-GLES31.functional.primitive_bounding_box.depth.builtin_depth.per_primitive_bbox_larger
dEQP-GLES31.functional.primitive_bounding_box.depth.user_defined_depth.per_primitive_bbox_equal
dEQP-GLES31.functional.primitive_bounding_box.depth.user_defined_depth.per_primitive_bbox_larger
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649>
Rob Clark [Wed, 9 Sep 2020 21:03:43 +0000 (14:03 -0700)]
freedreno: Clear gs/tcs/tes state for clear blits
Otherwise we could emit a clear blit that is trying to use some random
GS stage, which doesn't go well.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649>
Rob Clark [Wed, 9 Sep 2020 21:03:15 +0000 (14:03 -0700)]
freedreno/a6xx: Fix fd6_draw_vbo() return
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649>
Rob Clark [Wed, 9 Sep 2020 16:08:02 +0000 (09:08 -0700)]
freedreno/a6xx: Skip empty tile_setup
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649>
Rob Clark [Tue, 8 Sep 2020 23:27:54 +0000 (16:27 -0700)]
freedreno: Don't bypass fd_draw_vbo() in clear fallback
Otherwise we bypass all the resource-usage tacking.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649>
Rob Clark [Tue, 8 Sep 2020 21:56:55 +0000 (14:56 -0700)]
freedreno: Fix rast state for multisample clear
a6xx in particular cares about the multisample bit.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649>
Dave Airlie [Mon, 7 Sep 2020 19:37:36 +0000 (05:37 +1000)]
gallivm: disable brilinear for lod bias and explicit lod.
This allows GL 4.5 CTS to pass in full with no flags, other than
that I'm not sure if it's a good or bad idea.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6638>
Eric Anholt [Thu, 3 Sep 2020 20:11:37 +0000 (13:11 -0700)]
freedreno/fdl: Add layout test for the Android CTS's MSAA mustpass surface.
Rob had a question of if we were laying things out the same as the blob.
This doesn't detect any difference in our layout, though.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6589>
Eric Anholt [Thu, 3 Sep 2020 20:04:29 +0000 (13:04 -0700)]
freedreno/cffdec: Add support for texturator's 2DMS layout setup.
We can't initialize our MSAA texture with glTexImage2D(), so we have to do
a draw to get its slice's layout into the cmdstream.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6589>
Eric Anholt [Thu, 3 Sep 2020 18:24:01 +0000 (11:24 -0700)]
freedreno/cffdec: Fix up texturator parsing scripts for XML changes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6589>
Eric Anholt [Wed, 9 Sep 2020 20:10:05 +0000 (13:10 -0700)]
freedreno: Add another new sysmem flake.
This one blocked a marge merge a few minutes ago.
Fixes:
b4317fccdd7f ("ci/bare-metal: Update the kernel to msm-next-pgtables")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6670>
Vinson Lee [Mon, 7 Sep 2020 23:44:07 +0000 (16:44 -0700)]
spirv: Initialize spirv_test member shader.
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member shader is not initialized in this
constructor nor in any functions that it calls
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6640>
Vinson Lee [Tue, 8 Sep 2020 02:31:38 +0000 (19:31 -0700)]
svga: Fix unused printf argument.
Fix defect reported by Coverity Scan.
Extra argument to printf format specifier (PRINTF_ARGS)
extra_argument: This argument was not used by the format string:
info->num_outputs.
Fixes:
ccb4ea5a43e8 ("svga: Add GL4.1(compatibility profile) support in svga driver")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6644>
Vinson Lee [Tue, 8 Sep 2020 00:23:35 +0000 (17:23 -0700)]
freedreno: Fix file descriptor leak.
Fix defects reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_handle: Handle variable fd going out of scope leaks the handle.
Argument cannot be negative (NEGATIVE_RETURNS)
negative_returns: fd is passed to a parameter that cannot be negative.
Fixes:
1ea4ef0d3be8 ("freedreno: slurp in decode tools")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6642>
Icecream95 [Wed, 9 Sep 2020 06:22:00 +0000 (18:22 +1200)]
pan/mdg: Fix spilling of non-32-bit types
The source argument for mov has index 1, not 0.
Fixes a vertex shader in SuperTuxKart.
Fixes:
b4de9e035ac ("pan/mdg: Mask spills from texture write")
Reported-by: macc24
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>~
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6659>
Jesse Natalie [Wed, 9 Sep 2020 00:56:54 +0000 (17:56 -0700)]
nir: More NIR_MAX_VEC_COMPONENTS fixes
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6655>
Jason Ekstrand [Tue, 8 Sep 2020 23:37:05 +0000 (18:37 -0500)]
nir/idiv_const: Use the modern nir_src_as_* constant helpers
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6655>
Jason Ekstrand [Tue, 8 Sep 2020 23:36:47 +0000 (18:36 -0500)]
nir: More NIR_MAX_VEC_COMPONENTS fixes
A couple of these probably aren't strictly necessary but they won't
hurt. The one that's particularly tricky is a fixed-length array in
nir_search.h. However, to avoid blowing up the binary size of
nir_opt_algebraic by about 2x, we just assert that only small ops are
used.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6655>
Nanley Chery [Mon, 9 Sep 2019 23:01:13 +0000 (16:01 -0700)]
iris: Support I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Wed, 15 Apr 2020 23:47:46 +0000 (16:47 -0700)]
iris: Support MC modifier in plane count queries
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Mon, 27 Jul 2020 18:52:59 +0000 (11:52 -0700)]
intel/common: Drop unused gen_aux_map_add_image
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Thu, 23 Jul 2020 15:52:46 +0000 (08:52 -0700)]
iris: Support planar resource imports for MC
Support importing and mapping multiple planes of aux data for
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Wed, 20 Nov 2019 00:05:38 +0000 (16:05 -0800)]
intel/common: Add get_aux_map_format_bits()
Add a function suitable for planar YUV surfaces. For these surfaces,
drivers remap each plane to an RGB-formatted surface. Enable drivers to
pass the plane index and the original YUV format to get the right
aux-map format bits.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Fri, 31 Jul 2020 00:39:26 +0000 (17:39 -0700)]
st/mesa: Don't map all P01X DRM formats to P016
Allow gallium drivers to distinguish between the P010, P012, and P016
DRM formats.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Thu, 23 Jul 2020 23:09:59 +0000 (16:09 -0700)]
intel/isl: Add YUV format info for the aux-map
* Define ISL equivalents for the P010, P012, and P016 formats.
* Add aux-map encodings for the YUV formats iris will soon support.
v2. Replace &&'s with ||'s in isl_format_is_planar() (Lionel)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Mon, 9 Sep 2019 23:11:13 +0000 (16:11 -0700)]
intel/isl: Support ISL_AUX_USAGE_MC in surface states
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Tue, 19 Mar 2019 21:11:34 +0000 (14:11 -0700)]
intel/isl: Describe I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Wed, 15 Apr 2020 23:30:24 +0000 (16:30 -0700)]
gallium/dri2: Support I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS import
Add support for up to four planes being imported via the
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS modifier. In the four plane
scenario, two planes are used for the compressed surface and two planes
are used for the compression metadata.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Nanley Chery [Wed, 11 Sep 2019 22:34:46 +0000 (15:34 -0700)]
gallium/dri2: Report I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS num_planes
Return the expected number of planes in a DMA buffer that has the
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS modifier.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6486>
Jesse Natalie [Wed, 9 Sep 2020 00:50:23 +0000 (17:50 -0700)]
nir_dominance: Use uint32_t instead of int16_t for dominance counters
We're seeing OpenCL kernels that can hit this INT16_MAX block count.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6657>
Danylo Piliaiev [Tue, 8 Sep 2020 10:22:12 +0000 (13:22 +0300)]
st/nir: Call st_glsl_to_nir_post_opts before interface unification
Since
95415a54c007a909f0fb9d1b2567beecbd73d403 st_finalize_nir_before_variants
calls to nir_shader_gather_info, so finalization should be moved
before interface unification.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3482
Fixes:
95415a54c007a909f0fb9d1b2567beecbd73d403
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/6647>
Adam Jackson [Thu, 14 Nov 2019 18:09:32 +0000 (13:09 -0500)]
mesa: Generate more errors from GetSamplerParameter
Not all of the corresponding extensions are enabled unconditionally, and
we should throw INVALID_ENUM in those cases.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6653>
Adam Jackson [Thu, 14 Nov 2019 16:10:05 +0000 (11:10 -0500)]
mesa: Fix GL_CLAMP handling in glSamplerParameter
GL_CLAMP is only a thing in compat contexts.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6653>
Eric Anholt [Fri, 1 May 2020 16:35:16 +0000 (09:35 -0700)]
ci/bare-metal: Allow wget of the kernel/dtb for kernel development.
It's useful for kernel dev to be able throw all of our testing
infrastructure at a risky kernel change, but it's expensive (time and
bandwidth) to roll new containers every time your rev your kernel. Make
it so you can just point the env vars to your personal build you've
uploaded.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592>
Eric Anholt [Wed, 2 Sep 2020 17:49:44 +0000 (10:49 -0700)]
ci/bare-metal: Update the kernel to msm-next-pgtables
I'd like to see this new non-UAPI feature bake in CI. More importantly,
it may prevent some classes of flakes on cheza by isolating the processes
on the GPU so that a fault in one doesn't stomp over memory in another.
I've also pulled in a fix that etnaviv needed for their upcoming CI.
We add a few more kernel options while uprevving:
- More interconnect drivers for getting good GPU perf
- PRNG so that we don't get late-in-boot complaints about randomness.
- db820c's power domains and ethernet so hopefully we can switch to this
upstream kernel
This seems to slightly change the flakes happening in bypass mode, so add
them to the list.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592>
Eric Anholt [Thu, 3 Sep 2020 18:56:45 +0000 (11:56 -0700)]
turnip: Fix truncation of iovas to 32 bits in queries.
Fixes regression when switching to msm-next-pgtables.
Fixes:
e34b0d65f971 ("turnip: Implement and enable VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592>
Eric Anholt [Thu, 3 Sep 2020 17:30:31 +0000 (10:30 -0700)]
turnip: Fix truncation of CS shader iovas to 32 bits.
This was invalid, and makes VK break consistently with the
msm-next-pgtbables branch.
Fixes:
13525a9c706b ("turnip: pipeline program state refactor")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592>
Eric Anholt [Thu, 3 Sep 2020 21:46:24 +0000 (14:46 -0700)]
freedreno: Make the pack struct have a .qword for wide addresses.
Storing a precomputed iova in reg packing wasn't possible because you'd
truncate to 32 bits. Making it be .qword makes it possible.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592>
Eric Anholt [Thu, 3 Sep 2020 20:42:17 +0000 (13:42 -0700)]
turnip: Fix a compiler warning in release builds of the query code.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6592>
Jonathan Marek [Thu, 30 Jul 2020 12:58:16 +0000 (08:58 -0400)]
turnip: remove some unnecessary regs init
The removed registers are all set elsewhere when they are relevant, so
there is no need to initialize them in init_hw().
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664>
Jonathan Marek [Wed, 9 Sep 2020 13:50:47 +0000 (09:50 -0400)]
turnip: delete unused "tu_cmd_buffer_upload"
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664>
Jonathan Marek [Wed, 9 Sep 2020 13:49:22 +0000 (09:49 -0400)]
turnip: fix the type of tu_shader_module code field, delete unused sha1
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664>
Jonathan Marek [Wed, 9 Sep 2020 13:45:28 +0000 (09:45 -0400)]
turnip: delete unused tu_image fields
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664>
Jonathan Marek [Thu, 13 Aug 2020 17:50:46 +0000 (13:50 -0400)]
turnip: delete tu_physical_device path field
Resolves a "strncpy specified bound 20 equals destination size" warning.
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6664>
Rhys Perry [Mon, 7 Sep 2020 19:45:25 +0000 (20:45 +0100)]
aco: fix validation of sub-dword parallel-copies
Only the operands with a sub-dword definition need to be checked.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6662>
Rhys Perry [Mon, 7 Sep 2020 19:44:54 +0000 (20:44 +0100)]
aco: fix value numbering of reductions
Non-ssa definitions caused an assertion in value numbering.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6662>
Rhys Perry [Mon, 7 Sep 2020 19:21:37 +0000 (20:21 +0100)]
aco: don't apply constant to SDWA on GFX8
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: 20.2 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6662>
Rhys Perry [Mon, 7 Sep 2020 19:20:50 +0000 (20:20 +0100)]
aco: workaround disassembler bug of v_writelane_b32 with literal
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6662>
Rhys Perry [Mon, 7 Sep 2020 19:20:34 +0000 (20:20 +0100)]
aco: fix v_writelane_b32 with two sgprs
v_writelane_b32 can take two sgprs but only if one is m0.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: 20.2 <mesa-stable>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6662>
Rhys Perry [Mon, 17 Aug 2020 12:19:43 +0000 (13:19 +0100)]
nir/opt_loop_unroll: fix is_access_out_of_bounds with vectors
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsquueze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6347>
Icecream95 [Fri, 4 Sep 2020 22:21:40 +0000 (10:21 +1200)]
panfrost: AFBC to linear layout conversion
Similar to the conversion that is already done for tiled to linear.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6608>
Icecream95 [Fri, 4 Sep 2020 22:18:33 +0000 (10:18 +1200)]
panfrost: Move tiled-linear conversion checking to a new function
AFBC-linear conversion will also use this function.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6608>
Icecream95 [Fri, 4 Sep 2020 22:16:04 +0000 (10:16 +1200)]
panfrost: Seperate resource setup and bo creation
This will make it easier to convert between modifiers without
unnecessarily creating a new bo.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6608>
Icecream95 [Fri, 4 Sep 2020 22:11:41 +0000 (10:11 +1200)]
panfrost: Correctly set modifier_constant
This fixes the tiled-linear conversion optimisation.
Fixes:
56f9cc99487 ("panfrost: Account for modifiers when creating BO")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6608>