Commit Graph

120387 Commits

Author SHA1 Message Date
Marek Olšák 2e05a280b6 mesa: fix immediate mode with tessellation and varying patch vertices
Cc: 19.3 20.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
2020-02-18 16:47:30 -05:00
Marek Olšák a6d3158909 mesa: don't use memset in glDrawArrays
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
2020-02-18 16:46:55 -05:00
Marek Olšák ee549c6766 mesa: document _mesa_prim::begin/end
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
2020-02-18 16:45:50 -05:00
Marek Olšák c9246282b7 vbo: remove redundant code in vbo_exec_fixup_vertex
Callers of this function also set FLUSH_STORED_VERTICES for attr == 0.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
2020-02-18 16:45:34 -05:00
Marek Olšák 3eeeb86cb0 vbo: remove dead code in vbo_can_merge_prims
This is only used by immediate mode and the values are immutable.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
2020-02-18 16:45:34 -05:00
Marek Olšák 2491a2ddeb st/mesa: try to fix MSVC build failure due to ALWAYS_INLINE
Fixes: 11db8e0e00 ("st/mesa: optimize st_update_array with ALWAYSINLINE")
Tested-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3861>
2020-02-18 16:45:34 -05:00
Rob Clark 06dc280a57 freedreno/registers: cleanup CP_SET_MARKER
1) Name RM6_COMPUTE, and rename RM6_ENDVIS (from RM6_BLIT) to better
   reflect what it actually does
2) Cleanup open-coded mode enum values
3) Removed unused 0x10

Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3833>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3833>
2020-02-18 20:52:42 +00:00
Rob Clark 7b4d6bb1ec freedreno: quiet INFO_MSG
Probably not useful unless LIBGL_DEBUG is set to something.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3833>
2020-02-18 20:52:42 +00:00
Rob Clark 838ed2885d freedreno/a6xx: few register updates
Nothing used by mesa, but crashdec tool uses a few of these.  And since
the practice is these days to sync mesa->envytools, adding these on the
mesa side first.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3833>
2020-02-18 20:52:42 +00:00
Rob Clark 4fc31e7d33 freedreno/registers: teach gen_header.py about a3xx_regid
This is a builtin type (treated as uint, but with special type-aware
decoding) in envytools/cffdump.  Lets teach gen_header.py about it and
drop the enum hack in the xml so I don't have to keep deleting the enum
when I sync the xml back to the freedreno envytools tree.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3833>
2020-02-18 20:52:42 +00:00
Eric Engestrom ecca5ef6c3 meson: explicitly disallow unsupported build directory layout
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2512
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3832>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3832>
2020-02-18 20:05:03 +00:00
Caio Marcelo de Oliveira Filho 79788b8f7f intel/gen12: Take into account opcode when decoding SWSB
The interpretation of the fields is different depending whether the
instruction is a SEND/MATH or not.

This fixes the disassembly output for non-SEND/MATH instructions that
have both in-order and out-of-order dependencies.  Their dependencies
were wrongly represented as `@A $B` when the correct would be `@A
$B.dst`.

