Jason Ekstrand
f0519c9cf9
anv: Stop allocating WSI event fences off the instance
...
Fixes: 16eb390834
"anv: add VK_EXT_display_control to anv driver [v5]"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3461 >
2020-01-20 22:08:52 +00:00
Jason Ekstrand
1ec84bd208
anv: Take a device in anv_perf_warn
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3461 >
2020-01-20 22:08:52 +00:00
Jason Ekstrand
cb6ea77045
anv: Take an anv_device in vk_errorf
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3461 >
2020-01-20 22:08:52 +00:00
Jason Ekstrand
70e8064e13
anv: Add an anv_physical_device field to anv_device
...
Having to always pull the physical device from the instance has been
annoying for almost as long as the driver has existed. It also won't
work in a world where we ever have more than one physical device. This
commit adds a new field called "physical" to anv_device and switches
every location where we use device->instance->physicalDevice to use the
new field instead.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3461 >
2020-01-20 22:08:52 +00:00
Marek Olšák
735a3ba007
radeonsi/gfx10: enable GS fast launch for triangles and strips with NGG culling
...
Only non-indexed triangle lists and strips are supported. This increases
performance if there is something to cull.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
c377f45c18
radeonsi/gfx10: rewrite late alloc computation
...
- Use conservative late alloc when the number of CUs <= 6.
- Move the late alloc GS register to the GS shader state, so that it can be
tuned for NGG culling.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
4e4b2d13f0
ac: add helper ac_build_triangle_strip_indices_to_triangle
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
8db00a51f8
radeonsi/gfx10: implement NGG culling for 4x wave32 subgroups
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
aa2d846604
radeonsi/gfx10: move GE_PC_ALLOC setting to shader states
...
The value is not changed. I just use a different way to compute it.
The value will vary with NGG culling.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
41fef6fc09
radeonsi/gfx10: don't initialize VGPRs not used by NGG passthrough
...
v2: TES doesn't use the GS PrimitiveID
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
943d131e7d
radeonsi/gfx10: merge main and pos/param export IF blocks into one if possible
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
a966729c84
radeonsi/gfx10: export primitives at the beginning of VS/TES
...
This decreases VGPR usage and will allow us to merge some IF blocks
in shaders.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
5a0fcf11f0
radeonsi/gfx10: move s_sendmsg gs_alloc_req to the beginning of shaders
...
This will allow us to merge some IF blocks in shaders.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
cf9f8d1ea2
radeonsi/gfx10: correct VS PrimitiveID implementation for NGG
...
We didn't use the correct LDS pointer, though it probably doesn't matter,
because I think that nothing else is using LDS here.
This commit makes it consistent with all other esgs_ring use.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
b2326a7549
radeonsi/gfx10: update comments and remove invalid TODOs
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
0f45d4dc2b
ac: add ac_build_readlane without optimization barrier
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
77393cf39b
ac: add prefix bitcount functions
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 16:16:11 -05:00
Marek Olšák
679b6244e1
radeonsi: turn an assertion into return in si_nir_store_output_tcs
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 15:40:13 -05:00
Marek Olšák
27cc7703d3
radeonsi: fix doubles and int64
...
Fixes: 57bd73e229
- radeonsi: remove llvm_type_is_64bit
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 15:40:10 -05:00
Marek Olšák
df34fa14bb
radeonsi: don't invoke decompression inside internal launch_grid
...
Decompress resources properly but don't do it inside launch_grid
to prevent recursion.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Cc: 19.3 <mesa-stable@lists.freedesktop.org >
2020-01-20 15:40:08 -05:00
Marek Olšák
58c929be0d
radeonsi: clean up how internal compute dispatches are handled
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Cc: 19.3 <mesa-stable@lists.freedesktop.org >
2020-01-20 15:40:07 -05:00
Marek Olšák
d69483270e
Revert "radeonsi: unbind image before compute clear"
...
This reverts commit 3a527eda7c
.
It's incorrect.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
2020-01-20 15:40:05 -05:00
Samuel Pitoiset
dbdf3b3ef9
aco: implement nir_intrinsic_load_barycentric_at_sample on GFX6
...
GFX6 doesn't have FLAT instructions which means we have to emit
a 64-bit MUBUF load.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3432 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3432 >
2020-01-20 16:24:55 +00:00
Samuel Pitoiset
9e2fde84fc
aco: add new addr64 bit to MUBUF instructions on GFX6-GFX7
...
According to the different ISA docs (and to LLVM), this bit seems
to only exists on GFX6-GFX7.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3432 >
2020-01-20 16:24:55 +00:00
Samuel Pitoiset
fe9157a700
aco: do not use the vec3 variant for loads on GFX6
...
GFX6 only supports vec3 with load/store format.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3432 >
2020-01-20 16:24:55 +00:00
Samuel Pitoiset
1b5bb204d9
aco: do not use the vec3 variant for stores on GFX6
...
GFX6 only supports vec3 with load/store format.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3432 >
2020-01-20 16:24:55 +00:00
Samuel Pitoiset
b8abfafe86
aco: fix constant folding of SMRD instructions on GFX6
...
SMRD instructions have an 8-bit dword offset on SI.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3432 >
2020-01-20 16:24:55 +00:00
Jason Ekstrand
dd92179a72
anv: Canonicalize buffer formats for image/buffer copies
...
Some formats, in particular YCbCr formats and ASTC have additional
restrictions. We already whack ASTC formats to RGBA32_UINT because the
hardware doesn't allow LINEAR with ASTC. However, we need to fix YCbCr
formats as well because they come with alignment restrictions that we
can't guarantee are satisfied. We're using blorp_copy to do the copies
so we may as well just stomp formats for everything.
Fixes: b24b93d584
"anv: enable VK_KHR_sampler_ycbcr_conversion"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460 >
2020-01-20 16:08:17 +00:00
Jason Ekstrand
14c6e665f7
anv/blorp: Rename buffer image stride parameters
...
The new names fit better with the Vulkan names and don't pretend to be
an actual image extent.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460 >
2020-01-20 16:08:17 +00:00
Daniel Stone
cf5fccb0d9
Revert "gallium: add st_context_iface::flush_resource to call FLUSH_VERTICES"
...
This reverts commit bec9c90b5e
.
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3472 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3472 >
2020-01-20 12:33:29 +00:00
Daniel Stone
32d45733ae
Revert "st/dri: do FLUSH_VERTICES before calling flush_resource"
...
This reverts commit 3ba16d36c9
.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3472 >
2020-01-20 12:33:22 +00:00
Rhys Perry
29bfe18abd
aco: fix fall-through test in try_remove_simple_block() with back-edges
...
3bca0af2
enhanced empty block determination which exposed this bug and
created an infinite loop in a Guild Wars 2 shader.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Fixes: 3bca0af25d
('aco: ignore parallelcopies to the same register on jump threading')
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2364
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3452 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3452 >
2020-01-20 11:51:45 +00:00
Krzysztof Raszkowski
afb75e71e0
docs/GL4: update gallium/swr features
...
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com >
2020-01-20 11:37:16 +00:00
Rhys Perry
e151398de6
aco: fix stack buffer overflow in apply_sgprs()
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Fixes: cef7879719
('aco: rewrite apply_sgprs()')
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2361
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3442 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3442 >
2020-01-20 11:13:11 +00:00
Tapani Pälli
9b2ccd6a0e
anv: add assert for isl_mod_info in choose_isl_tiling_flags
...
CID: 1457859
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3469 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3469 >
2020-01-20 12:12:29 +02:00
Tapani Pälli
8eebdd594b
anv: fix assert in GetImageDrmFormatModifierPropertiesEXT
...
CID: 1457861
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3469 >
2020-01-20 12:11:43 +02:00
Tapani Pälli
31feae1c21
isl/gen12: add reminder comment about missing WA with 3D surfaces
...
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3441 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3441 >
2020-01-20 08:06:19 +02:00
Icecream95
d8a3501f1b
panfrost: Dynamically allocate shader variants
...
This fixes a crash in LZDoom where over 16 shader variants are needed
for a few shaders in some maps, and should also save a few kilobytes
of RAM as most of the time only one or two variants of the 8 previously
allocated are actually needed.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
2020-01-18 11:47:34 -05:00
Alyssa Rosenzweig
bef716b56c
panfrost: Expose some functionality with dEQP flag
...
These features are stable enough that they don't need to be hidden.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3464 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3464 >
2020-01-18 14:57:52 +00:00
Alyssa Rosenzweig
4af8d5b064
pan/midgard: Fix recursive csel scheduling
...
Corner case causing invalid scheduling on shaders with nested csels,
i.e. GLSL code resembling:
(foo ? bool1 : bool2) ? x : y
By explicitly disallowing csels this is fixed.
Fixes INSTR_INVALID_ENC on a glamor shader (noticeable with slowdown and
visual corruption when scrolling "too far" on GTK apps).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3463 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3463 >
2020-01-18 14:40:05 +00:00
Alyssa Rosenzweig
564a782ff7
panfrost: Identify un/pack colour opcodes
...
We still need to identify formats in the disassembler, but this will at
least get the opcode name clear.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3462 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3462 >
2020-01-18 14:18:48 +00:00
Alyssa Rosenzweig
13c32e5fed
pan/midgard: Bytemasks should round up, not round down
...
Otherwise we'll lost components in DCE.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3462 >
2020-01-18 14:18:48 +00:00
Icecream95
5e8386c606
panfrost: Compact the bo_access readers array
...
Previously, the array bo_access->readers was only cleared when there
were no unsignaled fences, which in some situations never happened.
That resulted in the array having thousands of NULL pointers, but only
a handful of active readers.
With this patch, all the unsignaled readers are moved to the front of
the array, effectively building a new array only containing the active
readers in-place. This results in the readers array usually only having
a couple of elements.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3419 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3419 >
2020-01-18 13:58:43 +00:00
Erik Faye-Lund
c0ba9000d2
zink: support arrays of samplers
...
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275 >
2020-01-18 10:45:38 +00:00
Erik Faye-Lund
a9023ec566
zink: support sampling non-float textures
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275 >
2020-01-18 10:45:38 +00:00
Erik Faye-Lund
3e1acff560
zink: store image-type per texture
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275 >
2020-01-18 10:45:38 +00:00
Erik Faye-Lund
5fc1562a72
zink: avoid incorrect vector-construction
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275 >
2020-01-18 10:45:38 +00:00
Erik Faye-Lund
8112240d29
zink: support offset-variants of texturing
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275 >
2020-01-18 10:45:38 +00:00
Erik Faye-Lund
f1a5bcdc16
zink: implement nir_texop_txs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275 >
2020-01-18 10:45:38 +00:00
Erik Faye-Lund
7ee94d1b21
docs: fixup indentation
...
The most canonical indentation-style here is two spaces, which is what
the standard boilerplate in all documents use. So let's normalize to
that.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3443 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3443 >
2020-01-18 11:39:32 +01:00