Marek Olšák [Fri, 1 Oct 2021 19:44:30 +0000 (15:44 -0400)]
gallium/pb_cache: use simple_mtx_t
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152>
Marek Olšák [Fri, 1 Oct 2021 19:40:48 +0000 (15:40 -0400)]
util/queue: use simple_mtx_t for finish_lock
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152>
Marek Olšák [Fri, 1 Oct 2021 19:40:40 +0000 (15:40 -0400)]
util/slab: use simple_mtx_t
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152>
Marek Olšák [Tue, 5 Oct 2021 22:06:08 +0000 (18:06 -0400)]
mesa: add missing unlock_texture into generate_texture_mipmap
Fixes:
5a39938b0004de36ac55 "mesa: Throw an error for compressed glGenerateMipmap on GLES2 contexts."
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152>
Enrico Galli [Fri, 1 Oct 2021 22:16:22 +0000 (15:16 -0700)]
nir_to_dxil: Add tagging raw SRVs in shader flags
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13157>
Dave Airlie [Tue, 5 Oct 2021 01:33:49 +0000 (11:33 +1000)]
gallivm/format: clamp SINT conversion rather than truncate.
KHR-GL32.packed_pixels.pbo_rectangle.r16i on zink on lavapipe
ends up using a pbo that does an SINT image write. This was producing
truncated rather than clamped values.
Fix the calculations for 8/16-bit signed ints to clamp not truncate.
Fixes:
13e5f331db77 ("gallivm/nir: fix image store conversions")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13187>
Emma Anholt [Tue, 5 Oct 2021 19:33:15 +0000 (12:33 -0700)]
i915g: Check for the scanout-layout conditions before setting level info.
Fixes leaks (release) or assertion failures (debug) on allocating small
scanout resources, when falling through to the non-scanout-specific layout
code, which became more common as of
ad50b47a14e9 ("gbm: assume
USE_SCANOUT in create_with_modifiers").
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13202>
Alyssa Rosenzweig [Mon, 27 Sep 2021 23:47:22 +0000 (19:47 -0400)]
panfrost: Fix PAN_MESA_DEBUG=sync with INTEL_blackhole_render
We need to ignore the "sync" in this case, or we'll crash with
"incomplete job" since we never submitted the work. Fixes the Piglit
intel_blackhole-draw_gles2 when run in CI.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070>
Alyssa Rosenzweig [Mon, 27 Sep 2021 21:32:57 +0000 (17:32 -0400)]
panfrost: Don't set CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER
We already set HALF_INTEGER, which is what the compiler actually does.
If we also set PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER, we get
incorrect lowering. Only set the CAP we respect.
On Bifrost, this convention is arbitrary. We should consider moving the
Bifrost lowering into NIR to optimize this better...
Fixes Piglit glsl-arb-fragment-coord-conventions.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070>
Alyssa Rosenzweig [Mon, 27 Sep 2021 20:53:30 +0000 (16:53 -0400)]
panfrost: Introduce PAN_MAX_VARYINGS define
The number of varying records we need to reserve in the worst case is
greater than the number of source-level varyings we advertise
(gl_Position, gl_PointSize...)
We advertise MAX_VARYINGS source level varyings, which means anywhere we
manipulate varyings we need up to (MAX_VARYINGS + max non-source level
varyings) records. Add a PAN_MAX_VARYINGS define for this and use it
throughout.
Fixes a buffer overflow in Piglit glsl-max-varyings, which now passes
instead of crashes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070>
Alyssa Rosenzweig [Mon, 27 Sep 2021 20:51:32 +0000 (16:51 -0400)]
panfrost: Fix off-by-one in varying count assert
We want to assert that the number of varyings (the count) is at most the
the maximum count. This is <=, not <, with the assertion previously
failing for exactly the maximum.
Fixes:
2c2cf0ecfe6 ("panfrost: Streamline varying linking code")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070>
Alyssa Rosenzweig [Mon, 27 Sep 2021 20:48:33 +0000 (16:48 -0400)]
panfrost: Move special_varying to compiler definitions
The number of special varyings on midgard can influence how much space
we need to allocate for varyings in the compiler ABI. Move the enum so
we can get access it.
No functional change. This is cc stable purely so the following patches
can be backported.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070>
Pavel Asyutchenko [Thu, 2 Sep 2021 18:11:04 +0000 (21:11 +0300)]
llvmpipe: fix crash when doing FB fetch + gl_FragDepth write in one shader
Reproducible by piglit test from this MR:
https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/576
Signed-off-by: Pavel Asyutchenko <sventeam@yandex.ru>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12705>
Emma Anholt [Mon, 27 Sep 2021 20:05:13 +0000 (13:05 -0700)]
turnip: Replace our format table with fd6_format_table.
Now we have a common format table with just a little bit of overriding in
turnip, which I hope we can decrease over time.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Mon, 27 Sep 2021 18:33:07 +0000 (11:33 -0700)]
turnip: Do format lookups from the fd6 format table and cross-check.
Intermediate step to make sure things stay the same as I transition us to
sharing the format table.
The YUV special casing is pretty not the prettiest, but I'm hoping to
continue working on planar RGB formats as pipe formats separately.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Mon, 27 Sep 2021 18:56:32 +0000 (11:56 -0700)]
turnip: Switch tu_format internals to using pipe_format more.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Mon, 27 Sep 2021 18:04:22 +0000 (11:04 -0700)]
turnip: Give D32_SFLOAT_S8_UINT a native format.
We won't actually use the native format here, as when sampling our image
we we just see the format for either the D or S aspect. This syncs us up
with freedreno's table, though.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 1 Oct 2021 23:31:50 +0000 (16:31 -0700)]
freedreno/a6xx: Enable UBWC for RGBA5551 (and 1555) textures.
Turnip has it enabled, and it seems to be happy in the CTS.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 1 Oct 2021 22:43:49 +0000 (15:43 -0700)]
freedreno/a6xx: Add support for A/XRGB1555 formats.
This switches the format we use by default for GLES's rgb5_a1, and means
that our formats supported more closely matches turnip.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 1 Oct 2021 23:46:54 +0000 (16:46 -0700)]
freedreno/a6xx: Rewrite the format table format/swap helpers.
We need to take a tiling mode to in order to support 1555 like turnip
does, and I like this naming better.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 1 Oct 2021 23:45:10 +0000 (16:45 -0700)]
freedreno/a6xx: Make the format table const.
This data never changes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 1 Oct 2021 23:41:39 +0000 (16:41 -0700)]
freedreno/a6xx: Use fd6_pipe2tex() for the 2D src format.
The differences between the two are:
- tex supports more formats (fine, we've already decided on which formats
we can blit)
- FMT6_10_10_10_2_UNORM instead of FMT6_10_10_10_2_UNORM_DEST.
- FMT6_A8_UNORM for PIPE_FORMAT_A8_UNORM.
For 1555 support we get another difference between tex and color, and we
need 2/3 of the tex differences for blit srcs, so switch it over. This
also matches what turnip does (except it doesn't have A8 as a format).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 1 Oct 2021 21:19:28 +0000 (14:19 -0700)]
freedreno/a6xx: Put R8_G8_B8_420_UNORM in the format table.
turnip will use this format, even if we don't have the freedreno side
rigged up yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 1 Oct 2021 21:14:00 +0000 (14:14 -0700)]
util/format: Add an RGB planar format for YV12, like we have for NV12.
Turnip will use this for mapping the to the corresponding hardware format,
and we could also extend mesa/st to avoid adding extra samplers for
external image sampling of YV12 on freedreno.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Thu, 30 Sep 2021 18:03:49 +0000 (11:03 -0700)]
freedreno/a6xx+: Add support for the R8G8_R8B8 and G8R8_B8R8 formats.
This means that EGLimage imports of YUYV and UYVY can use a single sampler
instead of having to create RGBA8 and RG8 samplers mapping the same
texture. The swizzles are the same as turnip uses, and it makes the
piglit tests for these formats happy.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 24 Sep 2021 22:20:58 +0000 (15:20 -0700)]
freedreno/a6xx: Add some more 16-bit rgb/rgba swaps to our format tables.
BGR565 is chosen for GL_RGB565 and BGRA4 for GL_RGBA4, so it doesn't
change GLES's behavior.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 24 Sep 2021 22:32:23 +0000 (15:32 -0700)]
freedreno/a6xx: Drop texturing support from other scaled formats.
GLES doesn't expose these texture formats, and we don't want to start
exposing them when turnip starts using our tables.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 24 Sep 2021 22:05:57 +0000 (15:05 -0700)]
freedreno/a6xx: Add support for EXT_texture_sRGB_R8/RG8.
Noticed to be missing when comparing format tables between turnip and
freedreno. Passes dEQP-GLES31 fine.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 24 Sep 2021 21:21:07 +0000 (14:21 -0700)]
freedreno/a6xx: disable vertex fetch support flag for b8g8r8a8_srgb.
We don't have an srgb decode flag on vertex fetch, r8g8b8a8_srgb isn't
supported either, and GL doesn't ask for vertex fetch for this anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 24 Sep 2021 21:18:18 +0000 (14:18 -0700)]
freedreno/a6xx: Add int/scaled/snorm vertex formats to match turnip.
Noticed because the vertex formats didn't match up between the two. GL
doesn't actually look for these vertex formats, though.
Having these marked as supporting texture or color could theoretically
change things I think.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Emma Anholt [Fri, 24 Sep 2021 20:57:34 +0000 (13:57 -0700)]
freedreno/a6xx: Move the format table to common code.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
Filip Gawin [Sat, 2 Oct 2021 16:28:17 +0000 (18:28 +0200)]
r300: fix UB caused by 1 << 31 and 2 << 30
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13158>
Chia-I Wu [Tue, 5 Oct 2021 01:01:06 +0000 (18:01 -0700)]
vulkan/wsi/wayland: fix an invalid u_vector_init call
u_vector_init requires size to be power-of-two.
Fixes:
151b65b2119 ("vulkan/wsi/wayland: generalize modifier handling")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13186>
Danylo Piliaiev [Tue, 5 Oct 2021 11:49:40 +0000 (14:49 +0300)]
turnip: clamp per-tile scissors to max viewport size in binning pass
Tiles on the edge may cross maximum viewport size, we have to clamp
per-tile scissor to maximum allowed viewport dimensions.
Add MAX_VIEWPORT_SIZE constant along the way.
Fixes vkd3d test "test_draw_uav_only"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13197>
Jason Ekstrand [Mon, 27 Sep 2021 22:40:22 +0000 (17:40 -0500)]
radv: Use VK_DEFINE_*HANDLE_CASTS instead of rolling our own
The core ones have some nifty stuff like asserts that it's a valid
vk_object_base and has the right type. We don't have real type safety
with Vulkan handles but this is as close as we can get. The core ones
also track when we've started handing out handles for logging purposes
which we want.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13100>
Tapani Pälli [Tue, 5 Oct 2021 10:16:51 +0000 (13:16 +0300)]
intel/blorp: fix a compile warning about uninitialized use
warning: ‘bind_offset’ may be used uninitialized in this function
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13190>
Lionel Landwerlin [Mon, 4 Oct 2021 18:24:00 +0000 (21:24 +0300)]
nir/lower_io: preserve all metadata when no progress
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13168>
Samuel Pitoiset [Tue, 5 Oct 2021 10:20:29 +0000 (12:20 +0200)]
radv/llvm: fix exporting VS parameters
My mistake.
Fixes:
2aa705ec87c ("radv: determine the VS output parameters in the shader info 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/13191>
Lionel Landwerlin [Mon, 4 Oct 2021 10:20:46 +0000 (13:20 +0300)]
anv: remove redundant VertexURBEntryReadLength setting
We're setting the same field a dozen lines below to the exact same
value.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13169>
Marcin Ślusarz [Tue, 10 Aug 2021 10:46:55 +0000 (12:46 +0200)]
nir: preserve all metadata when nir_opt_vectorize doesn't make progress
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/13189>
Marcin Ślusarz [Tue, 10 Aug 2021 10:43:05 +0000 (12:43 +0200)]
nir: preserve all metadata when nir_propagate_invariant doesn't make progress
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/13189>
Marcin Ślusarz [Mon, 9 Aug 2021 15:00:01 +0000 (17:00 +0200)]
nir: preserve all metadata when nir_lower_int_to_float doesn't make progress
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 13:27:52 +0000 (15:27 +0200)]
glsl: preserve all metadata when lower_buffer_interface_derefs doesn't make progress
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 12:50:00 +0000 (14:50 +0200)]
anv: preserve all metadata when anv_nir_lower_multiview doesn't make progress
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 12:46:21 +0000 (14:46 +0200)]
anv: use nir_shader_instructions_pass in anv_nir_lower_ycbcr_textures
No functional changes.
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 12:42:35 +0000 (14:42 +0200)]
anv: use nir_shader_instructions_pass in anv_nir_add_base_work_group_id
No functional changes.
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 12:38:31 +0000 (14:38 +0200)]
intel/compiler: use nir_metadata_none instead of its value
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 12:33:14 +0000 (14:33 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_opt_peephole_ffma
No functional changes.
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 12:27:58 +0000 (14:27 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_storage_image
No functional changes.
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 12:16:24 +0000 (14:16 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_scoped_barriers
No functional changes.
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 12:12:11 +0000 (14:12 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_mem_access_bit_sizes
No functional changes.
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 11:58:06 +0000 (13:58 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_lower_conversions
No functional changes.
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 11:20:53 +0000 (13:20 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_clamp_image_1d_2d_array_sizes
No functional changes.
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/13189>
Marcin Ślusarz [Fri, 6 Aug 2021 10:56:31 +0000 (12:56 +0200)]
intel/compiler: use nir_shader_instructions_pass in brw_nir_demote_sample_qualifiers
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
- pass returns true ONLY when it makes progress ("progress" was initialized incorrectly)
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/13189>
Samuel Pitoiset [Mon, 4 Oct 2021 11:40:44 +0000 (13:40 +0200)]
radv: fix vk_object_base_init/finish for internal device memory objects
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/13172>
Samuel Pitoiset [Mon, 4 Oct 2021 11:22:59 +0000 (13:22 +0200)]
radv: fix writing combined image/sampler descriptor
This will crash with the common Vulkan handles if sampler is NULL.
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/13172>
Samuel Pitoiset [Mon, 4 Oct 2021 11:10:07 +0000 (13:10 +0200)]
radv: fix vk_object_base_init/finish for push descriptors
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/13172>
Lionel Landwerlin [Sun, 3 Oct 2021 12:58:36 +0000 (15:58 +0300)]
intel/compiler: add missing line returns to logs
In the upcoming intel_clc tool, we're allowing to print these messages
out and some of them just don't look right.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13165>
Lionel Landwerlin [Wed, 29 Sep 2021 07:22:14 +0000 (10:22 +0300)]
anv: enable UBO indexing
We added support but didn't expose it through the API.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
b704d03efd4767 ("anv: Do UBO loads with global addresses for bindless")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5426
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13097>
Dave Airlie [Tue, 5 Oct 2021 02:11:26 +0000 (12:11 +1000)]
crocus/query: don't loop on ready status after gpu hang.
When a GPU hang occurs, the syncobj will eventually timeout,
if this is a wait, just set ready, so things will continue.
This matches 965 behaviour better.
Fixes:
c282a082bef0 ("crocus/query: poll the syncobj in the no wait situation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13188>
Dave Airlie [Tue, 14 Sep 2021 21:08:53 +0000 (07:08 +1000)]
crocus/gen6: don't reemit the svbi when debugging
This messes up the counts, stops some tests failing when reemit
is enabled
Fixes:
f3630548f1da ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13188>
Emma Anholt [Mon, 4 Oct 2021 21:54:08 +0000 (14:54 -0700)]
freedreno/tools: Fix build failure when cffdump isn't built but tests are.
Can't test the tool if we don't build it. Move the other test definition
next to the tool, too.
Fixes:
82b5c9526592 ("freedreno: Move crashdec/cffdec tests to be meson unit tests.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13183>
Jason Ekstrand [Fri, 1 Oct 2021 17:32:36 +0000 (12:32 -0500)]
vulkan/physical_device_features: Stop generating a header
It only has one entrypoint and nothing in it is based on code-gen. We
can put that one entrypoint in vk_physical_device.h instead.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13150>
Jason Ekstrand [Fri, 1 Oct 2021 17:19:12 +0000 (12:19 -0500)]
vulkan/physical_device_features: Drop some unnecessary dependencies
None of these are actually used. We parse the XML bare and don't need
any extension or entrypoint information.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13150>
Emma Anholt [Mon, 4 Oct 2021 20:15:21 +0000 (13:15 -0700)]
ci/freedreno: Restart the run if cheza spontenously reboots.
Occasionally (once every couple weeks?) a cheza reboots mid run, around a
GPU fault. Detect that and do an internal retry instead of failing out
the job.
Closes: #5388
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13181>
Emma Anholt [Mon, 4 Oct 2021 20:11:35 +0000 (13:11 -0700)]
panfrost: Disable flaky piglit job for now.
It's been getting intermittent failures on marge since being enabled, turn
it back off until it can get stabilized.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13180>
Samuel Pitoiset [Thu, 30 Sep 2021 11:39:24 +0000 (13:39 +0200)]
ci: enable building RADV in debian-release
To build RADV without LLVM.
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/13117>
Rob Clark [Sat, 2 Oct 2021 18:16:18 +0000 (11:16 -0700)]
Revert "freedreno: Move the batch cache to the context."
This reverts commit
b2349a46715e870d7f38ce5f3854bef9718a835c.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5441
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159>
Rob Clark [Sat, 2 Oct 2021 18:16:17 +0000 (11:16 -0700)]
Revert "freedreno: Remove the submit lock locking."
This reverts commit
22486ffa5172dd0425479ce64785b0f29bf59cdf.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159>
Rob Clark [Sat, 2 Oct 2021 18:16:16 +0000 (11:16 -0700)]
Revert "freedreno: Use a BO bitset for faster checks for resource referenced."
This reverts commit
3ade94df862ccc9562fd82ff8baa14b62b8be031.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159>
Rob Clark [Sat, 2 Oct 2021 18:16:15 +0000 (11:16 -0700)]
Revert "freedreno: Remove dead fd_batch_reset()."
This reverts commit
63cc1fe71f151b69928d59624795fd70f98c02f9.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159>
Rob Clark [Sat, 2 Oct 2021 18:16:13 +0000 (11:16 -0700)]
Revert "freedreno: Fix autotune regression since batch-cache rework."
This reverts commit
b8c4ad378d22988cbb20743dc74d377b5d6ac7ed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13159>
Rob Clark [Mon, 4 Oct 2021 18:25:44 +0000 (11:25 -0700)]
zink: Disable TC syncs for get_device_reset_status()
zmike said it should work.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13163>
Rob Clark [Mon, 4 Oct 2021 18:16:36 +0000 (11:16 -0700)]
freedreno: Disable TC syncs for get_device_reset_status()
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13163>
Rob Clark [Sun, 3 Oct 2021 16:12:25 +0000 (09:12 -0700)]
gallium/u_threaded: Get reset status without sync
GPU hangs are asynchronous already, there should not be an expectation
that this is synchronized with driver thread.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13163>
Caio Marcelo de Oliveira Filho [Thu, 8 Jul 2021 21:47:08 +0000 (14:47 -0700)]
anv: Identify code paths specific to graphics primitive pipeline
In preparation for adding support for the graphics mesh pipeline,
identify all the paths that are specific the primitive pipeline.
This shouldn't change any behavior since the code currently only
supports the primitive pipeline.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>
Caio Marcelo de Oliveira Filho [Thu, 8 Jul 2021 21:44:17 +0000 (14:44 -0700)]
anv: Move together primitive pipeline emit calls
Just moving code and the packet order, no functional change expected.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>
Marcin Ślusarz [Tue, 31 Aug 2021 12:49:57 +0000 (14:49 +0200)]
anv: Use input assembly state only when pipeline has vertex stage
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>
Marcin Ślusarz [Tue, 31 Aug 2021 12:43:08 +0000 (14:43 +0200)]
anv: Set graphics pipeline active_stages earlier
So that we can use the active_stages in copy_non_dynamic_state() later.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>
Caio Marcelo de Oliveira Filho [Wed, 19 May 2021 18:26:21 +0000 (11:26 -0700)]
anv: Validate vertex related states only when VS is present
Mesh pipeline doesn't use those states, so we can't assert them
unconditionally for a graphics pipeline.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13047>
Jesse Natalie [Mon, 4 Oct 2021 16:32:02 +0000 (09:32 -0700)]
compiler/clc: Preserve OCL kernel arg type metadata on LLVM13
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13177>
Jesse Natalie [Mon, 4 Oct 2021 16:29:22 +0000 (09:29 -0700)]
compiler/clc: Null extensions should mean all supported, not all
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13177>
Marcin Ślusarz [Tue, 10 Aug 2021 12:44:22 +0000 (14:44 +0200)]
lima: use nir_shader_instructions_pass in lima_nir_split_load_input
Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
make progress
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13176>
Adam Jackson [Wed, 29 Sep 2021 15:44:42 +0000 (11:44 -0400)]
wsi/x11: Fix a misunderstanding about how xcb_get_geometry works
The code here is well-intentioned, but the only way a GetGeometry
request can fail is if you name an invalid drawable. And if we did that,
either our internal state got corrupted, or - more likely - the user
destroyed the window. In either case there's nothing more we can do with
the surface, so report that it's been lost.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13104>
Rob Clark [Sun, 8 Aug 2021 19:23:43 +0000 (12:23 -0700)]
freedreno: Handle PIPE_FORMAT_NONE buffers
Clover creates buffers with format=NONE.. which is not technically
incorrect. Just treat this as r8_unorm so we know width0 is the size
in bytes.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>
Rob Clark [Tue, 24 Aug 2021 00:18:57 +0000 (17:18 -0700)]
freedreno: Handle cso==NULL in bind_sampler_states
This is a thing that comes up with clover.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>
Rob Clark [Sun, 22 Aug 2021 15:31:51 +0000 (08:31 -0700)]
freedreno/ir3: Remove used unused
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>
Rob Clark [Mon, 23 Aug 2021 15:58:27 +0000 (08:58 -0700)]
freedreno: Fix some indentation
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>
Rob Clark [Thu, 30 Sep 2021 15:39:53 +0000 (08:39 -0700)]
freedreno: Optimize no-op submits
In some cases we need to emit a no-op batch/submit, just to get a fence.
No need to emit all the boilerplate state-resture and flushing in this
case.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>
Rob Clark [Sat, 2 Oct 2021 18:55:10 +0000 (11:55 -0700)]
freedreno: Get shader variant msgs in perf debug output
We want FD_MESA_DEBUG=perf to also tell us about variants.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13160>
Icecream95 [Fri, 23 Jul 2021 00:14:32 +0000 (12:14 +1200)]
pan/mdg: Use the correct swizzle for condition moves
Fixes:
70072a20e00 ("pan/midgard: Refactor swizzles")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13173>
Boris Brezillon [Thu, 30 Sep 2021 10:54:40 +0000 (12:54 +0200)]
panvk: Support clearing ZS attachments
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13137>
Boris Brezillon [Thu, 30 Sep 2021 10:53:11 +0000 (12:53 +0200)]
panvk: Allow clear_attachment of RTs > 0
It's just a matter of skipping unused BLEND descriptors and emitting
the one we want to clear.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13137>
Boris Brezillon [Thu, 30 Sep 2021 09:36:50 +0000 (11:36 +0200)]
panvk: Pass the render target index to panvk_meta_clear_attachment()
The attachment index and render target don't necessarily match. We need
to explicitly pass the render target index to
panvk_meta_clear_attachment() so it can select the correct shader and
emit a valid RSD.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>
Boris Brezillon [Thu, 30 Sep 2021 08:45:56 +0000 (10:45 +0200)]
panvk: Fix wls_size retrieval
Fix a typo in wls_size assignment leading to a wrong wls_size.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>
Boris Brezillon [Thu, 30 Sep 2021 08:52:07 +0000 (10:52 +0200)]
panvk: Don't use panfrost_get_default_swizzle() on v7+
This helper produces invalid component order values on v7. Use the
MALI_RGB_COMPONENT_ORDER_xxx definitions instead.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>
Boris Brezillon [Fri, 1 Oct 2021 07:11:42 +0000 (09:11 +0200)]
panvk: Fix allocation of BOs bigger than the slab size
We can pick a BO from the pool if the BO size exceeds the pool size. In
that case, allocate a BO and save it in a separate array so we can free
it when the memory pool is reset or released.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13136>
Joshua Ashton [Wed, 22 Sep 2021 09:55:15 +0000 (10:55 +0100)]
radv: Add force_emulate_rt perftest option
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>
Joshua Ashton [Tue, 21 Sep 2021 12:59:43 +0000 (13:59 +0100)]
radv: Enable raytracing extensions on older generations
We have shader-based bvh traversal for this on older generations now.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>
Joshua Ashton [Tue, 21 Sep 2021 14:29:59 +0000 (15:29 +0100)]
radv: Implement software emulation for intersect_ray
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12974>