platform/upstream/mesa.git
21 months agozink: fix/improve handling for multi-component bitfield ops
Mike Blumenkrantz [Tue, 20 Sep 2022 15:42:41 +0000 (11:42 -0400)]
zink: fix/improve handling for multi-component bitfield ops

the original improvement for this correctly handled cases where
the offset/count values were swizzled with .xxxx, but it was broken
for any other swizzling

this adds a nir pass to more easily manipulate the swizzles and rewrite
the multi-component ops as multiple ops with the swizzled params

fixes #6697

Fixes: 8e97f51c676 ("zink: handle swizzled offset/count values for shader bitfield ops")

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

21 months agollvmpipe/fs: convert outputs handling to explicit api
Dave Airlie [Wed, 28 Sep 2022 22:26:01 +0000 (08:26 +1000)]
llvmpipe/fs: convert outputs handling to explicit api

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agollvmpipe/fs: cleanup some remaining mask handling and reuse types
Dave Airlie [Wed, 28 Sep 2022 22:25:42 +0000 (08:25 +1000)]
llvmpipe/fs: cleanup some remaining mask handling and reuse types

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agollvmpipe/fs: handle explicit types around blending and c/zs bufs calcs
Dave Airlie [Wed, 28 Sep 2022 22:24:44 +0000 (08:24 +1000)]
llvmpipe/fs: handle explicit types around blending and c/zs bufs calcs

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agollvmpipe/fs: use explicit api in viewport code.
Dave Airlie [Wed, 28 Sep 2022 22:20:25 +0000 (08:20 +1000)]
llvmpipe/fs: use explicit api in viewport code.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agollvmpipe/fs: pass mask type to alpha to coverage handler
Dave Airlie [Wed, 28 Sep 2022 22:19:44 +0000 (08:19 +1000)]
llvmpipe/fs: pass mask type to alpha to coverage handler

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agollvmpipe/fs: add sample position type to the interp interface
Dave Airlie [Wed, 28 Sep 2022 22:17:35 +0000 (08:17 +1000)]
llvmpipe/fs: add sample position type to the interp interface

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agollvmpipe/fs: port depth code to opaque pointer api
Dave Airlie [Wed, 28 Sep 2022 22:15:28 +0000 (08:15 +1000)]
llvmpipe/fs: port depth code to opaque pointer api

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agollvmpipe/fs: pass explicit mask_type into interp code.
Dave Airlie [Mon, 26 Sep 2022 07:36:58 +0000 (17:36 +1000)]
llvmpipe/fs: pass explicit mask_type into interp code.

This is so it is known for explicit pointer support

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agollvmpipe/fs: add mask_type for mask_store accesses.
Dave Airlie [Mon, 26 Sep 2022 03:55:57 +0000 (13:55 +1000)]
llvmpipe/fs: add mask_type for mask_store accesses.

This adds and passes around the type for mask stores.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agogallivm/struct: add opaque ptr friendly pointer accessors.
Dave Airlie [Mon, 26 Sep 2022 03:47:15 +0000 (13:47 +1000)]
gallivm/struct: add opaque ptr friendly pointer accessors.

These just add explicit types.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>

21 months agoRevert "intel/compiler: Vectorize gl_TessLevelInner/Outer[] writes"
Kenneth Graunke [Fri, 30 Sep 2022 00:39:18 +0000 (17:39 -0700)]
Revert "intel/compiler: Vectorize gl_TessLevelInner/Outer[] writes"

This reverts commit abba55382f5588e3b9dfbc517d5fe940b2917c7c.
The assertions I added late in the process broke shader-db, and my
quick fix broke CI, so let's just revert it for now and I'll resubmit
this later when it's working better.

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

21 months agofreedreno/ir3: Validate our scheduling DAGs after construction.
Eric Anholt [Tue, 8 Sep 2020 21:39:51 +0000 (14:39 -0700)]
freedreno/ir3: Validate our scheduling DAGs after construction.

This gives us some better explanation of a stack overflow in ir3_postsched
with shader-db:

IR3_SHADER_DEBUG=nouboopt ./run shaders/nexuiz/46.shader_test

DAG validation failed at:
  0x55f6570e8460: 0079:0107:002:  _meta:collect r1.w (wrmask=0xff), r1.w, r2.x, r2.y, r2.z, r2.w, r3.x, r3.y, r3.z, false-deps:_[0098:0126:000:  mov.u32u32], _[0112:0143:000:  mov.u32u32], _[0087:0113:000:  mov.u32u32], _[0113:0144:000:  mov.u32u32], _[0099:0127:000:  mov.u32u32], _[0088:0114:000:  mov.u32u32]

