Commit Graph

153060 Commits

Author SHA1 Message Date
Dylan Baker 65fbedd8c4
VERSION: update to 22.1.6 2022-08-10 11:48:52 -07:00
Dylan Baker 898d3ec35d docs: add release notes for 22.1.6 2022-08-10 11:48:52 -07:00
Eric Engestrom c69f1dba5c Revert "pan/bi: Require ATEST coverage mask input in R60"
This reverts commit 7ead256891.

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/7025 for the
details, but the short version is that this was causing a segfault.
2022-08-10 17:26:40 +01:00
Dave Airlie 39c9a3c7fa llvmpipe: keep context list and use to track resource usage.
Just check across all contexts if a resource is referenced.

Fixes: 6bbbe15a78 ("Reinstate: llvmpipe: allow vertex processing and fragment processing in parallel")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17899>
2022-08-05 19:11:23 +00:00
Dave Airlie a59e00173e llvmpipe: make last_fence a screen/rast object not a context one.
When a flush happens the per-context setup is used to hold the fence
for the last scene sent to the rasterizer. However when multiple
contexts are in use, this fence won't get returned to be blocked on.

Instead move the last fence to the rasterizer object, and return
that instead as it should be valid across contexts.

Fixes gtk4 bugs on llvmpipe since overlapping vertex/fragment.

Fixes: 6bbbe15a78 ("Reinstate: llvmpipe: allow vertex processing and fragment processing in parallel")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17899>
2022-08-05 19:11:23 +00:00
Mark Janes bd1c04e187 intel/dev: drop warning for unhandled hwconfig keys
The hwconfig api may change unexpectedly prior to public release of
new platforms.  Also, public documentation of the hwconfig api
sometimes lags the release.

For these reasons, warnings about unhandled hwconfig keys are noisy,
likely to occur, and unhelpful to most users.  This commit drops those
warnings, in favor of a separate internal process for tracking
hwconfig api changes.

Suggested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by:  Jordan Justen <jordan.l.justen@intel.com>
(cherry picked from commit 6401d768b9)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17862>
2022-08-05 18:59:37 +00:00
Mykhailo Skorokhodov cbc81bdbf5 anv: Use sampleLocationsEnable for sample locations
The spec says: "sampleLocationsEnable controls whether custom sample
locations are used. If sampleLocationsEnable is VK_FALSE, the default
sample locations are used and the values specified in
sampleLocationsInfo are ignored."

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6675
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 50b21fb6e4)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17160>
2022-08-05 18:46:29 +00:00
Dylan Baker b7df7f8145 docs: Add sha256 sum for 22.1.4 2022-08-04 10:28:49 -07:00
Dylan Baker fa4b29bcac docs: Add sha256 sum for 22.1.5 2022-08-03 14:44:59 -07:00
Dylan Baker f94151ee80
VERSION: update to 22.1.5 2022-08-03 14:13:26 -07:00
Dylan Baker faf316b969 docs: add release notes for 22.1.5 2022-08-03 14:13:26 -07:00
Erik Faye-Lund 8ddf455f13 zink: fix EXT_color_write_enable check
Checking for the extension isn't enough, we also need to check for the
feature-bit.

Fixes: 49a20e0981 ("zink: start a unified driver workarounds struct")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17709>
(cherry picked from commit 747913377f)
2022-07-28 13:41:44 -07:00
Dave Airlie 7ee792cb9b crocus: fix leak in query code.
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17731>
(cherry picked from commit 878784dbec)
2022-07-28 13:41:43 -07:00
Mike Blumenkrantz 256c0b91f2 zink: avoid crashing when bindless texture updates aren't used
some apps trigger the texture update path far in advance of when the
texture will be used, so don't crash and wait to do the update

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17665>
(cherry picked from commit a2f97bd88a)
2022-07-28 13:41:42 -07:00
Mike Blumenkrantz 0df74bb3ec zink: only flag fbfetch as rp update if fbfetch wasn't already configured
otherwise this is probably just a swapchain acquire which needs to update
the descriptor during begin_renderpass

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17665>
(cherry picked from commit c24c5972a8)
2022-07-28 13:41:42 -07:00
Pierre-Eric Pelloux-Prayer 46beee7493 radeonsi: check last_dirty_buf_counter and dirty_tex_counter
Check both counters in draw and compute, otherwise compute dispatches may
miss buffers invalidation.
This fixes the test case from https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/702
(both with and without GALLIUM_THREAD=0).

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17394>
(cherry picked from commit af7c2ff842)
2022-07-28 13:41:41 -07:00
Icecream95 2560692681 panfrost: Don't unbind recently bound streamout targets
When unbinding extra targets, start after the last new target.

