Commit Graph

142033 Commits

Author SHA1 Message Date
Danylo Piliaiev c0f623e62f glsl: Prohibit implicit conversion of mem parameter in atomicOP functions
Per OpenGL Shading Language, section 8.11. "Atomic Memory Functions"
first argument "mem" of all atomicOP functions is inout.
The same is true for ARB_shader_storage_buffer_object and
GL_INTEL_shader_atomic_float_minmax

For implicit conversion of inout parameters it is required for type
to support bi-directional conversion, since there is no such types
in glsl - implicit conversion is effectively prohibited.

Alternatively we could have marked atomic_var parameter of built-in
atomicOP functions as inout, however it opens another can of worms
during NIR lowerings.

Fixes: ea0a1f5beb
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2837
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4887>
2021-07-05 18:29:51 +03:00
Mike Blumenkrantz 5c77f99c2e zink: ci updates for wideline fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11041>
2021-07-05 14:14:40 +00:00
Mike Blumenkrantz 3292a9d660 lavapipe: wideLines support
easy enough

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11041>
2021-07-05 14:14:40 +00:00
Tomeu Vizoso 1e23004600 panvk: Add vkEvents support
Use syncobjs to implement vkEvents (as suggested by Boris).

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11709>
2021-07-05 15:08:05 +02:00
Tomeu Vizoso 5defffaa4d panfrost: Specify alignment for the Job Header descriptor
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11709>
2021-07-05 15:08:05 +02:00
Tomeu Vizoso 5997f18d8a panvk: Make panvk_queue_transfer_sync more generic
Have it accept a syncobj so it can be used in a future commit.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11709>
2021-07-05 15:08:05 +02:00
Tomeu Vizoso 839eeaf306 panvk: Support calls to CreateDescriptorSetLayout without bindings
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11709>
2021-07-05 15:08:05 +02:00
Rohan Garg bff39be64d ci: Don't artifact rendered images when job succeeds
Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11088>
2021-07-05 11:39:08 +00:00
Samuel Pitoiset 585332caf8 ci: remove few CTS that are now skipped with RADV
Some expected list of failures were actually outdated.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11712>
2021-07-05 12:07:45 +02:00
Samuel Pitoiset 32e4552ca5 ci: update list of expected failures against CTS 1.2.6.2 for RADV
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11712>
2021-07-05 12:07:41 +02:00
Mike Blumenkrantz 9fbf6b2abf lavapipe: implement VK_EXT_line_rasterization
rectangular and strict lines aren't supported in this, and multisampling
must be disabled for correct line rasterization

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11066>
2021-07-05 07:14:29 +00:00
Mike Blumenkrantz 73ad0bcfd8 lavapipe: store the geometry shader prim type to render state
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11066>
2021-07-05 07:14:29 +00:00
Mike Blumenkrantz fba6dafb9f lavapipe: store whether the geometry shader outputs GL_LINES
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11066>
2021-07-05 07:14:29 +00:00
Tomeu Vizoso 9a0e0af497 panvk: Add VkCommandPool support
Mostly just copied from turnip.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon d629debaca panvk: Support returning BOs allocated by panvk_pool to a 'free BO' pool
So all CommandBuffers in a given CommandPool can reuse BOs for their
memory pools.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Tomeu Vizoso d33a3fad64 panfrost: Fork pan_pool for Gallium and Vulkan
This commit adds the actual implementations, allowing to diverge while
still sharing code that depends on pool functionality.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon deb4074a54 panfrost: Start splitting the panfrost pool logic
The Gallium and Vulkan drivers will soon use different memory pool
implementation, but some pieces in libpanfrost depend on pan_pool. Let's
split the implementation so we have common bits still available while
letting the drivers implement what really matters: the allocation logic.

