platform/upstream/mesa.git
2 years agozink: inline gfx pipeline hash table
Mike Blumenkrantz [Thu, 17 Jun 2021 18:20:40 +0000 (14:20 -0400)]
zink: inline gfx pipeline hash table

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605>

2 years agozink: incrementally hash all pipeline component hashes
Mike Blumenkrantz [Thu, 17 Jun 2021 15:46:04 +0000 (11:46 -0400)]
zink: incrementally hash all pipeline component hashes

not the actual pipeline hash, just the components

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605>

2 years agozink: incrementally hash vertex state into pipeline hash
Mike Blumenkrantz [Thu, 17 Jun 2021 15:32:01 +0000 (11:32 -0400)]
zink: incrementally hash vertex state into pipeline hash

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605>

2 years agozink: incrementally hash module variants in pipeline
Mike Blumenkrantz [Thu, 17 Jun 2021 15:25:19 +0000 (11:25 -0400)]
zink: incrementally hash module variants in pipeline

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605>

2 years agozink: incrementally hash gfx shader stages
Mike Blumenkrantz [Thu, 17 Jun 2021 13:45:11 +0000 (09:45 -0400)]
zink: incrementally hash gfx shader stages

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12605>

2 years agozink: don't use dynamic vertex stride with dynamic vertex input
Mike Blumenkrantz [Tue, 17 Aug 2021 14:25:59 +0000 (10:25 -0400)]
zink: don't use dynamic vertex stride with dynamic vertex input

avoid spurious validation errors and potential driver fails from updating
stride twice

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12604>

2 years agozink: dynamic vertex input template
Mike Blumenkrantz [Tue, 15 Jun 2021 18:35:39 +0000 (14:35 -0400)]
zink: dynamic vertex input template

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12604>

2 years agozink: create inner scanout object without scanout binds
Mike Blumenkrantz [Wed, 25 Aug 2021 02:05:23 +0000 (22:05 -0400)]
zink: create inner scanout object without scanout binds

this restores mutable formats to the inner object to work with scanout

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12629>

2 years agozink: ensure gfx shader module states are updated when doing a partial recalc
Mike Blumenkrantz [Tue, 24 Aug 2021 22:33:32 +0000 (18:33 -0400)]
zink: ensure gfx shader module states are updated when doing a partial recalc

these are in the pipeline state and must be updated

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12632>

2 years agozink: remove refcounting from batch states
Mike Blumenkrantz [Wed, 25 Aug 2021 20:08:35 +0000 (16:08 -0400)]
zink: remove refcounting from batch states

these are always destroyed by the context, no exceptions

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12633>

2 years agozink: split out stalling from fence-waiting function
Mike Blumenkrantz [Tue, 31 Aug 2021 20:01:49 +0000 (16:01 -0400)]
zink: split out stalling from fence-waiting function

stall and flush+stall are not the same; in some cases, the driver must only
stall and never flush, so ensure that this is possible to avoid infinite
recursion

fixes Metro Last Light: Redux benchmark mode

Fixes: d8905446d65 ("zink: rework oom flushing")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12652>

2 years agozink: use tc rebind info for buffer replacements
Mike Blumenkrantz [Fri, 9 Jul 2021 15:12:08 +0000 (11:12 -0400)]
zink: use tc rebind info for buffer replacements

this makes the most common type of replacement more efficient

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12575>

2 years agozink: directly pass resource pointer to descriptor state updates
Mike Blumenkrantz [Mon, 21 Jun 2021 14:42:53 +0000 (10:42 -0400)]
zink: directly pass resource pointer to descriptor state updates

this should cut down a little more overhead

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12575>

2 years agogallium/cso: add unbind mask for cso restore
Mike Blumenkrantz [Mon, 7 Jun 2021 14:20:38 +0000 (10:20 -0400)]
gallium/cso: add unbind mask for cso restore

this code was duplicated in a bunch of places, so now there can just
be a bitmask passed to simplify and consolidate

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12571>