Nodes in stack:
  0x55f657102050: 0079:0103:009:  mov.u32u32 r1.w, r0.x, right=_[0080:0104:009:  mov.u32u32]

  0x55f6570e8460: 0079:0107:002:  _meta:collect r1.w (wrmask=0xff), r1.w, r2.x, r2.y, r2.z, r2.w, r3.x, r3.y, r3.z, false-deps:_[0098:0126:000:  mov.u32u32], _[0112:0143:000:  mov.u32u32], _[0087:0113:000:  mov.u32u32], _[0113:0144:000:  mov.u32u32], _[0099:0127:000:  mov.u32u32], _[0088:0114:000:  mov.u32u32]

  0x55f657075f80: 0083:0108:007:  samgq (f32)(xyz)r0.z (wrmask=0x7), r1.w (wrmask=0xff), s#3, t#3

  0x55f657051b60: 0104:0134:008:  ldc.offset0 r3.x (wrmask=0xf), imm[0.000000,0,0x0], r9.w

  0x55f657103040: 0112:0143:000:  mov.u32u32 r9.w, r0.x, right=_[0113:0144:000:  mov.u32u32]

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

21 months agoutil/dag: Add a validation function.
Eric Anholt [Tue, 8 Sep 2020 21:25:42 +0000 (14:25 -0700)]
util/dag: Add a validation function.

I experienced a circular dag in freedreno, and wanted a way to see what
was going wrong.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6656>

21 months agoutil/dag: Move the callback function pointer to the state.
Eric Anholt [Tue, 8 Sep 2020 21:16:05 +0000 (14:16 -0700)]
util/dag: Move the callback function pointer to the state.

No sense passing it as a recursive argument when we have this storage
right there.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6656>

21 months agoglthread: handle DeleteBuffers(n=-1) gracefully
Mike Blumenkrantz [Wed, 28 Sep 2022 01:42:49 +0000 (21:42 -0400)]
glthread: handle DeleteBuffers(n=-1) gracefully

this is a valid error condition

cc: mesa-stable

fixes:
GTF-GL46.gtf21.GL2FixedTests.buffer_objects.buffer_objects

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

21 months agoglthread: use signed vertex buffer offsets when available, don't require them
Mike Blumenkrantz [Tue, 27 Sep 2022 22:26:49 +0000 (18:26 -0400)]
glthread: use signed vertex buffer offsets when available, don't require them

this is a great memory-saving optimization for drivers that support it,
but for drivesr that can't, it ends up taking slower paths instead
of just consuming more memory

but the year is 2022. we have all the memory. so use more memory if signed
offsets aren't supported

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

21 months agod3d12: Style variable fix in d3d12_video_decoder_prepare_dxva_slices_control_av1
Sil Vilerino [Wed, 28 Sep 2022 21:38:47 +0000 (17:38 -0400)]
d3d12: Style variable fix in d3d12_video_decoder_prepare_dxva_slices_control_av1

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>

21 months agod3d12: Fix aliased usage of m_SliceControlBuffer in d3d12_video_decoder_prepare_dxva_...
Sil Vilerino [Wed, 28 Sep 2022 21:38:04 +0000 (17:38 -0400)]
d3d12: Fix aliased usage of m_SliceControlBuffer in d3d12_video_decoder_prepare_dxva_slices_control_XXXX

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>

21 months agod3d12: Support more video formats
Sil Vilerino [Fri, 23 Sep 2022 04:17:33 +0000 (00:17 -0400)]
d3d12: Support more video formats

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Adds support for P010 Encoding and Decoding
Also adds support for RGBA/RGBX UNORM/UINT in the video processor

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

21 months agod3d12: Add support for AV1 Video Decode
Sil Vilerino [Thu, 15 Sep 2022 17:41:10 +0000 (13:41 -0400)]
d3d12: Add support for AV1 Video Decode

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>

21 months agofrontends/va: Fix AV1 decode qm_* parameters reading from VADecPictureParameterBufferAV1
Sil Vilerino [Thu, 29 Sep 2022 15:52:45 +0000 (11:52 -0400)]
frontends/va: Fix AV1 decode qm_* parameters reading from VADecPictureParameterBufferAV1

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Those are being read with | 0xF, but instead should be & 0xF to clear the bits above 4 (the field is 4 bits in size)

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

21 months agofrontends/va: Use is_video_format_supported in vlVaVidEngineBlit instead of format...
Sil Vilerino [Fri, 23 Sep 2022 04:18:07 +0000 (00:18 -0400)]
frontends/va: Use is_video_format_supported in vlVaVidEngineBlit instead of format list

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>