Fixes: 5ff7973560 ("panfrost: Import streamout data structures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
(cherry picked from commit a0851f1cc4)
2022-07-28 13:41:40 -07:00
Icecream95 235dd6c04f panfrost: Only emit images when they are present
nr_images is the trigger for allocating double the number of buffers
for attributes. When there are no images, there is not always enough
space for ALIGN_POT(k, 2) to not move k out of bounds, so don't
execute the line in that case.

Fixes: dc85f65e05 ("panfrost: emit shader image attribute descriptors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
(cherry picked from commit fe613a8de9)
2022-07-28 11:28:48 -07:00
Nanley Chery 76ddaeb32a iris: Don't leak compressed resources in iris_create_surface
Before this patch, we were leaking compressed resources in iris_create_surface.
Specifically, when we failed to create an uncompressed ISL surface and view for
a compressed resource, we didn't unreference the resource pointer we referenced
into the pipe_surface.

Fix this by delaying the pipe_surface initialization code to after attempting
to create the uncompressed surface and view.

Cc: 22.1 <mesa-stable>
Reviewed-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/17598>
(cherry picked from commit 6c65e990b6)
2022-07-28 10:15:28 -07:00
Nanley Chery c276051682 iris: Don't leak surface states for compressed resources
Before this patch, we were leaking surface states in iris_create_surface.
Specifically, when we failed to create an uncompressed ISL surface and view for
a compressed resource, we didn't free surface states we allocated for it.

Fix this by attempting to create the uncompressed surface and view before we
allocate the surface states.

Cc: 22.1 <mesa-stable>
Reviewed-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/17598>
(cherry picked from commit bca601ffe9)
2022-07-28 10:15:28 -07:00
Daniel Schürmann f8a04c8b6c radv/rt: fix nir_builder cursor in lower_rt_instructions()
Fixes: 207ce6d658 ('radv: Add helper to inline shaders into the main shader.')
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>
(cherry picked from commit f7c318901d)
2022-07-28 10:15:27 -07:00
Timur Kristóf b4ce0d7113 ac/llvm: Add LLVM bug workaround to ac_build_mbcnt_add.
LLVM always believes that this instruction's upper bound is the wave
size, regardless of ac_set_range_metadata and regardless of whether
the add source is used.

As a workaround, emit an extra add instruction.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>
(cherry picked from commit 1e2663b62c)
2022-07-28 10:15:24 -07:00
Dave Airlie 624c6f9468 llvmpipe: fix aniso cube map arrays.
There was a coordinate missing when you have cube map arrays,
and aniso sampling.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fixes: ce2b711c0a ("gallivm: add support for anisotropic sampling.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17704>
(cherry picked from commit 21dd305694)
2022-07-28 10:15:24 -07:00
Jason Ekstrand 5a9ef84f10 vulkan/nir: Don't remove dead XFB outputs
Fixes: 21b405fbbc ("vulkan: Add a vk_shader_module_to_nir() helper")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17644>
(cherry picked from commit bd93d6f693)
2022-07-28 10:15:23 -07:00
Mike Blumenkrantz b946850b19 zink: invoke descriptor_program_deinit for programs on context destroy
this should make multi-context shutdown more stable

affects:
glx@glx-visuals-depth -pixmap
glx@glx-visuals-stencil

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17658>
(cherry picked from commit 4123ee3c71)
2022-07-28 10:15:22 -07:00
Mike Blumenkrantz dc5fcc2da0 zink: fix viewport count tracking
the number of viewports in use is based on the outputs of the last vertex
stage, not the viewports passed by the state tracker

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639>
(cherry picked from commit 268011e8c6)
2022-07-28 09:39:23 -07:00
Mike Blumenkrantz 9ef9b9321c zink: call bind_last_vertex_stage() when binding vs
ensure all the necessary updates are flagged

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639>
(cherry picked from commit eaf11d3cd9)
2022-07-28 09:39:22 -07:00
Mike Blumenkrantz 54a8bb32b7 zink: handle null samplerview in get_imageview_for_binding()
this is legal

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639>
(cherry picked from commit 19eddeb226)
2022-07-28 09:39:12 -07:00
Mike Blumenkrantz 955729649a zink: handle max_vertices=0 in geometry shader
this is a weird corner case where glsl permits a zero value, so clamp to 1
and then don't emit any vertices to avoid driver hangs

affects:
dEQP-GL45-ES31.functional.geometry_shading.emit.points_emit_0_end_0

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639>
(cherry picked from commit 5b58f8df53)
2022-07-28 09:39:11 -07:00
Dave Airlie e5ce737b89 lavapipe: state latest conformance tests passed
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Cc: mesa-stable "22.1"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17643>
(cherry picked from commit bfebf51571)

Conflicts:
	src/gallium/frontends/lavapipe/lvp_device.c
2022-07-28 09:39:09 -07:00
Dave Airlie f0a8da0819 crocus: fail query begin if upload allocation fails.
This is the only place I think I can see this crashing.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17615>
(cherry picked from commit e14022c052)
2022-07-28 09:36:38 -07:00
SoroushIMG fa900881f6 Zink: Fix clear being missed when using emulated draws in zink_blit
zink_kopper_acquire_readback will flush any outstanding clears, this means that
the current clears need to be applied first before calling zink_kopper_acquire_readback.
This was already done for native_blit and native_resolve, also do this for the emulated draw path.
Seen as intermittent failures in cts case GTF-GL33.gtf21.GL2FixedTests.buffer_clear.buffer_clear.

Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17631>
(cherry picked from commit 2159a377c0)
2022-07-28 09:36:36 -07:00
SoroushIMG bb9054a85a zink: Fix spirv stream 0 vertex emit for multistream shaders
Spirv spec does not allow the use of OpEmitVertex or OpEndPrimitive when there are multiple streams.
Instead emit the multi-stream version of these with stream set to 0.
This issue was seen when testing cts case KHR-GL46.transform_feedback.draw_xfb_stream_test

Fixes: 35e346f428 ("zink: handle vertex streams")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17513>
(cherry picked from commit 3dfd8e4d7d)
2022-07-28 09:36:35 -07:00
Rhys Perry ca887b3175 radv: fix vbo_bound_mask indexing
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6812
Fixes: 1b8bdecf6e ("radv: add a mask of bound descriptor buffers for dynamic vertex input")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17521>
(cherry picked from commit 1d019d2ab7)

Conflicts:
	src/amd/vulkan/radv_cmd_buffer.c
2022-07-28 09:36:28 -07:00
Daniel Schürmann 5b86d21334 aco: fix assertion in insert_exec_mask
The exec mask might also be of type mask_type_loop.

Fixes: d068eb53e8 ('aco/insert_exec_mask: optimize top-level transition to exact before demote')
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17402>
(cherry picked from commit ac39e7bf23)
2022-07-27 15:59:35 -07:00
Iago Toral Quiroga 5e481bb5b8 v3dv: stop tracking push constant buffer references
Since we allocate this ourselves we can immediately add it to the
job at the time we allocate it.

This also fixes a bug we introduced when we implemented inline
uniforms because since that commit, if we had an inline uniform
buffer at index 1 which happend to have indirect access we would
track it in slot 0 instead of slot 1, potentially overwriting
the push constant buffer reference.

Fixes: ea3223e7a4 ('v3dv: implement VK_EXT_inline_uniform_block')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17536>
(cherry picked from commit e451c612df)
2022-07-27 15:59:34 -07:00
Lionel Landwerlin d42978b1ea anv: fix primitive topology dynamic state emission on gfx7
This dynamic state uses the pipeline information so it needs to be
reemitted whenever the pipeline changes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17601>
(cherry picked from commit a9abf1dd93)
2022-07-27 15:59:33 -07:00
Lionel Landwerlin 1be1029edf intel/fs: Set NonPerspectiveBarycentricEnable when the interpolator needs it.
[anholt: changed to make all drivers do the right thing by moving the
payload barycentric check into the compiler]

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17381>
(cherry picked from commit 2d1f021e16)
2022-07-27 15:59:32 -07:00
Dave Airlie 9ab162bf59 kms/dri: add mutex lock around map/unmap
this can get called from multiple threads with the recent llvmpipe
overlapping rendering changes, so make sure to lock around the
map/unmapping so they can't race.

This should fixes some crashes seen with kwin.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tested-by: Adam Williamson (Fedora)
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17531>
(cherry picked from commit 50e3303b3d)
2022-07-27 15:59:31 -07:00
Qiang Yu 1b4e99e929 ac/nir/ngg: add a barrier before prim id export
When culling enabled, it will use LDS space, which overlap with
the prim id export.

Fixes: e97f0463a8 ("ac/nir: Implement NGG deferred attribute culling in NIR.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17593>
(cherry picked from commit eeaf0b1888)

 Conflicts:
	src/amd/common/ac_nir_lower_ngg.c
2022-07-27 15:59:30 -07:00
Qiang Yu a9c354cd14 ac/nir/ngg: fix nogs culling scratch size
Should be in bytes not dwords.

Fixes: e97f0463a8 ("ac/nir: Implement NGG deferred attribute culling in NIR.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17593>
(cherry picked from commit 0b7ef846b3)
2022-07-27 15:57:56 -07:00
Mike Blumenkrantz 0a4b59e1d2 zink: use right glsl length getter for ntv partial stores
why does glsl_get_length exist if it returns 0 for the most common cases?

Fixes: 31ba19ff68 ("zink: fix ntv partial stores")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
(cherry picked from commit c189b7f585)
2022-07-27 15:08:08 -07:00
Bas Nieuwenhuizen 1aa9acc68b radv: Skip setting empty index buffers to avoid hang
In the direct path we already skipped draws, but in DGC I noticed
that just emitting these packets can cause issues ...

Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>
(cherry picked from commit 82c2e99102)
2022-07-27 15:08:07 -07:00
Mike Blumenkrantz df24a47e1a zink: always use 32bit sample ops
while some (tg4) sample ops can use different bit sizes in spirv, most
cannot, and all the shader variables are always emitted as 32bit, so
ensure the 32bit type is always what's being used for sampling

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17427>
(cherry picked from commit 49d5fa12f2)
2022-07-27 15:08:07 -07:00
Mike Blumenkrantz 0f7b5c52de zink: allow multiple tex components for depth tg4
this returns a vec4, so don't break the return type by clamping 1 component

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17427>
(cherry picked from commit 35a4b8989f)
2022-07-27 15:08:06 -07:00
Lionel Landwerlin 595de71655 anv: ensure tile flush before streamout writes
Streamout is not L3 coherent so previous writes to the same address
might be pending and overwrite the SO writes later when they get
flushed from L3, even though the SO write happened later in the batch.

v2: Use the right flag (not COUNTER)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6680
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17503>
(cherry picked from commit 2cac3b3817)

 Conflicts:
	src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt

deleted ci file not present in 22.1
2022-07-27 15:07:26 -07:00
Lionel Landwerlin 79ddf69224 spirv: switch to uint64 for rayquery internal type
Fixes dEQP-VK.ray_query.advanced.using_wrapper_function.comp.*

An empty struct is causing problems because when passing it as
argument the spirv parser will just drop the argument, considering it
does not hold any data.

v2: update radv CI

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4c703686db ("spirv: handle ray query intrinsics")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17420>
(cherry picked from commit a41e8dc588)

Conflicts:
	src/amd/ci/radv-navi21-aco-fails.txt
	src/amd/ci/radv-navi22-aco-fails.txt
	src/amd/ci/radv-vangogh-aco-fails.txt

navi tests are removed as they don't exist in 22.1
2022-07-27 15:06:14 -07:00
Dylan Baker 47315c07b9 .pick_status.json: Update to 9b844d7c42 2022-07-27 13:18:31 -07:00
Lionel Landwerlin 94924e98da anv: deal with isl format swizzles for buffer views
For some formats like VK_FORMAT_B5G6R5_UNORM_PACK16, we have no direct
matching HW format. We can support it by swizzling.

We already apply those swizzles for image views. We just forgot to
deal with buffer views.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6235
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17385>
(cherry picked from commit 57a8efa222)

Conflicts:
	src/intel/vulkan/anv_image.c

stable:
    - replace vk_buffer_range with anv_get_buffer_range, as the shared
      vulkan buffer work isn't in 22.1
2022-07-27 11:02:10 -07:00
Lionel Landwerlin a84f27ea3e anv: track if images can be fast clear with non-zero color
Because clear colors are stored as 4 32bit component values, there is
an issue if you try to format instance :

   - clearing in R16G16_UNORM
   - draw in R32_UINT

Clear will use 2 components of the clear color in dword0 & dword1.

While draw will use only one component of dword0.

This change uses the mutable format information to track whether clear
colors can be non-zero for fast clears.

With :

   - non mutable formats, we can fast clear with any color on Gfx > 8
   - mutable formats with incompatible component sizes, we can only
     fast clear with 0 color

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5930
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17329>
(cherry picked from commit 682383e5b3)

Conflicts:
	src/intel/vulkan/anv_image.c
2022-07-27 10:15:13 -07:00