Tony Wasserka
d38094bb33
radv: Respect alignment requirements in descriptor set layouts
...
Previously, ycbcr samplers were tightly packed with 4-byte alignment,
but the structure requires 8-byte alignment. These samplers are now padded
to 8-byte boundaries instead.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6728 >
2020-10-07 19:50:01 +00:00
Tony Wasserka
3b55913f33
radv: Clean up CreateDescriptorSetLayout
...
"max_bindings + 1" was repeatedly used throughout this function,
so talking about the binding *count* is more natural here.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6728 >
2020-10-07 19:50:01 +00:00
Tony Wasserka
76add3565e
radv: Fix unaligned memory access when writing specialization map entries
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6728 >
2020-10-07 19:50:01 +00:00
Tony Wasserka
984dcfc59f
radv: Avoid calling memcpy with null pointers
...
Vulkan allows for these input pointers to be null when the respective
object count is zero. Calling memcpy with null pointers is undefined,
so they are guarded with a check for the legit use pattern now.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6728 >
2020-10-07 19:50:01 +00:00
Tony Wasserka
0ef2f1d4a0
nir: Fix unaligned pointer access
...
This was observed with the intel vulkan driver when running
dEQP-VK.spirv_assembly.instruction.compute.float32.comparison_1.modfstruct
with ubsan enabled.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6728 >
2020-10-07 19:50:01 +00:00
Tony Wasserka
6a9dc75cc2
nir: Fix undefined behavior due to signed integer multiplication overflows
...
Notably this happened when applying constant folding on the intermediate
computations generated from nir_lower_idiv.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6728 >
2020-10-07 19:50:01 +00:00
Dave Airlie
137d7d29fa
ci: move to using clang 10 for meson + clover
...
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7017 >
2020-10-08 04:23:41 +10:00
Marek Olšák
ae7189df6e
st/mesa: pass inlinable uniforms to drivers if they requested it
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6955 >
2020-10-07 17:30:12 +00:00
Marek Olšák
593517a775
gallium: add pipe_context::set_inlinable_constants
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6955 >
2020-10-07 17:30:12 +00:00
Marek Olšák
3f1b35a2f0
nir: add new helper passes that lower uniforms to literals
...
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6955 >
2020-10-07 17:30:12 +00:00
Marek Olšák
10a7682413
util: add _mesa_set_create_u32_keys where keys are not pointers
...
the only limitation is that key=0 is not allowed
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6955 >
2020-10-07 17:30:12 +00:00
Boris Brezillon
7f2ea2a433
panfrost: Fix fixed-function blend on Mali v6
...
Mali v6 (G72) doesn't support constants in blend equations, let's use
a shader in that case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:55:15 +02:00
Boris Brezillon
8389976b7c
panfrost: XML-ify the blend descriptors
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
ca392e8cd7
panfrost: Rework the render target layout to use overlapping structs
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
713419eef0
panfrost: Rework fixed-function blending
...
The fixed-function blend logic uses the following equation: A + B x C.
A, B and C are configurable and can be complemented with negation (for
A and B) or inversion (for C) modifiers. Let's rework the blending
code to take that into account.
Note that we need to update the checksum of a few traces because the
equations we use have changed, leading to small deviations on the
final images. Indeed, there are several valid options for a given GL
blend equation, but the operand selection probably has an impact on the
rounding, leading to those mismatch.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
f2044044e6
panfrost: gen_pack: Add a no-direct-packing attribute
...
To signify when a struct is not meant to be packed directly but should
instead be embedded in another struct.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
4205c95b34
panfrost: gen_pack: Support overlapping structs
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
3d09e260fb
panfrost: gen_pack: Drop support for opaque structs
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
01121c795b
panfrost: Drop the with_opaque specifier on midgard blend desc
...
While at it, we also split the midgard and bifrost handling since
there's not much to share.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
7bb85eadeb
panfrost: Get rid of the with_opaque qualifier on the renderer state desc
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
f734e67b93
panfrost: Adjust the renderer state definition
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
51331d6d57
panfrost: Adjust the primitive desc definition
...
Add missing fields and rename some of the existing ones.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Boris Brezillon
d343f23345
panfrost: Adjust the draw descriptor definition
...
Add missing fields, and rename some of the existing fields.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980 >
2020-10-07 17:54:57 +02:00
Marek Olšák
1e7d82c881
nir/algebraic: always lower idiv to shifts if bitops are allowed
...
why would you want anything else
The only platform significantly affected by this is Intel where `lower_idiv`
is not set today but neither is `lower_bitops`. There it seems to still be
a boon over-all.
Shader-db results on Ice Lake:
total instructions in shared programs: 19719051 -> 19735766 (0.08%)
instructions in affected programs: 106992 -> 123707 (15.62%)
helped: 0
HURT: 445
HURT stats (abs) min: 3 max: 295 x̄: 37.56 x̃: 44
HURT stats (rel) min: 0.16% max: 33.33% x̄: 19.60% x̃: 19.38%
95% mean confidence interval for instructions value: 33.60 41.53
95% mean confidence interval for instructions %-change: 18.97% 20.23%
Instructions are HURT.
total loops in shared programs: 5973 -> 5973 (0.00%)
loops in affected programs: 0 -> 0
helped: 0
HURT: 0
total cycles in shared programs: 489405810 -> 486917482 (-0.51%)
cycles in affected programs: 4759097 -> 2270769 (-52.29%)
helped: 406
HURT: 34
helped stats (abs) min: 2 max: 64661 x̄: 6291.95 x̃: 3126
helped stats (rel) min: 0.02% max: 79.42% x̄: 43.32% x̃: 55.83%
HURT stats (abs) min: 2 max: 29376 x̄: 1947.12 x̃: 30
HURT stats (rel) min: 0.04% max: 23.82% x̄: 4.66% x̃: 1.33%
95% mean confidence interval for cycles value: -6753.06 -4557.52
95% mean confidence interval for cycles %-change: -42.60% -36.63%
Cycles are helped.
total spills in shared programs: 12481 -> 12482 (<.01%)
spills in affected programs: 47 -> 48 (2.13%)
helped: 0
HURT: 1
total fills in shared programs: 12816 -> 12819 (0.02%)
fills in affected programs: 71 -> 74 (4.23%)
helped: 0
HURT: 1
total sends in shared programs: 1010124 -> 1010124 (0.00%)
sends in affected programs: 0 -> 0
helped: 0
HURT: 0
LOST: 1
GAINED: 0
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6963 >
2020-10-07 10:50:53 -04:00
Marek Olšák
315df8dbb8
glthread: handle glInterleavedArrays
...
We need to enable and bind everything on the glthread side too.
The behavior was copied from _mesa_InterleavedArrays.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6874 >
2020-10-07 09:50:18 -04:00
Marek Olšák
bd70b61f2f
mesa: remove api_loopback to remove call indirections
...
This is an optimization for SPECviewperf.
The increase in lines of code is only 14%.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6874 >
2020-10-07 09:50:18 -04:00
Marek Olšák
4bd94bd227
mesa: don't use GET_DISPATCH because it doesn't work with glthread
...
GET_DISPATCH returns CurrentClientDispatch, which invokes glthread if
it's enabled. GL function implementations should never call back to
glthread.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6874 >
2020-10-07 09:50:18 -04:00
Serge Martin
fd3209a974
clover: move tokenize function to algorithm
...
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Karol Herbst
ee5b46fcfd
clover/spirv: support CL_KERNEL_COMPILE_WORK_GROUP_SIZE
...
Reviewed-by: Serge Martin <edb@sigluy.net >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Karol Herbst
2bb2ba7e34
clover/spirv: parse arg_info
...
Reviewed-by: Serge Martin <edb@sigluy.net >
Acked-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Serge Martin
4f99826691
clover: avoid adding an extra space to compiler options
...
This make CTS test_compiler happier
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Serge Martin
811b17a207
clover: implements notification callback on program builds
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Serge Martin
c04d5e7efa
clover: implements clGetKernelWorkGroupInfo CL_KERNEL_COMPILE_WORK_GROUP_SIZE
...
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Serge Martin
aadd134081
clover: add CL_KERNEL_ATTRIBUTES for clGetKernelInfo
...
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Serge Martin
ef0f8ec03b
clover: bind sampler_t type to module::argument::sampler
...
Reviewed-by: Pierre Moreau <dev@pmoreau.org >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Serge Martin
9aea6e3374
clover: implements clGetKernelArgInfo
...
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Serge Martin
d7d66e30f2
clover: implements clEnqueueFillImage
...
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Serge Martin
c0f03f6fc0
clover: implements clEnqueueMigrateMemObjects
...
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4974 >
2020-10-07 13:18:22 +00:00
Daniel Abrecht
4b96eb0cc4
etnaviv: Make sure to track different pipe_screens for different DRM device descriptions
...
pipe_screens that are created used to be dedublicated directly based on the gpu device file.
If a process created two of them, for example by opening the etnaviv render node twice
and calling `gbm_create_device`, or by opening two card nodes which used kmsro, or any
combination of these things, then for any but the first instance, the gem handles created
for it would be for the first one instead of the intended one, due to them being created
using the same pipe_screen, and buffers allocated for kmsro devices would be allocated using
the wrong file description as well. This can lead to various problems, such as a proccess not
being able to use two cards which use kmsro at the same time, for example.
This patch changes the dedublication to be done based on the gpu device description
rather than based on the gpu device file. This will solve the above mentioned problem,
but there will now be only a few cases in which anything is dedublicated at all.
Signed-off-by: Daniel Abrecht <public@danielabrecht.ch >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6790 >
2020-10-07 13:01:20 +00:00
Boris Brezillon
ac161102f3
panfrost: Fix a warning
...
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7040 >
2020-10-07 14:21:38 +02:00
Boris Brezillon
ccb3d7d8be
panfrost: bifrost: disassemble: Fix decoding of next_regs
...
next_regs decoding is wrong for the first and last instructions in a
clause:
- the first instruction has its destination encoded in the second reg
block
- the last instruction has its destination encoded in the first reg block
(things wrap around)
So, only the last instruction should pass first=true when decoding
next_regs. Fix that by passing the is_last_instruction information
instead of is_first_instruction to the disasm helpers.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7040 >
2020-10-07 14:21:20 +02:00
Rhys Perry
19561f31a8
radv: remove trailing whitespace
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7043 >
2020-10-07 11:53:23 +00:00
Rhys Perry
8096e0df7a
aco: remove trailing whitespace
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7043 >
2020-10-07 11:53:23 +00:00
Samuel Pitoiset
3c5eb1f761
aco: more uses of nir_get_io_offset_src()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7003 >
2020-10-07 13:31:36 +02:00
Samuel Pitoiset
1211d05bef
aco: bail out if the NIR IO base offset isn't zero
...
nir_io_add_const_offset_to_base takes care of this.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7003 >
2020-10-07 13:31:25 +02:00
Lucas Stach
9d5ec7f6f2
etnaviv: stop leaking the dummy texure descriptor BO
...
Free the dummy texture descriptor BO on context destroy.
Fixes: eda73d7127 (etnaviv: GC7000: Texture descriptors)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Guido Günther <agx@sigxcpu.org >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Cc: <mesa-stable@lists.freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6986 >
2020-10-07 11:17:18 +02:00
Juan A. Suarez Romero
6a44bda879
intel/uuid: use git-sha1/package for the driver UUID
...
We can't read information from the loaded shared object because we have
different objects for Vulkan and OpenGL drivers, but we need to share
the same UUID for both.
Hence let's use SHA1 from the Git commit and package version.
v2: use also package version for the case of building from tarball (Eric)
v3: fix typos in comment (Tapani)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7025 >
2020-10-07 11:11:34 +03:00
Juan A. Suarez Romero
456fa9b838
iris: plumb device/driver UUID generators
...
Use the same generators as used in anv driver so both Vulkan and OpenGL
drivers can share the same external memory objects.
v2: removed extra parameter from function gen_uuid_compute_device_id
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Signed-off-by: Eleni Maria Stea <estea@igalia.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7025 >
2020-10-07 11:11:28 +03:00
Juan A. Suarez Romero
e9a766a8c0
intel: split driver/device UUID generators
...
We need Vulkan and GL to produce the same UUIDs. So move the generator
from ANV to a common code that can be shared by ANV and Iris driver.
v2: fix android build (Tapani)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7025 >
2020-10-07 11:11:23 +03:00
Eduardo Lima Mitev
713386af20
turnip: Enable support for KHR_incremental_present
...
All bits should already be provided by wsi/common.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6704 >
2020-10-07 07:13:41 +00:00