21 months agofrontends/va: Support AV1 Decode with multiple tiles (num_elements > 1) in a single...
Sil Vilerino [Fri, 16 Sep 2022 14:29:13 +0000 (10:29 -0400)]
frontends/va: Support AV1 Decode with multiple tiles (num_elements > 1) in a single VASliceParameterBufferAV1 buffer

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>

21 months agofrontends/va: Add more params from VADecPictureParameterBufferAV1 and VASliceParamete...
Sil Vilerino [Wed, 28 Sep 2022 13:45:15 +0000 (09:45 -0400)]
frontends/va: Add more params from VADecPictureParameterBufferAV1 and VASliceParameterBufferAV1 to pipe_av1_picture_desc

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18875>

21 months agointel/compiler: fix loading of draw_id from task & mesh payload
Marcin Ślusarz [Thu, 29 Sep 2022 14:47:32 +0000 (16:47 +0200)]
intel/compiler: fix loading of draw_id from task & mesh payload

Previously both destination and source were floats, so no casting was
performed, but with 7664c85b1da source register was reinterpreted as
unsigned integer, so MOV started casting that integer to float.

Fixes: 7664c85b1da ("intel/compiler: Create and use struct for TASK and MESH thread payloads")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18886>

21 months agoci/virgl: Enable virgl-iris-traces
Dmitry Osipenko [Fri, 23 Sep 2022 14:29:57 +0000 (17:29 +0300)]
ci/virgl: Enable virgl-iris-traces

All virgl-iris-traces tests are passing now after the crosvm revup that
fixed crosvm crash and after updating test checksums. Enable auto-testing
for the virgl-iris-traces pipeline stage.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18693>

21 months agoci: Update virgl-iris-traces checksums
Dmitry Osipenko [Fri, 23 Sep 2022 14:10:36 +0000 (17:10 +0300)]
ci: Update virgl-iris-traces checksums

Few virgl-iris-traces tests fail because resultant images now have few
pixels that changed. The actual reason of the change is unknown, we
assume it happened due to a new optimizations. Update the virgl-iris-traces
checksums.

Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18693>

21 months agoci: Bump crosvm version
Dmitry Osipenko [Tue, 20 Sep 2022 00:16:23 +0000 (03:16 +0300)]
ci: Bump crosvm version

Recent crosvm contains a fix for the unmapping memory on a wrong thread
that crashes crosvm. Bump the crosvm version.

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Link: https://gitlab.freedesktop.org/virgl/virglrenderer/-/issues/282
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18693>

21 months agovenus/ci: remove redundant crosvm patch
Yiwei Zhang [Thu, 22 Sep 2022 06:06:22 +0000 (06:06 +0000)]
venus/ci: remove redundant crosvm patch

VirglRenderer::export_blob doesn't need to handle opaque fd. That will
let rutabaga's export_blob to fail and fallback directly to the external
mapping path desired.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18693>

21 months agoradv: ignore shader stages that don't need to be imported with GPL
Samuel Pitoiset [Wed, 28 Sep 2022 15:35:30 +0000 (17:35 +0200)]
radv: ignore shader stages that don't need to be imported with GPL

Fixes an assertion with vkoverhead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18869>

21 months agoradv: fix initializing the blend state for NULL render pass with GPL
Samuel Pitoiset [Wed, 28 Sep 2022 15:11:08 +0000 (17:11 +0200)]
radv: fix initializing the blend state for NULL render pass with GPL

If a library with only the vertex input interface is created, this
would crash.

This fixes segfault with vkoverhead.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18869>

21 months agoradv: fix initializing the attribute mask for VS input state and GPL
Samuel Pitoiset [Wed, 28 Sep 2022 12:13:17 +0000 (14:13 +0200)]
radv: fix initializing the attribute mask for VS input state and GPL

attribute_mask was unused when I first introduced this but now it's
used again.

This fixes a bunch of GPL regressions.

Fixes: 0feab7b9cfa ("radv: prepare the VS input state for prologs created with GPL")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18862>

21 months agozink: replace mixed_zs with zs feedback loops
Mike Blumenkrantz [Wed, 28 Sep 2022 16:13:42 +0000 (12:13 -0400)]
zink: replace mixed_zs with zs feedback loops

this is the more technically correct way to handle such things

SoroushIMG <soroush.kashani@imgtec.com>

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

21 months agozink: add a draw barrier when unbinding a sampler-bound fb surface
Mike Blumenkrantz [Wed, 28 Sep 2022 02:51:50 +0000 (22:51 -0400)]
zink: add a draw barrier when unbinding a sampler-bound fb surface