All the generic pieces are prefixed pan_pool, and what will become the
gallium implementation is prefixed panfrost_pool. We'll then duplicate
the panfrost_pool bits in panvk and prefix it with panvk_pool, and
implementations will start diverging from there.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon 4f0896ea4f panvk: Use the desc alloctor when we can
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon d873045b07 panfrost: Allocate WRITE_VALUE jobs with panfrost_pool_alloc_desc()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon 55ec3596f5 panfrost: Add alignment info to write-value and cache-flush jobs
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon dea0c4ddd8 panfrost: Pass a memory pool to pan_blit_ctx_init()
Pass a memory pool to pan_blit_ctx_init() instead of creating a new pool.
Useful for Vulkan since the descriptor pool is at the command buffer
level and is thus shared by all blit batches. Doing this will save us a
BO ownership transfer.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Boris Brezillon 3cdbc1e8c0 panfrost: Don't add blit context BOs twice
The transient_bo has already been added to the BO list, no need to call
panfrost_batch_add_bo() a second time on the same BO.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11695>
2021-07-05 05:43:49 +00:00
Dave Airlie b4d87a34c7 crocus: restrict prim_restart on index buffer check to pre-hsw
This code has no use on hsw or chv

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 15:03:48 +10:00
Dave Airlie 6909b4a75a crocus: reorder version checks on indirect xfb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 15:03:48 +10:00
Dave Airlie 063d7bfa1c crocus: inline group_index<->bti
this is on a fastpath for ubo emission

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 15:03:48 +10:00
Dave Airlie be5bb3146a crocus: optimise bo_unref path a little.
This just splits it into the atomic/non-atomic paths

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 15:03:48 +10:00
Dave Airlie a907e29a3e crocus: don't update draw parameters unless needed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 15:03:48 +10:00
Dave Airlie 1d438c11c8 crocus: inline the d/s resource handling functions
These are pretty simple, so inlining is fine and helps drawoverhead

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707>
2021-07-05 14:47:30 +10:00
Dave Airlie f19f3f5496 draw/tess: write correct primitive id into vertices
The code was using a prim assembler after the tess stage, however
tess prims aren't necessarily the output prim types, so just put
the prim ids into the vertices at tess stage, and skip prim assembly.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11000>
2021-07-05 14:07:39 +10:00
Dave Airlie 45d9e8bb99 draw: fix tessellation output vertex size calculation
This ensures space for the extra outputs is calculated in the
tes vertex outputs.

dEQP-VK.pipeline.misc.primitive_id_from_tess

Fixes: dacf8f5f5c ("draw: hook up final bits of tessellation")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11000>
2021-07-05 14:07:34 +10:00
Dave Airlie 0aab06e6d3 crocus: fixup index buffer dirtying.
This fixes a possible problem if a non-indexed draw comes in first
in a new batch, then the batch might not emit the index buffer.

I'm unsure if we see this, I just spotted it trying to fix alacritty

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11705>
2021-07-05 12:45:13 +10:00
Dave Airlie 32b8d47306 crocus: fix crash on index buffer rebinding.
This was crashing in plasmashell.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11704>
2021-07-05 01:47:32 +00:00
Dave Airlie d41992c241 crocus/gen5: enable support for GL_EXT_gpu_shader4
There has been a few requests for this and I've got patches for glamor
to use this to speed up the paths that use GLSL 1.30 now.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11693>
2021-07-05 06:56:18 +10:00
Dave Airlie c71daec260 crocus: expose ARB_blend_func_extended on gen 45/50
In theory the docs say 965gm can support this but the original
965 can't, but we can't distinguish that yet.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11693>
2021-07-05 06:56:15 +10:00
Dave Airlie 64f65fe8a8 crocus: cleanup some deadcode in the gen5 blend emit
The rt->blend_enable is always 1 at this point, and the gen5
specific code isn't being used anymore, it just looked like it
was.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11693>
2021-07-05 06:56:11 +10:00
Thomas H.P. Andersen ffea622604 nir/ifind_msb_rev: fix input check
ifind_msb_rev was introduced in a5747f8ab3.

ifind_msb_rev guards against src0 being both 0 or -1 at the same time.
That is always true. This patch changes it to check for those values
individually.

Spotted from a compile warning.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

