Commit Graph

160716 Commits

Author SHA1 Message Date
Mike Blumenkrantz
966d6b738e zink: export PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>
2022-09-30 02:16:02 +00:00
Mike Blumenkrantz
12569a390f zink: export PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18858>
2022-09-30 02:16:02 +00:00
Mike Blumenkrantz
af775f842c 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: 8e97f51c67 ("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>
2022-09-30 01:52:47 +00:00
Dave Airlie
111bf8bfee 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>
2022-09-30 01:22:42 +00:00
Dave Airlie
5b83357ac5 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>
2022-09-30 01:22:42 +00:00
Dave Airlie
b9a0ec0c67 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>
2022-09-30 01:22:42 +00:00
Dave Airlie
3137f4fad1 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>
2022-09-30 01:22:42 +00:00
Dave Airlie
38907a40ab 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>
2022-09-30 01:22:42 +00:00
Dave Airlie
e28db68e53 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>
2022-09-30 01:22:42 +00:00
Dave Airlie
ff02d042aa 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>
2022-09-30 01:22:42 +00:00
Dave Airlie
694104b776 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>
2022-09-30 01:22:42 +00:00
Dave Airlie
637652a97f 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>
2022-09-30 01:22:42 +00:00
Dave Airlie
b36160689f 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>
2022-09-30 01:22:42 +00:00
Kenneth Graunke
b61b1d5a4c Revert "intel/compiler: Vectorize gl_TessLevelInner/Outer[] writes"
This reverts commit abba55382f.
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>
2022-09-29 17:39:18 -07:00
Eric Anholt
1a286837bc 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>
2022-09-29 23:40:18 +00:00
Eric Anholt
5d0050c8bf 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>
2022-09-29 23:40:18 +00:00
Eric Anholt
984aa0ac9a 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>
2022-09-29 23:40:18 +00:00
Mike Blumenkrantz
004c5b60ca 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>
2022-09-29 22:05:06 +00:00
Mike Blumenkrantz
171b2a16b5 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>
2022-09-29 22:05:06 +00:00
Sil Vilerino
248e3ceba2 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>
2022-09-29 15:50:04 -04:00
Sil Vilerino
aa1afc3766 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>
2022-09-29 15:50:04 -04:00
Sil Vilerino
1222503ef3 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>
2022-09-29 15:50:04 -04:00
Sil Vilerino
af8f730d8d 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>
2022-09-29 15:50:04 -04:00
Sil Vilerino
f2fc9996d3 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>
2022-09-29 15:50:04 -04:00
Sil Vilerino
4bab5b0b50 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>
2022-09-29 15:50:04 -04:00
Sil Vilerino
e91636ae26 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>
2022-09-29 15:50:04 -04:00
Sil Vilerino
d5b4dec033 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>
2022-09-29 15:50:04 -04:00
Marcin Ślusarz
9bac88856d 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 7664c85b1d source register was reinterpreted as
unsigned integer, so MOV started casting that integer to float.

Fixes: 7664c85b1d ("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>
2022-09-29 17:17:25 +00:00
Dmitry Osipenko
e5631add0d 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>
2022-09-29 16:45:04 +00:00
Dmitry Osipenko
f7a64df0e7 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>
2022-09-29 16:45:04 +00:00
Dmitry Osipenko
498186e0d9 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>
2022-09-29 16:45:04 +00:00
Yiwei Zhang
2403468202 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>
2022-09-29 16:45:03 +00:00
Samuel Pitoiset
c8765c5244 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>
2022-09-29 16:22:50 +00:00
Samuel Pitoiset
bc0ff36885 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>
2022-09-29 16:22:50 +00:00
Samuel Pitoiset
6000e3f534 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: 0feab7b9cf ("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>
2022-09-29 16:02:41 +00:00
Mike Blumenkrantz
56fb258064 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>
2022-09-29 15:29:51 +00:00
Mike Blumenkrantz
5bc19dd5f7 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>
2022-09-29 15:29:51 +00:00
Corentin Noël
1b685dc350 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>
2022-09-29 15:06:29 +00:00
Corentin Noël
086b620793 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>
2022-09-29 15:06:29 +00:00
Samuel Pitoiset
a63a31a47b 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>
2022-09-29 14:44:47 +00:00
Connor Abbott
1ca8930845 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>
2022-09-29 10:47:52 +00:00
Connor Abbott
0b131b3e99 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>
2022-09-29 10:47:52 +00:00
Connor Abbott
5af6dad179 Revert "freedreno,ir3: rename Z_CLAMP_ENABLE to Z_CLIP_DISABLE"
This reverts commit 6cb41c5188. 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>
2022-09-29 10:47:52 +00:00
Mike Blumenkrantz
7308996921 lavapipe: dynamic state3
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
2022-09-29 05:00:10 +00:00
Jason Ekstrand
092be5a329 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>
2022-09-29 05:00:10 +00:00
Jason Ekstrand
1deb83fb86 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>
2022-09-29 05:00:10 +00:00
Jason Ekstrand
1fee04d8ff 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>
2022-09-29 05:00:10 +00:00
Jason Ekstrand
9d0ed9cbcc 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>
2022-09-29 05:00:10 +00:00
Jason Ekstrand
effd9962d9 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>
2022-09-29 05:00:10 +00:00
Jason Ekstrand
10bc2cd3ae 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>
2022-09-29 05:00:10 +00:00