this is guaranteed to need some kind of layout change, so ensure the
barrier actually happens

cc: mesa-stable

SoroushIMG <soroush.kashani@imgtec.com>

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

21 months agovirgl: Add nir_lower_tex pass
Corentin Noël [Thu, 22 Sep 2022 15:14:42 +0000 (17:14 +0200)]
virgl: Add nir_lower_tex pass

In GLES hosts that do not support EXT_texture_shadow_lod we need to lower
the shadow texture calls with offset.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18296>

21 months agovirgl: Add TEXTURE_SHADOW_LOD capability support
Corentin Noël [Mon, 29 Aug 2022 14:44:12 +0000 (16:44 +0200)]
virgl: Add TEXTURE_SHADOW_LOD capability support

Bind PIPE_CAP_TEXTURE_SHADOW_LOD with its value so that we are not using
non-existing GLSL on host side.

Rename VIRGL_CAP_FAKE_FP64 into VIRGL_CAP_HOST_IS_GLES

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18296>

21 months agoradv: remove NULL checks when binding a graphics pipeline
Samuel Pitoiset [Wed, 28 Sep 2022 16:19:19 +0000 (18:19 +0200)]
radv: remove NULL checks when binding a graphics pipeline

The driver no longer bind NULL graphics pipelines, so these checks
are useless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18873>

21 months agotu: Fix setting RB_DEPTH_CNTL::Z_CLAMP_ENABLE
Connor Abbott [Wed, 28 Sep 2022 11:53:09 +0000 (13:53 +0200)]
tu: Fix setting RB_DEPTH_CNTL::Z_CLAMP_ENABLE

I missed this when enabling pipeline libraries, and we were also setting
this to the wrong thing. Previously we were using rasterization state
when parsing depth/stencil indirectly via builder->depth_clip_disable,
which is not allowed with pipeline libraries. Fixing this is a bit
painful because now RB_DEPTH_CNTL can depend on state from both the
fragment shader library and the pre-rasterization library, in addition
to being disabled via output interface state.

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

21 months agofreedreno/a6xx, tu: GRAS_CL_CNTL::UNK5 is Z_CLAMP_ENABLE
Connor Abbott [Wed, 28 Sep 2022 10:47:38 +0000 (12:47 +0200)]
freedreno/a6xx, tu: GRAS_CL_CNTL::UNK5 is Z_CLAMP_ENABLE

This changes the behavior for freedreno but it should ultimately be the
same for GL/GLES, given what mesa/st does.

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

21 months agoRevert "freedreno,ir3: rename Z_CLAMP_ENABLE to Z_CLIP_DISABLE"
Connor Abbott [Wed, 28 Sep 2022 10:32:42 +0000 (12:32 +0200)]
Revert "freedreno,ir3: rename Z_CLAMP_ENABLE to Z_CLIP_DISABLE"

This reverts commit 6cb41c51884c2488194f74e2ce637b950c835620. It was
incorrect and the issue it was trying to fix was actually a zink bug.

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

21 months agolavapipe: dynamic state3
Mike Blumenkrantz [Mon, 13 Jun 2022 16:24:27 +0000 (12:24 -0400)]
lavapipe: dynamic state3

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

21 months agovulkan: Add more dynamic color blend states
Jason Ekstrand [Thu, 21 Jul 2022 22:18:27 +0000 (17:18 -0500)]
vulkan: Add more dynamic color blend states

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>

21 months agovulkan: Add more dynamic multisample states
Jason Ekstrand [Thu, 21 Jul 2022 19:55:51 +0000 (14:55 -0500)]
vulkan: Add more dynamic multisample states

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>

21 months agovulkan: Add dynamic state for tessellation domain origin
Jason Ekstrand [Thu, 21 Jul 2022 19:29:16 +0000 (14:29 -0500)]
vulkan: Add dynamic state for tessellation domain origin

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>

21 months agovulkan: Add more dynamic rasterizer state
Jason Ekstrand [Thu, 21 Jul 2022 19:19:30 +0000 (14:19 -0500)]
vulkan: Add more dynamic rasterizer state

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>

21 months agovulkan: Add a dynamic state for vp.depth_clip_negative_one_to_one
Jason Ekstrand [Thu, 21 Jul 2022 19:01:02 +0000 (14:01 -0500)]
vulkan: Add a dynamic state for vp.depth_clip_negative_one_to_one

This is the last bit of viewport state that's not dynamic.  Making it
dynamic will help ANV out a bit.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>

21 months agovulkan: Rename viewport_state::negative_one_to_one
Jason Ekstrand [Thu, 21 Jul 2022 18:54:16 +0000 (13:54 -0500)]
vulkan: Rename viewport_state::negative_one_to_one