Fixes: 6154cdf924 ("intel/eu/gen12: Add auxiliary type to represent SWSB information during codegen.")
Fixes: 83612c0127 ("intel/disasm/gen12: Disassemble software scoreboard information.")
Acked-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3660>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3660>
2020-02-18 09:17:51 -08:00
Alyssa Rosenzweig bee5c9b0dc panfrost: Remove enum panfrost_memory_layout
It duplicates mali_texture_layout. Let's use the native hardware enum
and spare a pointless translation.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3854>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3854>
2020-02-18 16:20:56 +00:00
Caio Marcelo de Oliveira Filho 28e94e0a94 radv: Advertise VK_KHR_shader_non_semantic_info
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3856>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3856>
2020-02-18 09:57:17 -06:00
Caio Marcelo de Oliveira Filho 8004cb256a anv: Advertise VK_KHR_shader_non_semantic_info
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3856>
2020-02-18 09:57:15 -06:00
Jason Ekstrand 2dae89ac36 vulkan: Update the XML and headers to 1.2.133
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3856>
2020-02-18 09:57:14 -06:00
Alyssa Rosenzweig 7d3c48f131 panfrost: Debitfieldize mali_uniform_buffer_meta
It fits snugly in a u64, just give a macro for direct computation rather
than fudging around with bitfields. Not sure if this actually matters
with well-optimized compilers but it makes the code subjectively cleaner
so it's worth it for that if nothing else.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3838>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3838>
2020-02-18 14:44:08 +00:00
Alyssa Rosenzweig 027944c7c8 panfrost: Avoid reading GPU memory when packing vertices
These occurred unintentionally as a byproduct of bitfields, etc. Whoops.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3838>
2020-02-18 14:44:08 +00:00
Alyssa Rosenzweig 4c52e16c9c panfrost: Cleanup transfer_map
A lot of these checks are obsolete since we've started tracking BO
accesses correctly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3849>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3849>
2020-02-18 14:13:18 +00:00
Alyssa Rosenzweig 308f9cf104 panfrost: Update scoreboarding notes
Our understanding of the set/write value jobs has evolved, so let's
update the rules.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
2020-02-18 08:45:25 -05:00
Alyssa Rosenzweig 88323d1ba0 panfrost: Rewrite scoreboarding routines
Rather than manipulating job descriptor headers as fat pointers (slow)
and using fancy manipulation functions for programatically building the
tree in arbitrary orders (slow and complicated) and then having to do a
topological sort at runtime every frame (slow) which requires traversing
said headers in GPU memory (slow!)... we finally know enough about
the hardware to just get things right the first time, or second for
next_job linking. So rip out all that code and replace it with a much
better routine to create, upload, and queue a job all in one (since now
it's the same operation essentially - which is much better for memory
access patterns, by the way) and most everything falls into place
gracefully according to the rules we've set out. Even wallpapering isn't
*so* terrible if you just... move that one little... giant... hack out
of sight... ahem....

panfrost_scoreboard_link_batch is no longer a bottleneck, mostly because
it no longer exists :-)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
2020-02-18 08:45:21 -05:00
Alyssa Rosenzweig 070bc883d3 panfrost: Print synced traces to stderr
To match the existing behaviour.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
2020-02-18 08:45:18 -05:00
Alyssa Rosenzweig c46a090942 panfrost: Implement PAN_DBG_SYNC with pandecode/minimal
This way we avoid duplicating job traversal logic.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
2020-02-18 08:45:14 -05:00
Alyssa Rosenzweig 5998646125 pan/decode: Cleanup pandecode_jc
Some of this code is, to put it mildly, impossibly ancient horsedropping
crazy cruft.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
2020-02-18 08:45:09 -05:00
Alyssa Rosenzweig 4122f747ac pan/decode: Add `minimal` mode
We would like a mode to skip decoding job payloads so we can just
inspect for faults.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
2020-02-18 08:44:59 -05:00
Danylo Piliaiev b684ba6ce7 st/nir: Unify inputs_read/outputs_written before serializing NIR
Otherwise input/output interfaces won't be unified when reading
NIR from a cache.

Fixes piglit test on iris:
  clip-distance-vs-gs-out.shader_test

Fixes: 19ed12af

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3787>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3787>
2020-02-18 09:18:37 +00:00
Erik Faye-Lund 9903f10636 zink: do not convert bools to/from uint
Since bools are the only 1-bit type, we always know if an SSA-def is a
bool or not. So we don't need to marshal it to uint.

So let's simplify the code a bit here.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
2020-02-17 12:46:54 +00:00
Erik Faye-Lund 4d016de250 zink/spirv: uint -> raw
Similarly to the previous commit, the important bit here is the rawness
of these variables, not the uintness. So let's rename these to reflect
this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
2020-02-17 12:46:54 +00:00
Erik Faye-Lund 7c1a2cbcad zink/spirv: unit_value -> raw_value
The point here isn't that the value is uint, but that is't untreated. So
raw seems more fitting as a description.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
2020-02-17 12:46:54 +00:00
Erik Faye-Lund 16339646f0 zink/spirv: rename functions a bit
The code is about to change so the whole uint-story isn't as true as it
used to be. So let's soften up the semantics a bit here; we only care
about if we're doing a typed ot untyped store here, really.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
2020-02-17 12:46:54 +00:00
Erik Faye-Lund a6211a4247 zink/spirv: prefer store_dest over store_dest_uint
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
2020-02-17 12:46:54 +00:00
Erik Faye-Lund 7e8f7df800 zink/spirv: do not reinvent store_dest
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
2020-02-17 12:46:54 +00:00
luc 692093fbdc zink: confused compilation macro usage for zink in target helpers.
Fixes: 8d46e35d16 ("zink: introduce opengl over vulkan")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3831>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3831>
2020-02-17 12:21:01 +00:00
Erik Faye-Lund b7e966dc7f zink: do not report texture-samplers for unsupported stages
This caused the max combined samplers to be reported as artificially
high.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3826>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3826>
2020-02-17 10:00:18 +00:00
Erik Faye-Lund 4a20db70de zink: fix binding-usage
Rewriting the variable bindings is nasty and error-prone, and this code
triggered an assert when trying to resolve API bindings into Vulkan
bindings.