2 years agoaux/cso: always restore states in atom order
Mike Blumenkrantz [Mon, 7 Jun 2021 13:37:59 +0000 (09:37 -0400)]
aux/cso: always restore states in atom order

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12571>

2 years agozink: destroy shader modules on program free to avoid leaking
Mike Blumenkrantz [Tue, 31 Aug 2021 18:21:30 +0000 (14:21 -0400)]
zink: destroy shader modules on program free to avoid leaking

it's irrelevant whether the shader pointer is valid, the shader cache
may still exist

Fixes: a92442225ca ("zink: split up shader cache per-stage")

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12650>

2 years agolavapipe: Use generated command queue code
Tomeu Vizoso [Fri, 13 Aug 2021 08:48:20 +0000 (10:48 +0200)]
lavapipe: Use generated command queue code

Most of the code that implements entry points for commands doesn't need
to be manually written. So just drop it.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agovulkan: Generate entrypoints that enqueue commands
Tomeu Vizoso [Tue, 24 Aug 2021 09:14:33 +0000 (11:14 +0200)]
vulkan: Generate entrypoints that enqueue commands

For drivers such as Lavapipe that record the commands at the execution
stage.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agovulkan: Generate code to place commands in a queue
Tomeu Vizoso [Wed, 11 Aug 2021 08:01:14 +0000 (10:01 +0200)]
vulkan: Generate code to place commands in a queue

It can be used by lavapipe and also by drivers for GPUs with command
streams that require values related to the framebuffer, thus the command
stream emission for secondary buffers needs to be deferred until the
framebuffer is known (execution time).

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agovulkan: Read len attribute of parameters to functions
Tomeu Vizoso [Wed, 11 Aug 2021 07:58:08 +0000 (09:58 +0200)]
vulkan: Read len attribute of parameters to functions

It will be needed for generating code that needs to know the size of
arrays.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agolavapipe: add xfails for whole of CTS
Tomeu Vizoso [Wed, 25 Aug 2021 07:01:08 +0000 (09:01 +0200)]
lavapipe: add xfails for whole of CTS

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agoac/gpu_info: fix detection of smart access memory
Marek Olšák [Tue, 31 Aug 2021 09:50:54 +0000 (05:50 -0400)]
ac/gpu_info: fix detection of smart access memory

chip_class was 0. Move the code after setting chip_class.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5282

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: set gfx10 registers better in si_emit_initial_compute_regs
Marek Olšák [Mon, 30 Aug 2021 05:28:52 +0000 (01:28 -0400)]
radeonsi: set gfx10 registers better in si_emit_initial_compute_regs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: fix a memory leak in si_get_shader_binary_size
Marek Olšák [Tue, 24 Aug 2021 15:49:30 +0000 (11:49 -0400)]
radeonsi: fix a memory leak in si_get_shader_binary_size

Fixes: bf8a1ca9024 "radeonsi: use the new run-time linker for shaders"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5272

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoac/debug: add an option to disable colors for printed IBs
Marek Olšák [Sun, 22 Aug 2021 00:51:05 +0000 (20:51 -0400)]
ac/debug: add an option to disable colors for printed IBs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: add si_print_current_ib function for debugging
Marek Olšák [Fri, 20 Aug 2021 16:50:31 +0000 (12:50 -0400)]
radeonsi: add si_print_current_ib function for debugging

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: don't use SQ_NON_EVENT before GE_PC_ALLOC for better perf on Navi1x
Marek Olšák [Wed, 18 Aug 2021 19:21:28 +0000 (15:21 -0400)]
radeonsi: don't use SQ_NON_EVENT before GE_PC_ALLOC for better perf on Navi1x

SQ_NON_EVENT was originally meant to fix a perf issue on Navi1x, but using
the event actually makes the perf worse.