This makes it a bit clearer what it's for.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>

21 months agovulkan: Update the XML and headers to 1.3.230
Mike Blumenkrantz [Thu, 29 Sep 2022 04:34:44 +0000 (00:34 -0400)]
vulkan: Update the XML and headers to 1.3.230

Acked-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>

21 months agovulkan: Use altlen when available for array lengths
Jason Ekstrand [Thu, 21 Jul 2022 21:27:44 +0000 (16:27 -0500)]
vulkan: Use altlen when available for array lengths

When the array length is a calculation, the C version of the calculation
is provided in altlen while len often contains LaTeX that we can't do
anything with.  Use altlen when available.  Also, while we're here, wrap
array lengths in parentheses in case they contain math.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>

21 months agogallium: avoid using float based conditions in loops
Filip Gawin [Mon, 16 Aug 2021 20:41:24 +0000 (22:41 +0200)]
gallium: avoid using float based conditions in loops

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

21 months agozink: pass actual screen->threaded to zink_tc_context_unwrap()
Mike Blumenkrantz [Tue, 27 Sep 2022 21:35:00 +0000 (17:35 -0400)]
zink: pass actual screen->threaded to zink_tc_context_unwrap()

using the ctx->screen pointer may not actually yield a zink_screen object

cc: mesa-stable

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

21 months agozink: hook up VK_EXT_depth_clamp_zero_one
Mike Blumenkrantz [Tue, 27 Sep 2022 18:42:08 +0000 (14:42 -0400)]
zink: hook up VK_EXT_depth_clamp_zero_one

this is required for GL since the allowable depth range is always [0,1]

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

21 months agozink: move create_pipeline_lib to zink_program.c
Mike Blumenkrantz [Thu, 22 Sep 2022 20:41:52 +0000 (16:41 -0400)]
zink: move create_pipeline_lib to zink_program.c

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

21 months agozink: rework ZINK_PIPELINE_LIBRARY_FORCE into ZINK_DEBUG flag
Mike Blumenkrantz [Thu, 22 Sep 2022 21:01:42 +0000 (17:01 -0400)]
zink: rework ZINK_PIPELINE_LIBRARY_FORCE into ZINK_DEBUG flag

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

21 months agozink: move zink_screen_get_pipeline_cache() calls out to callers
Mike Blumenkrantz [Thu, 22 Sep 2022 21:03:17 +0000 (17:03 -0400)]
zink: move zink_screen_get_pipeline_cache() calls out to callers

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

21 months agovulkan/wsi: Add a supports_scanout flag
Jason Ekstrand [Mon, 26 Sep 2022 15:48:08 +0000 (10:48 -0500)]
vulkan/wsi: Add a supports_scanout flag

This flag indicates whether or not the legacy scanout flag is supported.
It defaults to true since that has been the default assumption for the
WSI code up until now.

On NVIDIA hardware, we can't render to linear so, if we don't have
modifiers, we want to automatically fall back to the blit path.  In
theory, we could do this inside the driver but it's a giant pain and
much harder to ensure that the blit only happens as part of
vkQueuePresent().

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

21 months agovulkan/wsi: Add a typedef for memory type select callbacks
Jason Ekstrand [Mon, 26 Sep 2022 15:53:53 +0000 (10:53 -0500)]
vulkan/wsi: Add a typedef for memory type select callbacks

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

21 months agovulkan/wsi: Don't expose as many image configure helpers
Jason Ekstrand [Mon, 26 Sep 2022 18:13:33 +0000 (13:13 -0500)]
vulkan/wsi: Don't expose as many image configure helpers

Now that everything is going through the params-based ones, we don't
need to expose the individual ones.

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

21 months agovulkan/wsi: Always configure images in wsi_swapchain_init()
Jason Ekstrand [Mon, 26 Sep 2022 18:06:48 +0000 (13:06 -0500)]
vulkan/wsi: Always configure images in wsi_swapchain_init()

Now that all the back-ends are converted, we can drop all the extra code
we had for supporting both paths.

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

21 months agovulkan/wsi/win32: Configure images via params passed to wsi_swapchain_init()
Jason Ekstrand [Mon, 26 Sep 2022 18:04:24 +0000 (13:04 -0500)]
vulkan/wsi/win32: Configure images via params passed to wsi_swapchain_init()

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

21 months agovulkan/wsi/display: Configure images via params passed to wsi_swapchain_init()
Jason Ekstrand [Mon, 26 Sep 2022 18:02:46 +0000 (13:02 -0500)]
vulkan/wsi/display: Configure images via params passed to wsi_swapchain_init()

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

