Alyssa Rosenzweig
d42bb650b3
asahi: Add get_query_address helper
...
This is the counterpart of get_oq_index for non-occlusion hardware queries.
These are not tracked with occlusion queries, since occlusion query allocations
are limited, and they are not based on indexing but rather general
batch-allocated space.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
a620e86f35
asahi: Add non-occlusion query tracking
...
For other GPU queries, handled similarly.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
9845814c98
asahi: Sync when beginning a query
...
Otherwise batch->writer might be non-null. Fixes Piglit occlusion_query_conform
(which I think regressed when we added proper syncing).
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
a13f233219
asahi: Only touch batch->occlusion_queries for occlusion
...
We will soon have other types of queries with non-null writers.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
dfde9345d7
asahi: Refactor agx_get_query_result
...
In preparation for other types of GPU queries.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
e5dd053640
asahi: Simplify occlusion query batch tracking
...
Yes, this means we now lie to the app. There's nothing more in the spirit of
dumb OpenGL features than lying!
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
e72facab9a
asahi: Generalize query logic
...
We will need to do the same flushing dance for non-occlusion GPU queries.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
542a317a12
agx: Use 16-bit reg for pixel_coord
...
Mistake during IR translation, this is 16-bit in NIR.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
58efa64c5c
asahi: Preserve atomic ops when rewriting image to bindless
...
Bug fix on its own, and prevents regressions from using bindless more.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
8ae3eebba4
agx: Clear image_array after lowering
...
We lower to access to a non-array 2D image, so we need to update the image_array
flag when we lower or otherwise we get an incorrect 2D Array store to a 2D image
which the hardware doesn't want.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
c8ea02a883
agx: Clear sample count after lowering MSAA
...
Pedantic.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
a51c3f638b
asahi: Pass layer stride in pixels, not elements
...
We do all the math in pixels and only multiply by the sample count at the end,
meaning the layer stride needs to be in terms of pixels (not samples) for
correct addressing of multisample array images in our texture lowering. This is
particularly used for lowering the multisample array stores we get from eMRT
with multisampled layered framebuffers.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
486fb75981
asahi: Use local_size from compiler directly
...
This avoids an unnecessary trip through agx_uncompiled_shader.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
6247e617c1
asahi: Report local_size from compiler
...
So we can add more shared in the compiler.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
5b3f4cf6f8
asahi/decode: Turn assert into error
...
To allow us to debug broken fetches.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
6aa1cf6e7a
asahi: Advertise OpenGL ES 3.1!
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
c8b44eb4c3
agx: Implement imul_high
...
Like umul_high. Fixes
dEQP-VK.spirv_assembly.instruction.compute.mul_extended.signed_16bit
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
cf12429c97
agx: Convert 8-bit comparisons
...
Fixes dEQP-VK.spirv_assembly.type.vec3.i8.slessthan_frag
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
72231b042c
agx: Handle b2i8
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:55 +00:00
Alyssa Rosenzweig
7590b2b39d
agx: Allow loop headers without later preds
...
These happen for loops that break after exactly 1 iteration, unconditionally.
Fixes validation splat in dEQP-VK.glsl.switch.conditional_fall_through_2_uniform_vertex
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Alyssa Rosenzweig
4dcfb681bc
agx/lower_vbo: Handle nonzero component
...
Fixes dEQP-VK.glsl.440.linkage.varying.component.vert_in.vec2.as_float_float
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Mary
0ec2183dfc
agx: Ensure to lower 1D image load/store to 2D
...
This was missing from lower_images.
This fix a good chunk of Vulkan deQP failures with 1D images.
Signed-off-by: Mary <mary@mary.zone >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Alyssa Rosenzweig
8701ad4396
agx: Don't blow up when lowering textures twice
...
Hard to avoid with GS.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Alyssa Rosenzweig
7f636a08c8
asahi: Keep drawoverhead from OOMing itself
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Alyssa Rosenzweig
c363fcbe1e
agx: Assert vertex_id, instance_id are VS-only
...
We can get them in other shaders transiently due to merging shader stages, but
they need to be lowered since the hardware versions only exist in the hardware
VS. So the compiler should never see them outside VS.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Alyssa Rosenzweig
4c36f9052b
asahi: Copy CSO stride
...
Fixes: 7672545223 ("gallium: move vertex stride to CSO")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Alyssa Rosenzweig
240ee9564b
agx: Use more barriers
...
Fixes flakiness in
KHR-GLES31.core.texture_buffer.texture_buffer_atomic_functions.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Alyssa Rosenzweig
f068ed0534
agx: Fix extraneous bits with b2b32
...
From expanding mov_imm to take a 64-bit immediate. this worked by accident
before. Fixes brief regression in
dEQP-GLES31.functional.compute.shared_var.basic_type.bvec3.
Fixes: dbd98aa24d1 ("agx: Fix 64-bit immediate moves")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Alyssa Rosenzweig
ec2ab7d771
nir: Add load_sysval_agx intrinsic
...
For merging shader stages, it will be useful to express a load from an explicit
GL "descriptor set", so we can represent things like UBO loads with merged
shaders where UBOs can come from either stage. To do so, we add an intrinsic
representing a load from the driver's uniform tables, indexed like "descriptor
sets" with "bindings".
In principle, a layered GL-on-Vulkan implementation would use literal descriptor
sets for each stage, so I feel comfortable with the analogy here.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847 >
2023-08-23 15:06:54 +00:00
Chris Spencer
bda4eb18dd
anv: Advertise Vulkan 1.3 on Android 13
...
Older versions of Android rejected newer versions of Vulkan,[1] but Android
13 devices are 'strongly recommended' to support Vulkan 1.3.[2]
[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4781
[2] https://source.android.com/docs/compatibility/13/android-13-cdd#7142_vulkan
Signed-off-by: Chris Spencer <spencercw@gmail.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24816 >
2023-08-23 14:31:26 +00:00
Alyssa Rosenzweig
b0f02973d7
panfrost/ci: Disable T720
...
Timing out and preventing merges. The lab needs to fix the devices and likely
add more coverage before this can be re-enabled.
The rest of the Panfrost/Collabora farm seems ok, it's just the T720 devices.
See https://gitlab.freedesktop.org/mesa/mesa/-/jobs/47910575 which at the time
of pushing has been waiting for t720 job to start for 45 minutes. This will
allow us to merge code today.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2023-08-23 10:26:38 -04:00
Sviatoslav Peleshko
9865e5dff4
anv: Do fast clear color initialization more delicately
...
Fixes: b4198e79 ("anv/cmd_buffer: Initalize the clear color struct for CNL+")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9464
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24768 >
2023-08-23 12:55:08 +00:00
Sviatoslav Peleshko
caa5c23e48
intel/isl: Don't over-allocate CLEAR_COLOR size to use whole cache line
...
At the time this was added to fix some test failures. But it seems that
the failures were happening due to missing cache flushes, so
this extra space is no longer neccessary.
Fixes: 37b4eacc ("intel/isl: Resize clear color buffer to full cacheline")
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24768 >
2023-08-23 12:55:08 +00:00
Georg Lehmann
6d949e18fd
aco: fix u2f16 with 32bit input
...
The vulkan spec says all conversions are correctly rounded, so if the input
is larger than the largest fp16 value, we need to return MAX_FLOAT/inf
instead of cutting off the msbs.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24826 >
2023-08-23 12:25:56 +00:00
Rhys Perry
1d29a1e2fc
aco: add adjust_bpermute_dst helper
...
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/24693 >
2023-08-23 12:36:46 +01:00
Rhys Perry
9169fbf83c
aco: clarify bpermute pseudo opcode names
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24693 >
2023-08-23 12:36:46 +01:00
Rhys Perry
8a024c985f
aco: fix p_bpermute_gfx6's exec save/restore with wave32
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24693 >
2023-08-23 12:36:46 +01:00
Rhys Perry
85957dd6e5
aco: fix p_bpermute_gfx6 with input at non-zero byte
...
Same as the other bpermute pseudo instructions.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24693 >
2023-08-23 12:36:46 +01:00
Chris Spencer
280281f8f7
anv/android: Add support for AHARDWAREBUFFER_FORMAT_YV12
...
The default MediaCodec software video decoder returns frames in this
format.
Signed-off-by: Chris Spencer <spencercw@gmail.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24388 >
2023-08-23 09:56:03 +00:00
Chris Spencer
35fddccf3f
anv/android: Fix importing hardware buffers with planar formats
...
Currently, we try to fetch the color aspect of the format and convert that
to an ISL format, which is then used to convert the pixel stride to bytes.
This does not work with planar formats because they don't have a color
aspect, and the planes can be of different sizes anyway, so may not have
the same byte stride. Change to calculate the stride individually for each
plane.
Signed-off-by: Chris Spencer <spencercw@gmail.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24388 >
2023-08-23 09:56:03 +00:00
Samuel Pitoiset
203b4054f3
aco: rework printing shader stages
...
To avoid printing "unknown" for shader object when eg. VS and TCS
are compiled separately.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24810 >
2023-08-23 09:21:33 +00:00
Samuel Pitoiset
aef257fd15
radv: advertise NV_device_generated_commands_compute
...
This extension introduces a token for implementing DGC compute, it's
only intended to be used by vkd3d-proton.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24275 >
2023-08-23 06:05:39 +00:00
Samuel Pitoiset
1a90b7a5da
radv: allow DGC on the compute queue
...
DGC cmdbuf on ACE are executed as IB1 without chaining because IB2
isn't supported on ACE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24275 >
2023-08-23 06:05:39 +00:00
Samuel Pitoiset
559da06755
radv: implement NV_device_generated_commands_compute
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24275 >
2023-08-23 06:05:39 +00:00
Samuel Pitoiset
a57fe712f7
radv: prepare radv_prepare_dgc() for DGC compute
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24275 >
2023-08-23 06:05:39 +00:00
Samuel Pitoiset
aa0ca1e1db
radv: prepare radv_get_sequence_size() for DGC compute
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24275 >
2023-08-23 06:05:39 +00:00
Samuel Pitoiset
bb82a3402a
radv: track the pipeline bind point for indirect commands layout
...
This will be used to implement DGC compute.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24275 >
2023-08-23 06:05:39 +00:00
Mike Blumenkrantz
fbf3f64c6d
zink: sanitize optimal keys
...
shader keys represent pipeline states which trigger variants, but not
all shaders are affected by certain states
this adds some sanitizing for the optimal path to ignore shader variants
which won't have any effect for the currently bound shaders, thus reducing
the number of pipelines compiled (both unoptimized and optimized)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24831 >
2023-08-23 01:39:42 +00:00
Mike Blumenkrantz
dae144aeac
zink: use the "set" optimal key for prog last_variant_hash for consistency
...
this is the key that has been set during program update for reuse
everywhere else, and everything else in the driver uses it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24831 >
2023-08-23 01:39:42 +00:00
Mike Blumenkrantz
d5157356ce
zink: don't start multiple cache jobs for the same program
...
if there's already a cache job in flight then starting a second one
is illegal
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24831 >
2023-08-23 01:39:42 +00:00