Mike Blumenkrantz
53d9beb9b8
gallium/u_inlines: add helper for simplifying pipe_context::resource_copy_region
...
this hook has too many params, and I only need like half of them
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8624 >
2021-01-22 23:47:03 +00:00
Mike Blumenkrantz
cacb3e1826
zink: enable PIPE_CAP_SAMPLER_VIEW_TARGET
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8629 >
2021-01-22 22:37:46 +00:00
Chia-I Wu
d37124b065
virgl: add support for VIRGL_CAP_V2_UNTYPED_RESOURCE
...
An untyped resource is a blob resource that contains only raw bytes
without type information (e.g., width, height, format, etc.). virgl
supports only typed resources, and when it encounters untyped resources,
it fails silently in the host.
This cap enables virgl to assign type information to untyped resources.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-By: Isaac Bosompem <mrisaacb@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8584 >
2021-01-22 21:25:49 +00:00
Chia-I Wu
41366ba494
virgl: update headers
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-By: Isaac Bosompem <mrisaacb@google.com >
Acked-By: Gurchetan Singh <gurchetansingh@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8584 >
2021-01-22 21:25:48 +00:00
Erik Faye-Lund
fb65285629
docs/zink: add GL 4.2 requirements
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
d0e7a7d58d
docs/zink: add GL 4.1 requirements
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
c3d7de47cd
docs/zink: add GL 4.0 requirements
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
4374e8e99f
docs/zink: fix phrasing of GL 3.3 requirements
...
These requirements aren't all about VkPhysicalDeviceFeatures, so let's
make the text reflect that.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
02c43eb975
docs/zink: document the independentBlend requirement for GL3
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
fb5d7d60e7
docs/zink: add two missing required features
...
If these features aren't supported, we'll start doing illegal stuff, so
let's document it.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Erik Faye-Lund
a640588a41
docs/zink: add missing colon
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648 >
2021-01-22 21:22:26 +00:00
Vinson Lee
9565c1d83c
nv50/ir: Initialize RegAlloc member func in constructor.
...
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member func is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8568 >
2021-01-22 21:14:51 +00:00
Erik Faye-Lund
92ec7b577c
zink: clone shader before lowering clip_halfz
...
If we don't clone the shader before lowering clip_halfz, we risk ending
up performing the same lowering multiple times, each time we compile a
new variant.
This fixes rendering in Neverball.
Fixes: 15f478fe84 ("zink: only run nir_lower_clip_halfz for last vertex processing stage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4147
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8652 >
2021-01-22 20:04:17 +00:00
Mike Blumenkrantz
5282210c0b
zink: check correct caps for PIPE_CAP_IMAGE_LOAD_FORMATTED
...
we actually need more features here than just the one which was checked to
enabled this
Fixes: 2f6f4b613c3 ("zink: export shader image caps using features")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8656 >
2021-01-22 19:54:58 +00:00
Michel Dänzer
d31f2200b3
ci: Enable process isolation for softpipe & freedreno piglit jobs
...
Disabling process isolation causes a random set of tests to be
spuriously skipped. The set of skipped tests can change when piglit is
rebuilt (even from the same Git commit), which can make docker image
rebuilds painful. (Not to mention the reduced testing coverage due to
the skipped tests)
One downside of this change is that the arm64_a630_piglit_shader job
now takes almost 10 minutes.
v2:
* Change arm64_a530_piglit_shader job as well, but make it run manually
on branches of forked repositories only, since it takes almost 20
minutes now. (Eric Anholt)
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8611 >
2021-01-22 19:35:06 +00:00
Jason Ekstrand
cca257d596
anv: Advertise shaderInt64 on Gen11+
...
On Gen11, they took away our hardware int64 support. We have lowering
for all of it in NIR except for subgroup ops. Now that all the subgroup
ops are implemented, we can enable the feature.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
8c2543d037
intel/fs: Implement umin/umax shuffle
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
a6500236e3
intel/fs: Refactor our shuffle emit code
...
This adds an emit_scan_step helper which gives us a place to do
something a bit more interesting than emitting a single op.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
44571c6a68
intel/fs: Properly lower 64-bit MUL on 64-bit-incapable platforms
...
There are two problems this commit solves: First, is that the 64x64 MUL
lowering generates a Q MOV which, because of how late it runs in the
compile pipeline, it never gets removed. Second, it generates 32x32
MULs and we have to run it a second time to lower those.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
c80db6611a
intel/fs: Support 64-bit CLUSTER_BROADCAST on Gen11+
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
b90921ec0c
intel/fs: Support 64-bit SHUFFLE on Gen11+
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:38 +00:00
Jason Ekstrand
cdedc82329
intel/fs: Support 64-bit SEL_EXEC on Gen11+
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
58bcb5401d
intel/fs: QUAD_SWIZZLE requires packed data
...
We could probably support some strides if we tried hard enough but the
whole point of this opcode is to accelerate things with crazy Align16 or
crazy regions. It's ok if we have to emit an extra MOV to get a packed
source.
Fixes: 8b4a5e641b "intel/fs: Add support for subgroup quad operations"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
69a3559efd
intel/reg,fs: Handle immediates properly in subscript()
...
Just returning the original type isn't what we want in basically any
case. Mask and shift the immediate as needed.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
e797daba53
intel/compiler: Move brw_reg_type_for_bit_size to brw_reg_type.h
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
4c8cbe9b13
intel/compiler: Return 1 for immediates in regs_read
...
Previously, we were returning 2 whenever the source was a Q type. As
far as I can tell, the only reason why this hasn't blown up before is
that it was only ever used for VGRFs until the SWSB pass landed which
uses it for everything. This wasn't a problem because Q types generally
aren't a thing on TGL. However, they are for a small handful of
instructions.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
178820212b
nir/lower_int64: Lower 64-bit vote_ieq
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
731adf1e17
nir/lower_int64: Add lowering for 64-bit iadd shuffle/reduce
...
Lowering iadd is a bit trickier because we have to deal with potential
overflow but it's still not bad to do in NIR.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
bf7a114246
nir/lower_int64: Add lowering for some 64-bit subgroup ops
...
These are all pretty trivial because we can just split the op into one
subgroup op per half of the value. There's some question as to whether
these belong in lower_int64 or lower_subgroups but, on Intel, they key
decider of whether or not we need the lowering is based on whether or
not we have hardware int64 support.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
da331f814f
nir/lower_int64: Fix lowering of f2[ui]64 for 16-bit float
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Jason Ekstrand
70b4524de5
nir/lower_int64: Add a level of wrapper functions
...
We're about to start lowering a few intrinsics so we need support more
than just ALU.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329 >
2021-01-22 18:38:37 +00:00
Samuel Pitoiset
093b3f6e1f
radv: only decompress the depth/stencil aspect that needs to be resolved
...
For depth/stencil images, the driver was decompressing both aspects
while it should be enough to only decompress the one that's going
to be resolved.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8561 >
2021-01-22 18:16:19 +00:00
Ben Niu
36a4aeb91f
util: When building 'ARM64EC', don't use x64 intrinsics which need to be emulated
...
ARM64EC is a new build target for Windows ARM64 devices for x64 support.
These binaries can be loaded in x64 processes, but don't need to be emulated. For
code that's heavily used, avoiding the emulation can be a huge perf win.
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8619 >
2021-01-22 17:56:08 +00:00
Jesse Natalie
86b4f6ad43
main: Undefine MemoryBarrier for Windows
...
In winnt.h, MemoryBarrier can be defined in one of 4 ways, depending
on which architecture is being targeted.
- For x86, it's an inline function.
- For x64, it's an object-like macro, which means that the MemoryBarrier
function in the table actually ends up being called __faststorefence.
- For arm and arm64, it's a function-like macro, and the preprocessor fails
because the function table entry doesn't call it.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8485 >
2021-01-22 09:32:00 -08:00
Jason Ekstrand
0e1447eb1b
anv: Early-exit from cmd_buffer_flush_state
...
If we don't have any dynamic state, pipeline, or descriptor changes,
we can do a very quick early-exit instead of checking for a bunch of
stuff bit-by-bit.
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594 >
2021-01-22 17:21:11 +00:00
Jason Ekstrand
18fc1dfea3
anv: Only flush descriptors used by the pipeline
...
Previously, if we had a pipeline transition from something which used,
say, tessellation to something which didn't and we ended up with
tessellation descriptors dirty, we could end up re-emitting far more
than necessary. With this commit, we mask off unused stages so we only
update when necessary.
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594 >
2021-01-22 17:21:11 +00:00
Jason Ekstrand
72c7a68c2b
anv: Take the set of stages to flush in flush_descriptor_sets
...
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594 >
2021-01-22 17:21:11 +00:00
Jason Ekstrand
16a81cabb5
anv: Exit early from cmd_buffer_apply_pipe_flushes
...
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594 >
2021-01-22 17:21:11 +00:00
Samuel Pitoiset
7683ff1420
radv: use a workgroup size of 8x8 for FMASK color expand
...
Probably better for access patterns.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8642 >
2021-01-22 17:05:17 +00:00
Samuel Pitoiset
b4f551d41b
radv: use the range aspect mask in FMASK color expand
...
Instead of harcoding it.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8642 >
2021-01-22 17:05:17 +00:00
Samuel Pitoiset
4d30de140e
radv: add multi-layer support to FMASK color expand
...
For better performance for layered MSAA images.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8642 >
2021-01-22 17:05:17 +00:00
Marek Olšák
67c2921193
radeonsi: iterate from draw 1 for total/min_direct_count computation
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
01e3d28829
radeonsi: enable accidentally disabled fast launch with non-indexed tri strips
...
Only *indexed* triangle strips hang.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
ea670ac150
radeonsi: skip some code for ALLOW_PRIM_DISCARD_CS if tess or GS is enabled
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
dd9801a918
radeonsi: rename SI_SGPR_RW_BUFFERS to SI_SGPR_INTERNAL_BINDINGS
...
They are just internal buffers and images.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
59a478b843
radeonsi: move if (sctx->vertex_buffers_dirty) into the upload function
...
This looks unnecessary, but the next commit will build upon it and add
more stuff into the function.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
5013828863
radeonsi: don't set vertex buffer dirty flags when they don't do anything
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
26d785fbbd
radeonsi: move y_inverted out of si_viewports
...
for better packing
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
c1957e58a6
radeonsi: inline si_blend_color and si_clip_state structures
...
better packing
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00
Marek Olšák
ca2062a394
radeonsi: simplify determining whether render condition is enabled at draw time
...
Read one bool instead of reading one bool and one pointer.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8653 >
2021-01-22 16:45:30 +00:00