This improves perf for viewperf/snx.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: inline si_need_gfx_cs_space
Marek Olšák [Fri, 13 Aug 2021 13:36:30 +0000 (09:36 -0400)]
radeonsi: inline si_need_gfx_cs_space

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agowinsys/amdgpu: clean up amdgpu_cs_check_space
Marek Olšák [Wed, 11 Aug 2021 16:22:46 +0000 (12:22 -0400)]
winsys/amdgpu: clean up amdgpu_cs_check_space

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: simplify si_need_gfx_cs_space
Marek Olšák [Wed, 11 Aug 2021 16:10:28 +0000 (12:10 -0400)]
radeonsi: simplify si_need_gfx_cs_space

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: inline remaining big functions in draw_vbo for better snx perf
Marek Olšák [Wed, 11 Aug 2021 08:42:04 +0000 (04:42 -0400)]
radeonsi: inline remaining big functions in draw_vbo for better snx perf

This makes compilation slower, but the perf improvement is ~4%
with pipe_vertex_state.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: simplify memory usage checking by merging vram and gtt counters
Marek Olšák [Wed, 11 Aug 2021 08:50:53 +0000 (04:50 -0400)]
radeonsi: simplify memory usage checking by merging vram and gtt counters

no change in behavior

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: correctly use cs instead of gfx_cs in build pm4 helpers
Marek Olšák [Wed, 11 Aug 2021 06:49:33 +0000 (02:49 -0400)]
radeonsi: correctly use cs instead of gfx_cs in build pm4 helpers

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: use memcmp and radeon_emit_array in radeon_opt_set_context_regn
Marek Olšák [Wed, 11 Aug 2021 06:46:25 +0000 (02:46 -0400)]
radeonsi: use memcmp and radeon_emit_array in radeon_opt_set_context_regn

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: stop using AC_EXP_PARAM_UNDEFINED because it's not useful
Marek Olšák [Wed, 11 Aug 2021 04:37:12 +0000 (00:37 -0400)]
radeonsi: stop using AC_EXP_PARAM_UNDEFINED because it's not useful

Just use AC_EXP_PARAM_DEFAULT_VAL_0000 to keep things simple.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: inline si_get_alpha_test_func
Marek Olšák [Tue, 10 Aug 2021 05:33:21 +0000 (01:33 -0400)]
radeonsi: inline si_get_alpha_test_func

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: move as_ls/es/ngg setting out of si_shader_selector_key
Marek Olšák [Tue, 10 Aug 2021 04:55:52 +0000 (00:55 -0400)]
radeonsi: move as_ls/es/ngg setting out of si_shader_selector_key

Do it when we bind shaders.

The advantages are:
- no need to memset the fields when any shader variant state is changed
  (e.g. culling on/off)
- no need to recompute the fields every time that happens

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: move si_vgt_stages_key determination into si_update_vgt_shader_config
Marek Olšák [Tue, 10 Aug 2021 04:15:41 +0000 (00:15 -0400)]
radeonsi: move si_vgt_stages_key determination into si_update_vgt_shader_config

This simplifies si_update_shaders. It also makes it more obvious that
si_update_shaders could become a C++ template one day.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: remove stages_key parameter from si_shader_selector_key
Marek Olšák [Tue, 10 Aug 2021 04:03:40 +0000 (00:03 -0400)]
radeonsi: remove stages_key parameter from si_shader_selector_key

no change in behavior

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: remove instancing support from the prim discard compute shader
Marek Olšák [Tue, 10 Aug 2021 08:09:02 +0000 (04:09 -0400)]
radeonsi: remove instancing support from the prim discard compute shader

It's not important for workstation apps on Vega.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agoradeonsi: remove unused depth_clamp_any
Marek Olšák [Tue, 10 Aug 2021 07:55:18 +0000 (03:55 -0400)]
radeonsi: remove unused depth_clamp_any

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>

2 years agomesa: skip draw calls with unaligned indices
Marek Olšák [Tue, 24 Aug 2021 16:59:14 +0000 (12:59 -0400)]
mesa: skip draw calls with unaligned indices

GL doesn't say which error we should report. dEQP expects no error and
no crash and allows skipping the call. Some drivers can crash.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5227
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533>

