Jason Ekstrand
26a4c8f375
clover/nir: Use nir_var_mem_constant for __constant memory
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:04 +00:00
Jason Ekstrand
dfa63f2656
llvmpipe: Add support for load_global_constant
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:04 +00:00
Jason Ekstrand
4087b5343d
nouveau/nir: Implement load_global_constant
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:04 +00:00
Jason Ekstrand
ff2f44d865
intel/fs: Implement nir_intrinsic_load_global_constant
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:04 +00:00
Jason Ekstrand
1bdf850638
spirv: Use nir_var_mem_constant for UniformConstant data in CL
...
For now, we leave the constant_as_global option intact and get rid of
the UBO path which no one upstream is using today.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:04 +00:00
Jason Ekstrand
bb8d8ba9c7
nir: Allow opt_large_constants to be run with constant_data_size > 0
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:04 +00:00
Jason Ekstrand
4360a8a2b3
nir/lower_io: Add support for nir_var_mem_constant
...
This commit adds support for nir_var_mem_constant various places. It
also adds a pass similar to nir_lower_vars_to_explicit_types except it
also scrapes out the constants and stuffs them into constant_data.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:03 +00:00
Jason Ekstrand
ef142c68e1
nir/lower_io: Add a build_addr_for_var helper
...
The new version is more verbose but also more extensible.
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:03 +00:00
Jason Ekstrand
965c268865
nir/lower_io: Use the variable mode for load_scratch_base_ptr checks
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:03 +00:00
Jason Ekstrand
ff124e3fe3
nir: Add a load_global_constant intrinsic
...
This has the same semantics as load_global except the memory it reads is
known to be constant so load_global_constant intrinsics can be CSEd
rather than relying on more complex copy-propagation.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:03 +00:00
Jason Ekstrand
e4f07f8bdc
nir: Add a new nir_var_mem_constant variable mode
...
Reviewed-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:03 +00:00
Karol Herbst
b9927c8c8d
nir/serialize: fix serialization of system values
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6545 >
2020-09-01 14:55:05 -05:00
Karol Herbst
5c45eaf9b3
clover/spirv: fix vec3 alignment
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
6e52c6dfcc
nvc0/cl: hande 64 bit pointers in nvc0_set_global_handle
...
clover gives us a uint32_t pointer into the kernel input bufffer, but also
for actual 64 bit pointers, so we can just use memcpy instead.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
5eacaa95a7
spirv: fix 64 bit atomic inc and dec
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstran.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
1c9efcd7a6
nvc0/ir: fix load propagation for sub 4 byte addressing
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
036f1c29fc
clover/llvm: undefine __IMAGE_SUPPORT__ for devices without image support
...
libclang seems to define this on its own for SPIR targets, but the CTS
requires it to be not set if the device doesn't support images.
The SPIRV-LLVM-Translator also requires the spir triple to be set so we
can't really do anything else except to undefine.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstran.net >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
7dc39838ed
clover/nir: use offset for temp memory
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
d7b65cf7d3
nv50/ir: fix cas lowering for 64 bit
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
d421af3a99
clover/nir: Lower function_temp to scratch.
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Eric Engestrom
8e259dad4c
egl/x11: simplify dri2_initialize_x11()
...
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353 >
2020-09-01 18:31:51 +00:00
Eric Engestrom
bd385c424b
egl/wayland: simplify dri2_initialize_wayland()
...
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353 >
2020-09-01 18:31:51 +00:00
Eric Engestrom
f7e0cdcf1a
egl/surfaceless: simplify dri2_initialize_surfaceless()
...
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353 >
2020-09-01 18:31:51 +00:00
Eric Engestrom
83b5c1abc6
egl/android: simplify dri2_initialize_android()
...
eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353 >
2020-09-01 18:31:51 +00:00
Jason Ekstrand
cccb497d3c
intel/fs: Fix MOV_INDIRECT and BROADCAST of Q types on Gen11+
...
The immediate case is pretty uncommon to see but it can happen, in
theory. BROADCAST is typically used to uniformize values and those are
usually 32-bit. However, it does come up in some subgroup ops.
Fixes: 49c21802cb "intel/compiler: Split has_64bit_types into float/int"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6211 >
2020-09-01 13:25:20 -05:00
Karol Herbst
70cbddc4a7
nir: use enum operator helper for nir_variable_mode and nir_metadata
...
those are used quite a bit
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6520 >
2020-09-01 17:45:08 +00:00
Karol Herbst
76a1fb3b42
util: add helpers to define bitwise operators on enums for C++
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6520 >
2020-09-01 17:45:08 +00:00
Karol Herbst
24dfd798d6
nir: use nir_var_all to get rid of casting
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6520 >
2020-09-01 17:45:08 +00:00
Jason Ekstrand
15da983653
nir: Improve the comment on num_inputs and friends
...
This doesn't fix the problem that no one knows what any of these mean
half the time but it at least makes them better documented to hopefully
make people's expectations more accurate.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6524 >
2020-09-01 17:30:51 +00:00
Jason Ekstrand
4d18e71fea
nir: Rename num_shared to shared_size
...
This one is always a size in bytes.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6524 >
2020-09-01 17:30:51 +00:00
Jason Ekstrand
471f260ef3
spirv: Delete some dead workgroup variable handling code
...
This is dead since 5ed4e31c08 .
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6524 >
2020-09-01 17:30:51 +00:00
Rhys Perry
1459cce7ec
spirv: add some tests for volatile/available/visible
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Jason Ekstrand
fb6b243c11
spirv: Support big-endian strings
...
This should be all that's required for the SPIR-V parser to work in
big-endian systems. SPIR-V requires that everything be in host
byte-order except for strings which are always little-endian.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Rhys Perry
a8d8fbb9ce
spirv: implement SpvMemoryAccessVolatileMask
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Rhys Perry
f81e1d2824
spirv: implement Volatile image operand
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Rhys Perry
2ba3ffa76c
spirv: implement Volatile memory semantic
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Rhys Perry
23bfba8663
spirv: implement MakePointerAvailable/MakePointerVisible for OpCopyMemory
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Rhys Perry
e01d1a9f16
spirv: add vtn_emit_make_{visible,available}_barrier helpers
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Rhys Perry
b85c38a86f
spirv: make OpLoad/OpStore visibility/availablity barriers acquire/release
...
I think these are needed to order the visibility/availability operation
with the access.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Rhys Perry
5b92392c48
spirv: fix Uniform and Output MemoryAccessMakePointer{Visible,Available}
...
The Uniform storage class can be used for SSBOs. This should also fix make
available/visible for the Output storage class.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Boris Brezillon
857b9c5027
spirv: Add a vtn_get_mem_operands() helper
...
Add a vtn_get_mem_operands() helper to extract memory operand attached
to load/store operations.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090 >
2020-09-01 17:15:22 +00:00
Sagar Ghuge
959539fbbd
intel/isl: Drop unnecessary check on 16bpp depth format
...
Drop unnecessary check which allows enabling of lossless write through
compression (HiZ + CCS) for D16_UNORM format on Gen12+.
We had misleading HSD information previously which used to claim that
compression can not be supported for 16bpp format. Although BSpec does
not have any restriction for D16_UNORM format.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6485 >
2020-09-01 17:05:50 +00:00
Lionel Landwerlin
829699ba63
anv: implement shareable timeline semaphores
...
This implements timeline semaphores using a new type of dma-fence
stored into drm-syncobjs. We use a thread to implement delayed
submissions.
v2: Drop cloning of temporary semaphores and just transfer their ownership (Jason)
Drain queue when dealing with binary semaphore
Ensure we don't submit to the thread as long as we don't need to
v3: Use __u64 not uintptr_t for kernel pointers
Fix commented code for INTEL_DEBUG=bat
Set DRM_I915_GEM_EXECBUFFER_EXT_TIMELINE_FENCES in timeline fence execbuf extension
Add new anv_queue_set_lost()
Drop multi queue stuff meant for the fake multi queue patch
Rework temporary syncobj handling
Don't use syncobj when not available (DeviceWaitIdle/CreateDevice)
Use ANV_MULTIALLOC
And a few more tweaks...
v4: Drop drained condition helper (Lionel)
Fix missing EXEC_OBJECT_WRITE on BOs we want to wait on (Jason)
v5: Add missing device->lost_reported in _anv_device_report_lost (Lionel)
Fix missing free on submit->simple_bo (Lionel)
Don't drop setting the device in lost state on QueueSubmit error (Jason)
Store submit->fence_bos as an array of uintptr_t (Jason)
v6: condition device->has_thread_submit to i915 & core DRM support (Jason)
v7: Fix submit->in_fence leakage on error (Jason)
Keep dummy semaphore with no thread submission (Jason)
v8: Move ownership of submit->out_fence to submit (Jason)
v9: Don't forget to read the VkFence's syncobj binary payload (Lionel)
v10: Take the mutex lock on anv_gem_close() (Jason/Lionel)
v11: Fix void* -> u64 cast on 32bit (Lionel)
v12: Rebase after BO backed timeline semaphore (Lionel)
v13: Fix missing snippets lost after rebase (Lionel)
v14: Drop update_binary usage (Lionel)
v15: Use ANV_MULTIALLOC (Lionel)
v16: Fix some realloc issues (Ivan)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net > (v8)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2901 >
2020-09-01 16:40:11 +00:00
Lionel Landwerlin
a965ffad21
anv: add new gem/drm helpers
...
Needed for dealing with the new DRM timeline syncobj ioctls.
v2: Make use of the anv_gem_get_drm_cap() parameter... (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2901 >
2020-09-01 16:40:11 +00:00
Lionel Landwerlin
a0c07e41e5
include/drm-uapi: bump headers
...
From drm-next at the following commit :
commit 3393649977f9a8847c659e282ea290d4b703295c
Merge: cbc2e82932ae ced026e959be
Author: Dave Airlie <airlied@redhat.com >
Date: Fri Aug 28 13:51:30 2020 +1000
Merge tag 'drm-intel-next-2020-08-24-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2901 >
2020-09-01 16:40:11 +00:00
Jonathan Marek
a6291b1b11
freedreno/ir3: rework setup_{input,output} to make struct varyings work
...
Rework setup_{input,output} to be called during emit_intrinsic, in a way
which allows struct/array/matrix type varyings to work.
This allows turnip to pass dEQP-VK.glsl.linkage.varying.struct.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6181 >
2020-09-01 15:10:47 +00:00
Jonathan Marek
c694af40bf
freedreno/ir3: improve handling of aliased inputs
...
This allows overlapping inputs, which is required for the next patch which
makes it so setup_input may be called multiple times for each input.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6181 >
2020-09-01 15:10:47 +00:00
Jonathan Marek
acb6163d5e
freedreno/ir3: remove indirect input load
...
nir_intrinsic_load_input should only be used with VS and FS, indirect input
shouldn't be possible for those.
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6181 >
2020-09-01 15:10:47 +00:00
Bas Nieuwenhuizen
00973542ff
radv: Allow triggering thread traces by file.
...
Makes it actually feasible to trace games and not just demos/apitraces.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6537 >
2020-09-01 14:19:51 +00:00
Bas Nieuwenhuizen
0d862da170
radv: Centralize enabling thread trace.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6537 >
2020-09-01 14:19:51 +00:00