Simon Ser
71e8141503
egl: use render node for wl_drm if available
...
This causes clients to use the render node and skip DRM
authentication if a DRM render node is available.
Signed-off-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9334 >
2021-03-09 15:43:51 +00:00
Georg Lehmann
fb1100d718
vulkan/device_select: Only call vkGetPhysicalDeviceProperties2 if the device supports it.
...
vkGetPhysicalDeviceProperties2 is not allowed to be used with a 1.0 device
because it's a vulkan 1.1 function.
Closes : #4396
Fixes: 38ce8d4d ("vulkan/device_select: Stop using device properties 2.")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9462 >
2021-03-09 15:00:57 +00:00
Gert Wollny
8bc9ae1bc6
virgl: implement support for PIPE_CAP_STRING_MARKER
...
With this command implemented messages emitted by
applications via glDebugMessageInsert will be forwarded
to the host.
v2: - remove check for feature in encode function, this
is covered in the state tracker (Rohan)
- reorder parameters in the encode function to the
order of the emit callback
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Rohan Garg <rohan.garg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9433 >
2021-03-09 13:57:05 +00:00
Jason Ekstrand
1399ee5cf9
anv: Drop anv_extensions.py
...
This should have been dropped in 27d496706e .
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9469 >
2021-03-09 10:36:19 +00:00
Fan Yugang
6905122999
intel/tools: Show unknown instructions in decoded state.
...
Signed-off-by: Fan Yugang <yugang.fan@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9455 >
2021-03-09 09:36:08 +00:00
Christian Gmeiner
f532202f2d
etnaviv: use nir_lower_idiv(..) before opt loop
...
nir_lower_idiv(..) creates during its lowering isub instructions.
Move nir_lower_idiv(..) before the opt loop to have a chance to
optimize/lower isub away. Also drop the drop the halti dependency to
make it easier to follow.
This fixes the following assert on GC3000:
Unhandled ALU op: isub
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9447 >
2021-03-09 06:45:31 +00:00
Mike Blumenkrantz
279ef45db5
zink: unref ctx->framebuffer on context destroy
...
we aren't guaranteed to get a final set_framebuffer_state(NULL) to do
this for us
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9434 >
2021-03-09 03:11:40 +00:00
Mike Blumenkrantz
8937b5f268
zink: don't pass so_info to ntv at all unless it's necessary
...
this is only needed for explicit xfb outputs
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
7ed57e60fc
zink: only export necessary xfb outputs to ntv
...
the full-variable outputs can be skipped, leaving only the varyings which
actually need explicit emission due to packed layouts or whatever
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
1f42ff77df
zink: use slightly stricter check for update_so_info() callsite
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
0fb7680b26
zink: pass so_info directly to update_so_info()
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
0d741b8dfe
zink: use info.has_transform_feedback_varyings to determine xfb enablement
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
eebd00329f
zink: rename variable in update_so_info()
...
be more consistent
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
5c5e1abea2
zink: evaluate existing slot map during program init and force new map as needed
...
if the number of explicit xfb outputs or new varyings added to the existing size
of the slot map would cause an overflow, we have to force a new slot map to
ensure that everything fits
this means iterating all the stages which can produce new varyings and calculating
all the slots required in order to compare against the max size available
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
6d40db84c9
zink: handle direct xfb output from output variables
...
if an entire variable is being dumped into an xfb buffer, there's no need
to create an explicit xfb variable to copy the value into, and instead
the xfb attributes can just be set normally on the variable
this doesn't work for geometry shaders because outputs are per-vertex
fixes all KHR-GL46.enhanced_layouts xfb tests
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
7cef91dd43
zink: stop allocating xfb slot map
...
this can just be inlined since it's a small static size
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
086262fc53
zink: run more nir passes for tess shaders
...
running nir_lower_io_arrays_to_elements_no_indirects for only some stages
breaks location-setting for the stages which don't run it when
e.g., dmat2x3 variables are sometimes split across locations and
sometimes jammed into a single location (TCS I'm looking at you)
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
6d8b5e7f09
zink: fix location usage for explicit xfb outputs
...
ensure that this accurately handles multi-slot emission
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
96024a8dc9
zink: fix slot mapping for fat io variables
...
big types like dmat2x3 need multiple slots, and trying to jam them into
single slots breaks everything
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
1b25e3a701
zink: fix streamout emission for super-enhanced layouts
...
if we get some crazy matrix types in here then we need to ensure that
we accurately unwrap them and copy the components
fixes KHR-GL46.enhanced_layouts.xfb_stride
Fixes: 1b130c42b8 ("zink: implement streamout and xfb handling in ntv")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Mike Blumenkrantz
9ff01d724a
zink: remove ntv streamout assert
...
this was added during review, but it was never correct and just crashes
valid cases like streamout from a mat3x4 type
Fixes: b6f8f3a3ba ("zink: fix streamout for clipdistance")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9271 >
2021-03-09 02:52:20 +00:00
Jesse Natalie
fe90bcf11a
microsoft/compiler: Don't separate phis while inserting upcasts
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4414
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9464 >
2021-03-09 01:41:32 +00:00
Jesse Natalie
ef0d2a5b4b
nir: Add a nir_after_instr_and_phis helper
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9464 >
2021-03-09 01:41:32 +00:00
Jason Ekstrand
25020c125a
intel/mi_builder: Fix a couple of #ifs
...
All this does is remove a field on Gen7 and stop asserting on it. No
actual functional change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9467 >
2021-03-08 16:14:13 -06:00
Jason Ekstrand
62c64e7b9d
intel/mi_builder: Fix some indentation
...
This got lost in the rebase on top of the s/gen_mi_/mi_/ change
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9467 >
2021-03-08 16:13:37 -06:00
Jordan Justen
45e5c6b641
anv: Add mem heap/type support for local-mem
...
This will take effect in future patches when we are able to query the
kernel to set device->vram.size to a non-zero size.
Builds on Sagar's ("anv: Query memory region info") patch, and
re-organizes things as recommended by Lionel (and Jason).
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324 >
2021-03-08 12:47:06 -08:00
Jordan Justen
7c41ae0a81
anv: Put cache memory type first on non-llc platforms
...
Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324 >
2021-03-08 12:47:06 -08:00
Jordan Justen
fd98721cba
anv: Restructure mem heap/type init code
...
Just treat the llc and non-llc paths as separate cases. This will also
help when adding the local memory setup.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324 >
2021-03-08 12:47:06 -08:00
Sagar Ghuge
835c257f64
anv: Add anv_memregion structure
...
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324 >
2021-03-08 12:47:06 -08:00
Caio Marcelo de Oliveira Filho
a41c3ed384
spirv: Update a couple of comments in variable handling
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9440 >
2021-03-08 20:23:28 +00:00
Caio Marcelo de Oliveira Filho
3a7bb38b70
spirv: Explicitly break when finished handling SpvDecorationBuiltIn
...
When tyding up this section in 1e5b09f42f ("spirv: Tidy some repeated
if checks by using a switch statement.") the break got lost. It is
not a real problem because the next case just break, but better to
have it explicitly here instead of a FALLTHROUGH.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9440 >
2021-03-08 20:23:28 +00:00
Caio Marcelo de Oliveira Filho
94d2a51453
spirv: Reuse nir_is_per_vertex_io()
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9440 >
2021-03-08 20:23:28 +00:00
Eric Anholt
f301eec9a3
nir-to-tgsi: Fix handling of partial writemasks on SSA/REG decls.
...
In nouveau's PBO path with GS support and no VS layer export, we got:
intrinsic store_output (ssa_1, ssa_0) (0, 15, 0, 160, 128) /* base=0 */ /* wrmask=xyzw */ /* component=0 */ /* src_type=float32 */ /* location=0 slots=1 */ /* out_pos */
[...]
vec3 32 ssa_4 = mov ssa_3.xxx
intrinsic store_output (ssa_4, ssa_0) (0, 4, 0, 160, 128) /* base=0 */ /* wrmask=z */ /* component=0 */ /* src_type=float32 */ /* location=0 slots=1 *//* out_pos */
The mov's SSA value we would decide we could store directly to the output,
since nothing else used it. However, the store has a writemask, and the
ALU op was stomping over it instead of ANDing with the output decl's
existing writemask.
Fixes: f79f382c81 ("nir_to_tgsi: Store directly to TGSI outputs when possible.")
Closes : #4380
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu >
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9376 >
2021-03-08 19:01:40 +00:00
Jason Ekstrand
e20e85f01e
nir: Make nir_ssa_def_rewrite_uses_after take an SSA value
...
This replaces the new_src parameter of nir_ssa_def_rewrite_uses_after()
with an SSA def, and rewrites all the users as needed.
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383 >
2021-03-08 16:59:55 +00:00
Jason Ekstrand
117668b811
nir: Make nir_ssa_def_rewrite_uses take an SSA value
...
This commit replaces the new_src parameter of nir_ssa_def_rewrite_uses()
with an SSA def, removes nir_ssa_def_rewrite_uses_ssa(), and rewrites
all the users as needed.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383 >
2021-03-08 16:59:55 +00:00
Jason Ekstrand
13a0ee8a51
nir: Add and use a new nir_ssa_def_rewrite_uses_src helper
...
This is currently an alias for nir_ssa_def_rewrite_uses but we move all
the instances which used it to write a non-SSA source to the newly named
helper.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383 >
2021-03-08 16:59:55 +00:00
Jason Ekstrand
98a5b9b454
intel/mi_builder: Add control-flow support
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
8525ebe6e3
intel/mi_builder: Return an address from __gen_get_batch_address
...
While we're here, add __gen_get_batch_address declarations to more files
because we're about to start requiring it on all GFX 12.5+.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
322fba216b
intel/mi_builder: Use softpin for tests on gen8+
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
c23f7f1154
intel/batch_decoder: Don't follow predicated MI_BATCH_BUFFER_START
...
The stuff after these may be executed so we want to decode it too.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
6721925220
genxml: Clean up MI_SET_PREDICATE
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:19 -06:00
Jason Ekstrand
c7c524337a
intel/mi_builder: Add load/store_offest on GFX 12.5+
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:47:18 -06:00
Jason Ekstrand
6323a8522b
intel/mi_builder: Support inverted values in mi_store
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:45:45 -06:00
Sagar Ghuge
04d0d4e849
intel/mi_builder: Added support for command streamer shift operations
...
Add logical shift left and right operations support to mi_builder.
v1:
- Add GEN_GEN > 12 check (Jordan Justen)
- Add gen_mi_has_shift function (Jordan Justen)
- Fix commit title (Jordan Justen)
v2 (Jason Ekstrand):
- Add _imm versions of all of them
- Better handle corner-cases in _imm helpers
- Handle the power-of-two limitation for _imm versions
- Add tests
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:45:42 -06:00
Jason Ekstrand
62b9e30cc7
intel/mi_builder: Add ieq/ine helpers
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 10:45:24 -06:00
Jason Ekstrand
2c02740a8c
intel/mi_builder: Use AddCSMMIOStartOffset for LRI
...
In 06cf838cbd we started using the AddCSMMIOStartOffset feature
on Gen11+ but we missed one place.
Fixes: 06cf838cbd "intel/mi_builder: Support gen11 command-streamer..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9445 >
2021-03-08 09:54:45 -06:00
Connor Abbott
ccd7986f59
freedreno/cffdec: Use rb trees for tracking buffers
...
Gets rid of the arbitrary size limitation, and should make decoding
faster with many buffers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8838 >
2021-03-08 15:18:47 +00:00
Marek Olšák
b43f40166c
ac/surface: select best swizzle mode for 3D sampler performance
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9448 >
2021-03-08 11:41:23 +00:00
Marek Olšák
08ece5d6b3
driconf: add performance tweaks for viewperf
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9449 >
2021-03-08 10:33:33 +00:00
Tony Wasserka
97c97781f6
aco: Fix vector::reserve() being called with the wrong size
...
The container is moved from before and hence returns size 0. To get the
correct value, the new instruction container must be used instead.
This was flagged by clang-tidy. The fixed call still triggers the
corresponding diagnostic, hence this change silences it by adding a
redundant clear() after move.
Fixes: 7f1b537304 ("aco: add new NOP insertion pass for GFX6-9")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9432 >
2021-03-08 10:44:20 +01:00