2 years agomesa: fix gl_DrawID with indirect multi draws using user indirect buffer
Marek Olšák [Tue, 24 Aug 2021 17:03:30 +0000 (13:03 -0400)]
mesa: fix gl_DrawID with indirect multi draws using user indirect buffer

The code lowered the draws to direct ones but disregarded gl_DrawID.
We need to pass the draw ID to the driver manually.

gl_DrawID is the 3rd parameter of DrawGallium here.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5274
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533>

2 years agomesa: remove unused indices parameter from validate functions
Marek Olšák [Wed, 25 Aug 2021 00:07:08 +0000 (20:07 -0400)]
mesa: remove unused indices parameter from validate functions

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533>

2 years agolavapipe: VK_KHR_depth_stencil_resolve support
Dave Airlie [Thu, 24 Dec 2020 04:09:58 +0000 (14:09 +1000)]
lavapipe: VK_KHR_depth_stencil_resolve support

This adds support for depth stencil resolves to lavapipe.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agou_blitter: add support for sample0 only resolves.
Dave Airlie [Mon, 23 Aug 2021 07:26:29 +0000 (17:26 +1000)]
u_blitter: add support for sample0 only resolves.

This adds support for sample0 only resolves to support lavapipe

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agogallium: add a sample0 only option to blitter.
Dave Airlie [Mon, 23 Aug 2021 07:25:13 +0000 (17:25 +1000)]
gallium: add a sample0 only option to blitter.

Vulkan depth/stencil resolves can ask for just sample 0 instead
of averaging. Just add a flag to the state to allow it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agollvmpipe: adjust scissor planes for multisample.
Dave Airlie [Mon, 30 Aug 2021 04:44:47 +0000 (14:44 +1000)]
llvmpipe: adjust scissor planes for multisample.

For the inclusive x0/y0 planes, add a half pixel adjustment

For the exclusive x1/y1 planes, remove a half pixel adjustment

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agollvmpipe/scissor: rewrite scissor planes interaction.
Dave Airlie [Mon, 30 Aug 2021 03:56:03 +0000 (13:56 +1000)]
llvmpipe/scissor: rewrite scissor planes interaction.

This just changes the calcs to be cleaner and easier to interpret.

Adjust the inclusive (x0/y0) by -1 like before, and then flip the
sign for the correct direction.

Add full pixel to the exclusive side after scaling, this is do
show that this value is incorrect and the next patch fixes that
taking multisample into account

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agollvmpipe: consolidate scissor plane code between line/tri
Dave Airlie [Mon, 30 Aug 2021 03:52:29 +0000 (13:52 +1000)]
llvmpipe: consolidate scissor plane code between line/tri

This code is pretty much the same in both, consolidate it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agollvmpipe/fs: fix multisample depth/stencil fs writes.
Dave Airlie [Mon, 23 Aug 2021 07:15:17 +0000 (17:15 +1000)]
llvmpipe/fs: fix multisample depth/stencil fs writes.

The state wasn't storing the shader depth/stencil outputs
per-sample, so only the last sample emitted was being used
for the late depth test and stencil ref.

Noticed while trying to fix some vulkan depth stencil resolve
issues

Fixes: a0195240c44f ("llvmpipe: handle multisample early depth test/late depth write")

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agovbo: check more GL errors when drawing via glCallList
Marek Olšák [Sun, 8 Aug 2021 06:18:35 +0000 (02:18 -0400)]
vbo: check more GL errors when drawing via glCallList

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12265>

2 years agovbo: merge draws with GL_LINES regardless of line stippling
Marek Olšák [Thu, 17 Jun 2021 00:07:48 +0000 (20:07 -0400)]
vbo: merge draws with GL_LINES regardless of line stippling

see the code comment

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12265>

2 years agoutil/cpu_detect: add/guess support for next Zen CPUs
Marek Olšák [Tue, 10 Aug 2021 16:09:57 +0000 (12:09 -0400)]
util/cpu_detect: add/guess support for next Zen CPUs