This code still needs some tweaks, but this makes things much better,
and fixes a few bugs where we incorrectly accounted for the
array-indexes.

Fixes: 1c3f4c0704 ("zink: fixup sampler-usage")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3826>
2020-02-17 10:00:18 +00:00
Samuel Pitoiset c095b7d5bd radv: add a comment about VK_AMD_mixed_attachment_samples on GFX6-GFX7
There is some CTS failures.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3808>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3808>
2020-02-17 08:33:44 +01:00
Samuel Pitoiset 4159b24be7 radv: enable VK_NV_compute_shader_derivatives on GFX6-GFX7
All Crucible tests pass.

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/3808>
2020-02-17 08:33:42 +01:00
Samuel Pitoiset 83dd0cace6 radv: enable VK_EXT_sampler_filter_minmax on GFX6
Works fine.

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/3808>
2020-02-17 08:33:40 +01:00
Samuel Pitoiset 170c3a8b7b radv: enable shaderStorageImageMultisample on GFX6-GFX7
It was disabled because untested, but CTS is happy with it.

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/3808>
2020-02-17 08:32:26 +01:00
Mathias Fröhlich c7617d8908 egl: Implement getImage/putImage on pbuffer swrast.
This change adds getImage/putImage callbacks to the swrast pbuffer
loader extension.
This fixes a recent crash with Weston as well as a crashing
test with classic swrast without an official gitlab issue.

v2: Determine bytes per pixel differently and fix non X11 builds.
v3: Plug memory leak and fix crash on out of bounds access.
    (Daniel Stone)
v4: Follow the code structure of the wayland get/put image
    implementation - hopefully being more obvious.
    Handle 64 bits formats.
    Use BufferSize directly.
    (Emil Velikov)
v5: Change pixel size computation.
    (Eric Engestrom)

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2219
Fixes: d6edccee8d "egl: add EGL_platform_device support"
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3711>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3711>
2020-02-17 04:01:37 +00:00
Qiang Yu 6fc0890cd9 lima: rename lima_submit to lima_job
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00
Qiang Yu 57d9a51d45 lima: move dump check to macro for lima_dump_command_stream_print
This can prevent the execution of some function like lima_ctx_buff_va
which is passed in as parameter when no dump case.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00
Qiang Yu 5502bc83b0 lima: enable multi submit optimization
Also provide a debug option to disable it.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00
Qiang Yu 131c505690 lima: optinal flush submit in lima_clear
flush current submit only when there is any draw pending instead of
flush all submits.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00
Qiang Yu d6ad8e590f lima: use per submit dump file
After multi lima_submit, commands for one lima_submit may not be
flushed when change framebuffer. But we want to track command
stream for one submit, so save dump file for each submit.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00
Qiang Yu d0dde3de25 lima: move framebuffer info to lima_submit
draw code path does not use framebuffer info, only flush
code path use it now.

Use zsbuf/cbuf in submit instead of context.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00
Qiang Yu ed117ee630 lima: move clear into submit (v2)
clear info is needed when submit flush and may be changed after
framebuffer switch, so we need to move it into submit.

This also fixes 5 dEQP tests as a side effect: clear info is per
submit so clear value when one submit won't affect next submit.

v2:
remove fixed dEQP test from CI list.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00
Qiang Yu 4b93792274 lima: move damage_rect into lima_submit
damage_rect is preserved across draws.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00
Qiang Yu a4b048c046 lima: move pp_max_stack_size to lima_submit
pp_max_stack_size is preserved across draws.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00
Qiang Yu 6a5b1c62db lima: move resolve into lima_submit
resolve is preserved across draws.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
2020-02-17 02:54:15 +00:00