Fixes: a5747f8ab3 (\"nir: add opcodes for *find_msb_rev and lowering\")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11630>
2021-07-04 12:17:58 +00:00
Dave Airlie 4504fabed6 iris: make iris_bind_reserve_3d and Wa_1604061319 only check for dirty render bindings
+    9.31%  drawover:gdrv0  iris_dri.so      [.] iris_binder_reserve_3d

+    2.36%  drawover:gdrv0  iris_dri.so         [.] iris_binder_reserve_3d

If the app never uses compute, then the compute bindings bit will always
be dirty causing these two paths never get shortcuts.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11699>
2021-07-03 23:37:57 -07:00
Icecream95 c246af0dd8 panfrost: Only upload UBOs when needed
If all of the used values from a UBO are pushed, it doesn't need to be
uploaded.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11700>
2021-07-03 13:23:29 +00:00
Icecream95 b8a7355c03 pan/mdg: Create a mask of UBOs that need to be uploaded
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11700>
2021-07-03 13:23:29 +00:00
Icecream95 aa11c0307a pan/bi: Create a mask of UBOs that need to be uploaded
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11700>
2021-07-03 13:23:29 +00:00
Icecream95 d0e90c336d panfrost: Don't set dirty_mask for constant buffers
It is unused.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11700>
2021-07-03 13:23:29 +00:00
Zoltán Böszörményi f94c796741 crocus: Make the driver loader use PCI IDs for crocus
Add PCI IDs based in pci_ids/i965_pci_ids.h and move crocus before
iris in driver_map[].

This allows Xorg to load the crocus driver since iris would claim
the devices handled by crocus (because the i915 kernel driver is
used for all Intel devices) then fail during initialization.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11694>
2021-07-03 06:34:33 +02:00
Zoltán Böszörményi e309d1a3a3 crocus: Add pipe loader driver
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11694>
2021-07-03 06:34:20 +02:00
Kenneth Graunke 469875596a vulkan/wsi: Fix prime blits to use system memory for the destination
The intention here was to pass VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT to
select_memory_types() when requesting device local memory, or simply
pass 0 for the prime blit destination which should be in system memory.

Unfortunately, that meant we did (type.propertyFlags & 0) == 0 which
was vacuously true, causing us to not filter out device local types.

Fixes hybrid display of Vulkan apps on Intel TGL+DG1 systems.

Tested-by: Luis Felipe Strano Moraes <luis.strano@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11680>
2021-07-02 23:35:57 +00:00
Emma Anholt c656c5f055 i915g: Make sure the 1D texture Y channel is initialized.
Even with the wrap mode forced to REPEAT, we get undefined results in
CelShading when the Y channel is unwritten since the beginning of the
program.

I dropped the coords==0 case in the process, since that's not possible and
made the 1D case confusing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11457>
2021-07-02 21:18:07 +00:00
Emma Anholt d0ac174fda i915g: Force 1D textures to use wrap mode for the Y coordinate.
There are no 1D textures in HW, so we use 2D, but at the shader level
there no Y coordinate to 1D sampling, so we need that value to be ignored.
WRAP mode can get us that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11457>
2021-07-02 21:18:07 +00:00
Adam Jackson 9cc4ce16fd meson: Make prefer-{crocus,iris} always take effect
As written this would require that the driver be built before we looked
at the option. This is wrong because it affects code outside of the
driver, it's in libGL's PCI ID table. This is sort of harmless for
crocus at the moment, but for iris you would need to build it in order
to remove it from the table; if you built just i965 and tried to run it
against gen9, the libGL you just built would direct the loader to the
iris driver you just didn't, and setup would fail, which is: goofy.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11655>
2021-07-02 19:18:42 +00:00
Kenneth Graunke 6e55890b6c iris: Delete unused bo->cache_coherent flag
This was used in the heuristics for deciding whether to CPU map,
but those have since been deleted, so this is now unused.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11644>
2021-07-02 19:06:01 +00:00
Kenneth Graunke a313bd7845 iris: Fail BO allocation if we can't enable snooping properly.
If the caller has asked for a coherent BO with snooping, and the kernel
fails to set it for whatever reason, we were happily returning them a
non-coherent buffer.  This isn't what they wanted and could lead to
surprising results.

Better to simply fail the allocation.  Probably.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11644>
2021-07-02 19:06:01 +00:00
Kenneth Graunke 803a2a9b3d iris: Stop calling I915_GEM_SET_CACHING on discrete GPUs
On integrated GPUs without LLC, we enable snooping when someone requests
coherency for a buffer.  (With LLC, it's already coherent.)

For discrete GPUs...if someone requests coherency, we allocate the
buffer in SMEM and resort to WC maps rather than WB maps with CPU
caches enabled.  There's no snooping to enable, and calling this ioctl
is nonsensical, and may fail.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11644>
2021-07-02 19:06:01 +00:00