21 months agovulkan/wsi/wayland: Configure images via params passed to wsi_swapchain_init()
Jason Ekstrand [Mon, 26 Sep 2022 17:58:38 +0000 (12:58 -0500)]
vulkan/wsi/wayland: Configure images via params passed to wsi_swapchain_init()

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

21 months agovulkan/wsi/x11: Configure images via params passed to wsi_swapchain_init()
Jason Ekstrand [Mon, 26 Sep 2022 17:17:55 +0000 (12:17 -0500)]
vulkan/wsi/x11: Configure images via params passed to wsi_swapchain_init()

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

21 months agovulkan/wsi: Support configuring swapchain images as part of swapchain init
Jason Ekstrand [Mon, 26 Sep 2022 17:03:28 +0000 (12:03 -0500)]
vulkan/wsi: Support configuring swapchain images as part of swapchain init

The eventual goal here is to move as much of the prime and blit logic
out of the individual window-system back-ends as possible.

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

21 months agollvmpipe/cs: move compute code to explicit pointer types
Dave Airlie [Mon, 26 Sep 2022 06:49:06 +0000 (16:49 +1000)]
llvmpipe/cs: move compute code to explicit pointer types

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>

21 months agollvmpipe/setup: move setup code to explicit pointers.
Dave Airlie [Mon, 26 Sep 2022 06:42:17 +0000 (16:42 +1000)]
llvmpipe/setup: move setup code to explicit pointers.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>

21 months agollvmpipe/fs: fix invocations access for opaque ptrs.
Dave Airlie [Mon, 26 Sep 2022 03:52:21 +0000 (13:52 +1000)]
llvmpipe/fs: fix invocations access for opaque ptrs.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>

21 months agollvmpipe/cs: convert cs thread data to opaque friendly api
Dave Airlie [Mon, 26 Sep 2022 03:00:11 +0000 (13:00 +1000)]
llvmpipe/cs: convert cs thread data to opaque friendly api

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>

21 months agollvmpipe/cs: convert cs context to opaque friendly api
Dave Airlie [Mon, 26 Sep 2022 02:59:05 +0000 (12:59 +1000)]
llvmpipe/cs: convert cs context to opaque friendly api

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>

21 months agollvmpipe/fs: convert linear context to opaque pointers friendly
Dave Airlie [Mon, 26 Sep 2022 02:56:23 +0000 (12:56 +1000)]
llvmpipe/fs: convert linear context to opaque pointers friendly

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>

21 months agollvmpipe/fs: convert thread data ptr to opaque ptr friendly apis
Dave Airlie [Mon, 26 Sep 2022 02:51:30 +0000 (12:51 +1000)]
llvmpipe/fs: convert thread data ptr to opaque ptr friendly apis

this converts the thread data code.

The cache code still isn't fixed but needs future API changes
to sampling code.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>

21 months agollvmpipe/fs: start passing explicit context pointer type.
Dave Airlie [Mon, 26 Sep 2022 02:44:53 +0000 (12:44 +1000)]
llvmpipe/fs: start passing explicit context pointer type.

In order to support opaque pointers in the future, we need to be
more explicit with the pointer types here.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18837>

21 months agogallium: Do not include offscreen winsys if glx is disabled
nyanmisaka [Tue, 27 Sep 2022 18:38:42 +0000 (02:38 +0800)]
gallium: Do not include offscreen winsys if glx is disabled

Offscreen winsys introduced in Mesa 22.2 depends on glx(dri) and libswkmsdri.

The error message is:
/usr/bin/ld: src/gallium/auxiliary/libgalliumvlwinsys.a.p/vl_vl_winsys_dri_vgem.c.o: in function `vl_vgem_drm_screen_create':
vl_winsys_dri_vgem.c:(.text.vl_vgem_drm_screen_create+0x28): undefined reference to `kms_dri_create_winsys'

Fixes: 31dcb396 (gallium/vl: Add software winsys and offscreen winsys)

Cc: mesa-stable
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18843>

21 months agodocs/rusticl: Document minimum required bindgen version
LingMan [Tue, 27 Sep 2022 02:25:16 +0000 (04:25 +0200)]
docs/rusticl: Document minimum required bindgen version

rusticl requires at least bindgen 0.58.0 to build.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18834>

21 months agorusticl/bindgen: Use `allowlist-*` instead of `whitelist-*` switches
LingMan [Tue, 27 Sep 2022 01:50:46 +0000 (03:50 +0200)]
rusticl/bindgen: Use `allowlist-*` instead of `whitelist-*` switches