so that we don't have to update this anymore

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12335>

2 years agoutil/cpu_detect: print num_L3_caches and num_cpu_mask_bits
Marek Olšák [Mon, 14 Jun 2021 20:33:01 +0000 (16:33 -0400)]
util/cpu_detect: print num_L3_caches and num_cpu_mask_bits

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12335>

2 years agomain: allow all external textures for BindImageTexture
Quantum [Sun, 15 Aug 2021 21:44:04 +0000 (17:44 -0400)]
main: allow all external textures for BindImageTexture

According to OES_EGL_image_external_essl3:

  On p. 196 in the errors section for BindImageTexture, replace the
  last error with the following:

    "An INVALID_OPERATION error is generated if <texture> is neither the
     name of an immutable texture object, nor the name of an external
     texture object."

According to OES_EGL_image_external:

  The command

    void EGLImageTargetTexture2DOES(enum target, eglImageOES image);

  with <target> set to TEXTURE_EXTERNAL_OES defines the currently bound
  external texture object to be a target sibling of <image>.

  ...

  If <target> is not TEXTURE_EXTERNAL_OES, the error INVALID_ENUM is
  generated.  (Note: if GL_OES_EGL_image is supported then <target> may
  also be TEXTURE_2D).

Currently, mesa only allows GL_TEXTURE_EXTERNAL_OES textures to be bound
by glBindImageTexture. However, the language of the specification does not
appear to use "external" to refer to GL_TEXTURE_EXTERNAL_OES specifically,
since OES_EGL_image_external allows external eglImageOES to be attached
to GL_TEXTURE_2D in the presence of GL_OES_EGL_image. Thus, it should be
interpreted to refer to all types of external textures, including 2D
textures attached via glEGLImageTargetTexture2DOES.

Fixes: ed43dd62acc ("main: allow external textures for BindImageTexture")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12383>

2 years agovenus: set maxMipLevels to 1 for ahb images
Yiwei Zhang [Tue, 31 Aug 2021 20:04:41 +0000 (20:04 +0000)]
venus: set maxMipLevels to 1 for ahb images

Fixes: dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.*

Cc: 21.2.2 mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12639>

2 years agoiris: Map scanout buffers WC instead of WB [v2]
Keith Packard [Fri, 6 Aug 2021 23:11:18 +0000 (16:11 -0700)]
iris: Map scanout buffers WC instead of WB [v2]

The scanout engine is not coherent with rendering, so make sure
scanout buffers are mapped WC. This ensures that CPU rendering as done
by the Xserver gets flushed to the frame buffer immediately instead of
waiting for some future time.

v2:
    Also mark shared buffers to be allocated for scanout
    in case they are being used for scanout elsewhere.

Signed-off-by: Keith Packard <keithp@keithp.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5231
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12259>

2 years agovenus: fix device group enumeration with unsupported devices
Chia-I Wu [Sun, 29 Aug 2021 04:42:32 +0000 (21:42 -0700)]
venus: fix device group enumeration with unsupported devices

instance->physical_devices includes only supported devices, not all
devices.  One example is that it does not include 1.0 devices.  We need
to fix up VkPhysicalDeviceGroupProperties to exclude unsupported
devices.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637>

2 years agovenus: pre-initialize device groups
Chia-I Wu [Sun, 29 Aug 2021 03:40:33 +0000 (20:40 -0700)]
venus: pre-initialize device groups

We don't need to worry about how vkEnumeratePhysicalDeviceGroups is
called (props is NULL, props is non-NULL but count is 0, etc.) this way.
It also allows us to fix up VkPhysicalDeviceGroupProperties easily.

v2: let the for-loop increment (Yiwei)

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637>

2 years agovenus: minor cleanup to physical device init loop
Chia-I Wu [Sun, 29 Aug 2021 03:28:31 +0000 (20:28 -0700)]
venus: minor cleanup to physical device init loop

v2: let the for-loop increment (Yiwei)

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637>

