Icecream95
ec70291da9
panfrost: Stop using sparse_array for batch BOs
...
Iterating over a util_sparse_array is very expensive; replace this
with a standard dynarray.
Using the sparse 'nodearray' datastructure instead was tested, but
found to be slower in some cases.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16988 >
2022-06-14 23:44:02 +00:00
Connor Abbott
169e03800d
tu: Implement VK_EXT_color_write_enable
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16936 >
2022-06-14 23:18:17 +00:00
Connor Abbott
94be0dd0b8
tu: Implement extendedDynamicState2LogicOp
...
Because this impacts most of the registers in the BLEND draw state, we
make the entire draw state dynamic so that it all gets re-emitted when
the logicOp changes. This also lays the groundwork for
VK_EXT_color_write_enable.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16936 >
2022-06-14 23:18:17 +00:00
Connor Abbott
c23eb99357
tu: Fix partial-write LRZ determination
...
There were a few problems with this:
- It wasn't considering logic op at all, which is another source of
reading from the destination.
- It was conditioned on the blend_enable_mask, so it was missing the
case where there's no blending but some of the outputs were masked
out.
- It wasn't considering attachments with less than 4 components (for
example, normals in a typical deferred rendering setup) and would
always consider them partially written unless the user added extra
unnecessary components.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16936 >
2022-06-14 23:18:17 +00:00
Boris Brezillon
b3b53952b0
dzn: Vulkan 1.1 wants maxPerSetDescriptors >= 1024
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
59a6ddd85c
dzn: Implement GetDescriptorSetLayoutSupport()
...
The 2048 descriptors limit comes from the maximum number of samplers
per heap, but the limit for other descriptors is actually much bigger.
Let's implement GetDescriptorSetLayoutSupport() to reflect that.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
1554ece8bd
dzn: Add a dzn_desc_type_has_sampler() helper
...
Add a dzn_desc_type_has_sampler() helper instead of duplicating
the SAMPLER || COMBINED_IMAGE_SAMPLER test everywhere.
Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
fb52be9376
dzn: Lower alignment requirements when allocating buffers or single-sample images
...
VkMemoryDedicatedAllocateInfo, when present, provides us with extra
information about the memory usage, which allow us to lower the alignment
requirements.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
96a7f81072
dzn: Check that no export is requested in the memory allocation path
...
We don't support exporting memory objects yet, so let's make sure the
user doesn't request that.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
8c23d9db0b
dzn: Add dummy {Create,Destroy}SamplerYcbcrConversion() implementations
...
We don't support Ycbcr sampler conversion. Add dummy implementations to
make us Vulkan 1.1 compliant.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
439b1fc8e8
dzn: Add a dummy GetImageSparseMemoryRequirements2()
...
We don't support sparse memory yet, but this function needs to be
present.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
cd8e322816
dzn: Add a dummy GetDeviceGroupPeerMemoryFeatures()
...
We don't support device groups, but Vulkan 1.1 requires a
GetDeviceGroupPeerMemoryFeatures() implementation, so let's just
advertise no peer-memory features.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
cc7158fe2f
dzn: Return empty external properties
...
We don't support importing/exporting images yet, so let's zero out the
whole external properties struct, if present.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
fa79d036f1
dzn: Decorrelate external image info and external image properties
...
One can be present without the other.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
cd4bc4893b
microsoft/compiler: Support load_sample_id_no_per_sample
...
It's like load_sample_id except it shouldn't force per-sample shading
when not already enabled. In that case, we simply return 0.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
65309dab45
microsoft/compiler: s/assert()/unreachable()/ in emit_intrinsic()
...
Use an unreachable() statement instead of the incorrect assertion in the
unsupported intrinsic path.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
82d3433d2a
microsoft/compiler: Set typed_uav_load_additional_formats when appropriate
...
This flag should be set to true when the RWTexture is attached a vector,
and we always declare a vec4 right now, so it should always be true.
Might be worth reworking the dxil_module_get_res_type() to use a scalar
when the image only has one component.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
303175cfec
microsoft/compiler: Images are no longer reprensented by uniform vars
...
emit_barrier_impl() was still checking the nir_var_uniform flag to
detect images, which is no longer correct.
Fixes: cfdc7ee066 ("spirv: Use nir_var_mem_image")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
cdbc8a8c85
spirv: Add a dst/src type to image deref loads/stores coming from OpAtomic{Load,Store}
...
nir_to_dxil() uses those types to pick the right operation overload,
and atomic loads/stores are no different from their non-atomic
counterpart apart from the atomicity property, so it makes sense to
pass a type to the deref_{load,store} intrinsic in that case too.
Suggested-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Boris Brezillon
b78d3ebe72
vulkan/util: Fill VkPhysicalDeviceIDProperties::deviceNodeMask
...
This field copy was missing in
vk_get_physical_device_core_1_1_property_ext().
Fixes: 19ff5019b7 ("vulkan: Add helpers for filling exts for core features and properties.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16926 >
2022-06-14 22:44:42 +00:00
Mike Blumenkrantz
b240be28e3
zink: check for pending clears to determine write status of zs attachments
...
as @Venemo discovered, zs layouts were being incorrectly set to readonly
in the case where the attachment was only used for an explicit clear,
so ensure that gets taken into account
cc: mesa-stable
fixes (radv):
dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_clear
dEQP-GLES31.functional.stencil_texturing.render.depth32f_stencil8_clear
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17033 >
2022-06-14 20:58:55 +00:00
Jose Maria Casanova Crespo
901f5e6a31
v3dv/ci: increase fraction to 10 on v3dv ci jobs.
...
We reduce the v3dv ci jobs time execution from ~20min to
8-11 min.
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17026 >
2022-06-14 20:33:34 +00:00
Mike Blumenkrantz
8c0f3cdfac
zink: clamp dynamic renderArea to framebuffer size
...
it's illegal to have a renderArea larger than the attachments, so perform
clamping to avoid that scenario
Fixes: c81cd989c8 ("zink: use dynamic rendering (most of the time)")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16947 >
2022-06-14 20:12:46 +00:00
Mike Blumenkrantz
87c7e75721
zink: fix cubemap lowering bit size
...
this isn't always 32
Fixes: 2d745904ca ("zink: add a gently mangled version of the d3d12 cubemap -> array compiler pass")
fixes:
dEQP-GL45-ES31.functional.program_uniform.by_pointer.render.struct_in_array.sampler2D_samplerCube_*
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17008 >
2022-06-14 19:57:40 +00:00
Mike Blumenkrantz
de6af39534
zink: fix cubemap lowering for array samplers
...
each sampler is 1 driver location, so use the base variable
Fixes: 2d745904ca ("zink: add a gently mangled version of the d3d12 cubemap -> array compiler pass")
fixes:
dEQP-GL45-ES31.functional.shaders.opaque_type_indexing.sampler.const_expression.*.samplercubearray
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17008 >
2022-06-14 19:57:40 +00:00
Mike Blumenkrantz
876bfb6bc3
zink: skip some emulated cube code if the extension is present
...
cuts down on some cpu overhead
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16944 >
2022-06-14 19:35:42 +00:00
Mike Blumenkrantz
d8b4ceb27a
zink: rename nonseamless struct members to emulate_nonseamless
...
make it clearer that this is separate from the gallium state
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16944 >
2022-06-14 19:35:42 +00:00
Mike Blumenkrantz
08858070b1
zink: use VK_EXT_non_seamless_cube_map when available
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16944 >
2022-06-14 19:35:42 +00:00
Mike Blumenkrantz
616773e62b
zink: hook up VK_EXT_non_seamless_cube_map
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16944 >
2022-06-14 19:35:42 +00:00
Mike Blumenkrantz
03d7f31054
zink: don't print VK_EXT_shader_atomic_float warning for nir_intrinsic_image_deref_atomic_exchange
...
this is covered by base spec and doesn't require the extension
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010 >
2022-06-14 19:21:15 +00:00
Mike Blumenkrantz
d8877437d6
zink: avoid uninit values in renderpass state
...
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010 >
2022-06-14 19:21:15 +00:00
Mike Blumenkrantz
4c908e3d7b
zink: only add necessary binds during dmabuf export
...
SHARED might only be present, so add it conditionally
Fixes: 4eeabb59f5 ("zink: rebind resources for export as needed")
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010 >
2022-06-14 19:21:15 +00:00
Mike Blumenkrantz
44cf6f7564
zink: fix generated tcs deletion
...
deleting the generated shader on the first loop iteration like this was
broken if the shader was used in multiple programs, so delete at the end
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010 >
2022-06-14 19:21:15 +00:00
Mike Blumenkrantz
cf34d3fe05
zink: unset generated tcs pointer from tes on deletion
...
otherwise this will free the generated tcs multiple times if the tes
is used by multiple programs
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010 >
2022-06-14 19:21:15 +00:00
Mike Blumenkrantz
c36c5ff057
zink: use the patch_vertices value from the shader key, not the context
...
ctx shouldn't be used here unless necessary
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010 >
2022-06-14 19:21:15 +00:00
Mike Blumenkrantz
338d986439
zink: fix generated tcs update path
...
is_generated is in a union with the generated tcs pointer for tes shaders,
so check the shader stage too
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010 >
2022-06-14 19:21:15 +00:00
Mike Blumenkrantz
336b5c8823
zink: fix dynamic stride conditional in pipeline creation
...
if dynamic stride isn't used then this struct member must be filled
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17010 >
2022-06-14 19:21:15 +00:00
Louis-Francis Ratté-Boulianne
ac34866166
dzn: Allow some non-native formats to be used as vertex inputs
...
This requires shader-side lowering, which is handled in
dxil_nir_lower_vs_vertex_conversion().
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15955 >
2022-06-14 17:42:51 +00:00
Louis-Francis Ratté-Boulianne
b53f9011b1
microsoft/compiler: Add support for more scaled formats
...
Lower 8 and 16 bit scaled formats to integer formats.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15955 >
2022-06-14 17:42:51 +00:00
Louis-Francis Ratté-Boulianne
b0b9b50077
d3d12: Move d3d12_nir_lower_vs_vertex_conversion() to a common place
...
So we can re-use it in dozen.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15955 >
2022-06-14 17:42:51 +00:00
Jesse Natalie
c378bbab75
mesa: Use C11 alignas for cross-platform SSE support
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:38 +00:00
Erik Faye-Lund
8fbad5e42f
gallium: clean up PIPE_ALIGN_STACK-definition
...
There's really just one case where this is supported; on GCC for x86.
All other cases do nothing, so let's remove the complexity that is no
longer needed.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:38 +00:00
Erik Faye-Lund
d1349eb500
gallium: remove unused macros
...
These aren't used, so let's remove them.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:38 +00:00
Erik Faye-Lund
ea7ba77be9
gallium: remove repeated check
...
This is already inside an "#if defined(__GNUC__)" conditional, there's no
need to repeat the __GNUC__-check.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:38 +00:00
Erik Faye-Lund
1b53fb625e
gallium: use c++11 alignas instead of PIPE_ALIGN_VAR
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:38 +00:00
Erik Faye-Lund
04ca04ba46
gallium: use c11 alignas instead of PIPE_ALIGN_VAR
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:38 +00:00
Erik Faye-Lund
69d2d38f6e
llvmpipe: use c11 alignas instead of PIPE_ALIGN_VAR
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:38 +00:00
Erik Faye-Lund
3c82e23f9a
gallium: reorganize includes
...
There's no reason to have standard includes in two different sections of
the header, let's merge them. While we're at it, let's sort the includes
as well.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:38 +00:00
Erik Faye-Lund
d791184b46
gallium: remove stale comment
...
This hasn't been true for a long time, let's remove the comment.
Fixes: 0d4898ae80 ("include,gallium: Remove pre-MSVC 2013 compatibility.")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:37 +00:00
Erik Faye-Lund
e3bc78b8e3
util: use c11 alignas instead of rolling our own
...
Due to how alignas is defined, it itsn't allowed to use it on a struct,
it needs to be used on the first member instead. So move the declaration
in those cases.
This still leaves the ALIGN16 macro using compiler-specific directives,
because it's a lot of work to untangle the above. This probably deserves
its own MR.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16908 >
2022-06-14 15:08:37 +00:00