bindgen 0.58.0 deprecated the `whitelist-*` switches in favor of the new `allowlist-*` switches.
Currently rusticl uses a mixture of both.

Consistently move to the newer versions.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18834>

21 months agogallivm: avoid the use of an uninitialized value
Corentin Noël [Fri, 16 Sep 2022 14:28:47 +0000 (16:28 +0200)]
gallivm: avoid the use of an uninitialized value

When need_derivs is false, lp_build_cube_lookup does not set the value of
derivs_out which means that the stack is not initialized but its pointer
is then used.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18635>

21 months agozink: set layouts before possibly reordering image copies
Mike Blumenkrantz [Wed, 21 Sep 2022 17:18:39 +0000 (13:18 -0400)]
zink: set layouts before possibly reordering image copies

layout-setting may change which cmdbuf can be used

Fixes: 731d7be3756 ("zink: make get_cmdbuf() public")

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

21 months agozink: always unflag unordered_write when binding image descriptors
Mike Blumenkrantz [Wed, 21 Sep 2022 17:15:53 +0000 (13:15 -0400)]
zink: always unflag unordered_write when binding image descriptors

image descriptors have to maintain their layout, which means it's no
longer possible to reorder any operations once they use a non-transfer
layout

Fixes: ca03e35821d ("zink: expand unordered_exec")

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

21 months agoaux/trace: dump depth_clamp for rasterizer state
Mike Blumenkrantz [Wed, 10 Aug 2022 14:53:21 +0000 (10:53 -0400)]
aux/trace: dump depth_clamp for rasterizer state

cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18783>

21 months agoaux/trace: dump line_rectangular member of rasterizer state
Mike Blumenkrantz [Thu, 23 Jun 2022 14:25:09 +0000 (10:25 -0400)]
aux/trace: dump line_rectangular member of rasterizer state

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18783>

21 months agoradv: Add and use AS and scratch layout structs
Konstantin Seurer [Tue, 27 Sep 2022 12:47:00 +0000 (14:47 +0200)]
radv: Add and use AS and scratch layout structs

The memory layout logic is duplicated between
radv_GetAccelerationStructureBuildSizesKHR and
radv_CmdBuildAccelerationStructuresKHR. This patch adds a helper that
computes the scratch and acceleration structure memory layout for a
given build configuration.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18842>

21 months agoradv: fix emitting RBPLUS state when MRTs are compacted
Samuel Pitoiset [Mon, 26 Sep 2022 09:44:13 +0000 (11:44 +0200)]
radv: fix emitting RBPLUS state when MRTs are compacted

The RBPLUS state needs the non-compacted SPI_SHADER_COL_FORMAT value,
otherwise the state is wrongly emitted if there is holes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7348
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7319
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7365
Fixes: 8fcb4aa0ebd ("radv: compact MRTs to save PS export memory space")
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/18818>

21 months agoradv: Do an early check of distance in triangle culling.
Bas Nieuwenhuizen [Mon, 26 Sep 2022 23:47:20 +0000 (01:47 +0200)]
radv: Do an early check of distance in triangle culling.

Culls like 99% of the triangles that are culled at all.

Reduces VALU usage in Q2RTX traversal by ~8%, though doesn't look
like VALU is a bottleneck at this point ...

For Control we get a ~5% reduction in VALU usage, but similarly it
doesn't look like a bottleneck.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18830>

21 months agotc: don't use CPU storage for glBufferData
Pierre-Eric Pelloux-Prayer [Fri, 23 Sep 2022 10:15:36 +0000 (12:15 +0200)]
tc: don't use CPU storage for glBufferData

This fixes a performance regression with yquake2 cause by
the enablement of cpu_storage by default for radeonsi in
a5a8e197413.

Fixes: a5a8e197413 ("radeonsi: enable tc cpu_storage by default")
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18774>

21 months agotc: do a GPU->CPU copy to initialize cpu_storage
Pierre-Eric Pelloux-Prayer [Fri, 23 Sep 2022 10:16:59 +0000 (12:16 +0200)]
tc: do a GPU->CPU copy to initialize cpu_storage

If the GPU-side storage has been written to without using cpu_storage,
then we have to initialize the CPU-side storage correctly.

This requires a sync + copy but it's a one time operation so it shouldn't
affect performance much.

I don't think it fixes any existing bug, but the next commit will need
this to behave correctly.

cc: mesa-stable

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18774>

21 months agoanv: flag BO for write combine when CPU visible and potentially in lmem
Lionel Landwerlin [Fri, 23 Sep 2022 19:21:10 +0000 (22:21 +0300)]
anv: flag BO for write combine when CPU visible and potentially in lmem