2 years agoir3/ra: Fix type mismatch when comparing intervals
Connor Abbott [Fri, 20 Aug 2021 14:33:55 +0000 (16:33 +0200)]
ir3/ra: Fix type mismatch when comparing intervals

This was once a physreg, back in the very beginning of the new RA, but
now the caller passes an unsigned int.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5163
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12487>

2 years agoir3: Make ir3_register::name 32-bits
Connor Abbott [Fri, 20 Aug 2021 14:33:03 +0000 (16:33 +0200)]
ir3: Make ir3_register::name 32-bits

It was overflowing with
dEQP-VK.spirv_assembly.instruction.compute.spirv_ids_abuse.lots_ids.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12487>

2 years agoir3: Make instruction IP 32 bits
Connor Abbott [Fri, 20 Aug 2021 14:30:30 +0000 (16:30 +0200)]
ir3: Make instruction IP 32 bits

a6xx supports shaders with more than 64k dwords, or at least the shader
size register has increased in size, and the matching name is gone so
there's no reason to be clever here. This doesn't fix anything at the
moment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12487>

2 years agoir3: Remove ir3_instr::name
Connor Abbott [Fri, 20 Aug 2021 14:28:19 +0000 (16:28 +0200)]
ir3: Remove ir3_instr::name

Unused since the switch to new RA.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12487>

2 years agonir_to_tgsi: Use explicit sizes of NIR variables for UBO declarations.
Emma Anholt [Mon, 2 Aug 2021 17:43:02 +0000 (10:43 -0700)]
nir_to_tgsi: Use explicit sizes of NIR variables for UBO declarations.

This fixes duplicate CB0 declarations, missing interface array
declarations, and too-low sizes of UBOs containing multiple nir_variables.

Closes: #4810
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175>

2 years agonir/nir_lower_uniforms_to_ubo: Set the explicit stride of the UBO 0 uniform.
Emma Anholt [Mon, 2 Aug 2021 17:47:54 +0000 (10:47 -0700)]
nir/nir_lower_uniforms_to_ubo: Set the explicit stride of the UBO 0 uniform.

Normal UBOs have explicit strides on them, make our lowered one behave the
same.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175>

2 years agonir: Set .driver_location for GLSL UBO/SSBOs when we lower to block indices.
Emma Anholt [Mon, 2 Aug 2021 19:49:56 +0000 (12:49 -0700)]
nir: Set .driver_location for GLSL UBO/SSBOs when we lower to block indices.

Without this, there's no way to match the UBO nir_variable declarations to
the load_ubo intrinsics referencing their data.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175>

2 years agoanv: Enable KHR_shader_integer_dot_product
Ian Romanick [Tue, 15 Jun 2021 02:49:32 +0000 (19:49 -0700)]
anv: Enable KHR_shader_integer_dot_product

For now, only mark the 4x8BitPacked variants as accelerated.

Applications are unlikely to use the "add with saturate" opcodes from
VK_INTEL_shader_integer_functions2, so, technically, all of the
AccumulatingSaturating variants "[provide] a performance advantage over
user-provided code composed from elementary instructions..." on all
Intel platforms.  If we encounter an application that cares, we can do
things differently then.  Ditto for the non-packed 8Bit, 4-element
vector variants.

v2: Don't memset props as this also zeros sType and pNext.  Noticed by
Georg Lehmann in !12617.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12624>

2 years agozink: ci updates
Mike Blumenkrantz [Tue, 31 Aug 2021 18:24:32 +0000 (14:24 -0400)]
zink: ci updates

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agodocs: mark off ES 3.2 for zink
Mike Blumenkrantz [Tue, 31 Aug 2021 15:44:28 +0000 (11:44 -0400)]
docs: mark off ES 3.2 for zink

blammo

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: enable fbfetch pipe cap
Mike Blumenkrantz [Tue, 27 Jul 2021 18:04:35 +0000 (14:04 -0400)]
zink: enable fbfetch pipe cap

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: add a renderpass flag for input attachment layout handling
Mike Blumenkrantz [Tue, 27 Jul 2021 18:04:14 +0000 (14:04 -0400)]
zink: add a renderpass flag for input attachment layout handling