This should fix a performance regression with the internal kernel
branch which does not support the upstream I915_MMAP_OFFSET_FIXED.

With I915_MMAP_OFFSET_FIXED we defer the mapping flags to the kernel
since it knows better where buffers are going to end up (lmem or smem).

The internal kernel doesn´t have that and there we should use write
combined for anything that can be in lmem.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18841>

21 months agoanv: Allocate buffers with write-combined local memory
Mark Janes [Fri, 28 Aug 2020 20:01:53 +0000 (13:01 -0700)]
anv: Allocate buffers with write-combined local memory

Marginally improves DG1 performance (< 1%)

v2: Only on local mem (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18841>

21 months agoanv: Use WC mapped local memory for block pool BO
Mark Janes [Tue, 27 Sep 2022 08:53:00 +0000 (11:53 +0300)]
anv: Use WC mapped local memory for block pool BO

Improve DG1 performance:

  Fallout: +7%
  Talos:  +15%

v2: Don't drop SNOOP (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18841>

21 months agoanv: Track BOs that need a write-combined mapping
Mark Janes [Mon, 24 Aug 2020 22:41:58 +0000 (15:41 -0700)]
anv: Track BOs that need a write-combined mapping

v2: simplify logic a bit (Lionel)

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18841>

21 months agoaco/opt_value_numbering: use monotonic_allocator for unordered_map
Daniel Schürmann [Mon, 22 Aug 2022 15:26:34 +0000 (17:26 +0200)]
aco/opt_value_numbering: use monotonic_allocator for unordered_map

This patch also changes the rename map to unordered.
Roughly halves the time spent on CSE in ACO.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>

21 months agoaco: implement allocator_traits for monotonic_allocator<T>
Daniel Schürmann [Mon, 22 Aug 2022 12:37:59 +0000 (14:37 +0200)]
aco: implement allocator_traits for monotonic_allocator<T>

For easier usage, this patch also adds aliases for std::map
and std::unordered_map using this allocator.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>

21 months agoaco: use monotonic_buffer_resource for instructions
Daniel Schürmann [Mon, 15 Aug 2022 19:42:19 +0000 (21:42 +0200)]
aco: use monotonic_buffer_resource for instructions

As monotonic_buffer_resource is not thread-safe,
we use a thread_local instance which gets allocated once.

This change reduces the compile time spent in ACO by
approximately 10%.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>

21 months agoaco: implement custom memory resource
Daniel Schürmann [Mon, 15 Aug 2022 19:42:05 +0000 (21:42 +0200)]
aco: implement custom memory resource

This basic allocator implements an arena allocation strategy
and cannot free individual allocations.
It is intended for very fast memory allocations in situations
where memory is used to build up a few objects and then is
released all at once.

This class mimics std::pmr::monotonic_buffer_resource.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>

21 months agoaco: simplify operands_offset calculation in create_instruction()
Daniel Schürmann [Tue, 27 Sep 2022 12:45:16 +0000 (14:45 +0200)]
aco: simplify operands_offset calculation in create_instruction()

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18112>

21 months agoblorp: Fix typo in blorp_xy_block_copy_blt
Kenneth Graunke [Mon, 28 Feb 2022 19:07:30 +0000 (11:07 -0800)]
blorp: Fix typo in blorp_xy_block_copy_blt

suppotred -> supported (Thanks to Tapani for catching this.)

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15183>

21 months agoblorp: Implement blitter clears via XY_FAST_COLOR_BLT
Kenneth Graunke [Tue, 1 Feb 2022 08:12:46 +0000 (00:12 -0800)]
blorp: Implement blitter clears via XY_FAST_COLOR_BLT

Vulkan transfer queues need this functionality.  A lot of the code is
pretty similar to what we have for XY_BLOCK_COPY_BLT.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15183>

21 months agoblorp: Make blitter_supports_aux accessible from multiple files.
Kenneth Graunke [Sat, 26 Feb 2022 08:56:51 +0000 (00:56 -0800)]
blorp: Make blitter_supports_aux accessible from multiple files.

We'll want it in blorp_clear.c shortly.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15183>

21 months agointel/genxml: Add XY_FAST_COLOR_BLT
Kenneth Graunke [Tue, 1 Feb 2022 08:11:07 +0000 (00:11 -0800)]
intel/genxml: Add XY_FAST_COLOR_BLT

We'll need to use this for VkCmdFillBuffer on transfer queues.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15183>

21 months agoci: bump mold to 1.5
Eric Engestrom [Tue, 27 Sep 2022 08:46:05 +0000 (09:46 +0100)]
ci: bump mold to 1.5

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18838>