this has special requirements

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: update push descriptor set anytime fbfetch changes
Mike Blumenkrantz [Tue, 27 Jul 2021 18:03:50 +0000 (14:03 -0400)]
zink: update push descriptor set anytime fbfetch changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: add an input attachment to the gfx push set layout to handle fbfetch
Mike Blumenkrantz [Tue, 27 Jul 2021 18:03:23 +0000 (14:03 -0400)]
zink: add an input attachment to the gfx push set layout to handle fbfetch

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: fix lazy descriptor deinit
Mike Blumenkrantz [Tue, 27 Jul 2021 18:18:46 +0000 (14:18 -0400)]
zink: fix lazy descriptor deinit

this used to be the right conditional, but it's not anymore

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: add an input attachment to the gfx push set layout to handle fbfetch
Mike Blumenkrantz [Tue, 27 Jul 2021 18:03:23 +0000 (14:03 -0400)]
zink: add an input attachment to the gfx push set layout to handle fbfetch

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: flag color attachment images as input attachments at creation
Mike Blumenkrantz [Tue, 27 Jul 2021 18:02:32 +0000 (14:02 -0400)]
zink: flag color attachment images as input attachments at creation

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: track fbfetch info on context, update as needed
Mike Blumenkrantz [Tue, 27 Jul 2021 17:59:39 +0000 (13:59 -0400)]
zink: track fbfetch info on context, update as needed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: refactor descriptor layout/template creation a little
Mike Blumenkrantz [Tue, 27 Jul 2021 17:56:07 +0000 (13:56 -0400)]
zink: refactor descriptor layout/template creation a little

make the push sets more flexible

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: add a compiler pass to translate fbfetch -> input attachments
Mike Blumenkrantz [Tue, 27 Jul 2021 17:49:25 +0000 (13:49 -0400)]
zink: add a compiler pass to translate fbfetch -> input attachments

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: emit fbfetch variables as ntv input attachments
Mike Blumenkrantz [Tue, 27 Jul 2021 17:44:32 +0000 (13:44 -0400)]
zink: emit fbfetch variables as ntv input attachments

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: add input attachment thingy for spirv builder
Mike Blumenkrantz [Fri, 9 Jul 2021 12:57:19 +0000 (08:57 -0400)]
zink: add input attachment thingy for spirv builder

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12603>

2 years agozink: move alphaToOne warning to a dynamic warning
Mike Blumenkrantz [Tue, 31 Aug 2021 16:23:10 +0000 (12:23 -0400)]
zink: move alphaToOne warning to a dynamic warning

stop spamming these if they aren't even being used

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12647>

2 years agoci/llvmpipe: Add a fractional ASan run.
Emma Anholt [Fri, 20 Aug 2021 17:32:21 +0000 (10:32 -0700)]
ci/llvmpipe: Add a fractional ASan run.

This reproduces #5254 and seems like a good idea to be checking normally.

I think running some desktop GL would also be useful here, but it turns
out that desktop glcts is pretty leaky/overflowy inside of deqp.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12493>

2 years agomesa: add environment variable MESA_NO_SHADER_REPLACEMENT
Marek Olšák [Fri, 20 Aug 2021 16:25:34 +0000 (12:25 -0400)]
mesa: add environment variable MESA_NO_SHADER_REPLACEMENT

for performance comparisons

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12492>

2 years agomeson: add missing custom target to generate shader_replacement.h
Marek Olšák [Fri, 20 Aug 2021 20:27:03 +0000 (16:27 -0400)]
meson: add missing custom target to generate shader_replacement.h

for custom shader replacements enabled by -Dcustom-shader-replacement=path.
process_shaders.py should generate shader_replacement.h, which should
contain shaders and their substitutions.

Loosely based on Pierre-Eric's commit.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12492>

2 years agovirgl/ci: enable some traces that were previously crashing
Italo Nicola [Wed, 18 Aug 2021 00:30:08 +0000 (21:30 -0300)]
virgl/ci: enable some traces that were previously crashing

Most of these are fixed in recent mesa and virglrenderer versions, but
some might still be flaky. We'll keep an eye on them and if they are
flaky we can disable them.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12643>

2 years agovirgl/ci: stop overriding GL version when running traces
Italo Nicola [Tue, 31 Aug 2021 13:48:58 +0000 (10:48 -0300)]
virgl/ci: stop overriding GL version when running traces

These environment variables make some traces that require higher GLSL
versions crash.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12643>

2 years agoci: Ensure the DRM device is open
Tomeu Vizoso [Mon, 30 Aug 2021 09:01:30 +0000 (11:01 +0200)]
ci: Ensure the DRM device is open

... before changing the PM settings.

Otherwise, we hit a kernel warning in Qualcomm devices and the device is
left in a non-functional state.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12644>

2 years agoaco: remove DPP when applying constants/literals/sgprs
Rhys Perry [Mon, 30 Aug 2021 09:30:45 +0000 (10:30 +0100)]
aco: remove DPP when applying constants/literals/sgprs

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12601>

2 years agoaco/tests: test copy propagation with DPP instructions
Rhys Perry [Fri, 27 Aug 2021 16:53:48 +0000 (17:53 +0100)]
aco/tests: test copy propagation with DPP instructions

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12601>

2 years agoaco: don't constant propagate to DPP instructions
Rhys Perry [Fri, 27 Aug 2021 16:50:11 +0000 (17:50 +0100)]
aco: don't constant propagate to DPP instructions

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12601>

2 years agoradeon/vcn: add a handling of error for incorrect reference lists
Leo Liu [Sun, 29 Aug 2021 17:28:51 +0000 (13:28 -0400)]
radeon/vcn: add a handling of error for incorrect reference lists

Use the first dpb buffer instead of the NULL pointer sent to hardware.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12610>

2 years agoradeon/vcn: reuse the dpb buffers when with the same size.
Leo Liu [Sun, 29 Aug 2021 16:24:12 +0000 (12:24 -0400)]
radeon/vcn: reuse the dpb buffers when with the same size.

To avoid allocate/deallocate frequently.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12610>

2 years agogallium: fix surface->destroy use-after-free
liuyujun [Tue, 24 Aug 2021 12:34:14 +0000 (20:34 +0800)]
gallium: fix surface->destroy use-after-free

regen surface on every update framebuffer

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: liuyujun <liuyujun@uniontech.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12520>

2 years agointel/fs: fix framebuffer reads
Lionel Landwerlin [Mon, 30 Aug 2021 10:03:26 +0000 (13:03 +0300)]
intel/fs: fix framebuffer reads

We're missing some restrictions on those messages.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5292
Cc: mesa-stable
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12615>

2 years agomeson: add crocus to default group of drivers for x86/x86_64
Filip Gawin [Mon, 30 Aug 2021 22:29:50 +0000 (00:29 +0200)]
meson: add crocus to default group of drivers for x86/x86_64

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12636>

2 years agoradv/llvm: fix invalid IR when converting triangle strips to indices
Samuel Pitoiset [Fri, 27 Aug 2021 14:34:25 +0000 (16:34 +0200)]
radv/llvm: fix invalid IR when converting triangle strips to indices

Operand 0 of LLVMBuildSelect() should be i1.

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/12616>

2 years agoac/llvm: fix huge alignment when loading from shared memory
Samuel Pitoiset [Thu, 22 Apr 2021 08:35:24 +0000 (10:35 +0200)]
ac/llvm: fix huge alignment when loading from shared memory

LLVM doesn't support huge alignments, also it can optimize the shared
loads, so it's unecessary to emit better (but broken) LLVM IR.

Fixes a bunch of crashes with RADV_DEBUG=llvm,checkir.

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/12616>