Jason Ekstrand
ea7fcd5a97
glsl/nir: Use nir_ssa_undef() from nir_builder
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11849 >
2021-07-20 23:18:22 +00:00
Iván Briano
0b9562a94a
anv: Allow unused VkSpecializationMapEntries
...
Fixes future CTS: dEQP-VK.pipeline.spec_constant.*.basic.*unused_*
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11987 >
2021-07-20 21:42:50 +00:00
Neha Bhende
b5e782f5f4
aux/draw: use nir_to_tgsi for draw shader in llvm path
...
Some drivers doesn't support PIPE_SHADER_CAP_INTEGERS.
This leads to using load_ubo_vec4 which throws llvmpipe off the guard since
it doesn't expect load_ubo_vec4 in shader. Use nir_to_tgsi utility in
such a case.
This fixes crash seen with conform's mustpass.c, select.c and feedback.c.
Also, few gl-select related piglit tests exhibit same crash. Found in vmware's
internal testing
Reviewed-by: Charmaine Lee <charmainel@vmware.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
v2: incorporated Emma's comments. Added check for PIPE_SHADER_CAP_INTEGERS and
remove PIPE_SHADER_IR_TGSI check
v3: As per Emma's comment, removed expected crashes for i915 piglit
v4: update expetcted passes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11911 >
2021-07-20 19:05:30 +00:00
Michel Zou
4c36224f95
zink: Fix unused-variable warning
...
Fixes: 9b40fc48
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11920 >
2021-07-20 18:44:39 +00:00
Mike Blumenkrantz
50f9519ea5
nir/lower_point_size_mov: zero nir_state_slot::swizzle in new variable
...
this is otherwise uninitialized during nir_serialize calls
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11932 >
2021-07-20 16:34:51 +00:00
Mike Blumenkrantz
1132df843c
freedreno: use new tc util for setting bytes_mapped_limit
...
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853 >
2021-07-20 13:49:01 +00:00
Mike Blumenkrantz
c3914bb2e8
zink: use new tc util for setting bytes_mapped_limit
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853 >
2021-07-20 13:49:01 +00:00
Mike Blumenkrantz
01414d435c
radeonsi: use new tc util for setting bytes_mapped_limit
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853 >
2021-07-20 13:49:01 +00:00
Mike Blumenkrantz
671d579b46
util/tc: add a util function for setting bytes_mapped_limit
...
tc drivers set this based on os_get_total_physical_memory()/divisor,
which is going to be totally wrong for 32bit processes and explode
the address space
this util function can be used to handle per-platform clamping
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853 >
2021-07-20 13:49:01 +00:00
Mike Blumenkrantz
3db856689d
zink: add changed flag for blend states
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11968 >
2021-07-20 13:12:55 +00:00
Alejandro Piñeiro
df243d0094
broadcom: don't define internal BPP values twice
...
We have a "maximum bpp of all render targets" field for several
packets. For them we were defining manually the possible values. But
all the possible values are the ones defined at the already defined
type "Internal BPP". So in practice we were defining the possible BPP
values twice.
Also for those fields, sometimes we were using the "Internal BPP" type
and in some other cases we were not, so this commit also adds some
consistency.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11976 >
2021-07-20 12:06:56 +00:00
Juan A. Suarez Romero
dc40157888
broadcom/compiler: emit TMU flush before a jump
...
Like in the case of emitting a block, process pending TMU operations
before a jump is executed.
Fixes dEQP-VK.graphicsfuzz.stable-binarysearch-tree-nested-if-and-conditional.
Fixes: 197090a3fc ("broadcom/compiler: implement pipelining for general
TMU operations")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11971 >
2021-07-20 10:15:21 +00:00
Marek Olšák
54e1ec017d
st/mesa: always use PIPE_USAGE_STAGING for GL_MAP_READ_BIT usage
...
This fixes CPU read performance.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5091
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11974 >
2021-07-20 09:49:16 +00:00
Olivier Fourdan
5bfd1a7e19
radeonsi: Check aux_context on si_destroy_screen()
...
The function radeonsi_screen_create_impl() tries to create the
aux_context but doesn't actually check for the returned value from
si_create_context().
Then, on si_destroy_screen() the aux_context is used without actually
checking whether it's a thing or not.
As a result, if for any reason si_create_context() failed, we shall
crash in si_destroy_screen() with a NULL pointer dereference trying to
access ((struct si_context *)sscreen->aux_context)->log.
Simply check for aux_context not being NULL to avoid that crash.
Cc: mesa-stable
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11948 >
2021-07-20 09:15:47 +00:00
Pierre-Eric Pelloux-Prayer
8be61e8a9e
mesa: fix bindless uniform samplers update
...
According to the comment below some extra magic is needed
for bindless samplers, so don't do an early return in this
case.
Fixes: 736f1f70ab ("mesa: skip redundant uniform updates for glUniform")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4806
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11930 >
2021-07-20 08:06:44 +00:00
Daniel Schürmann
9b1a296172
aco/optimizer: ensure to not erase high bits when propagating packed constants
...
Packed constants with non-zero values in the high half
might have been propagated as 16 bit, dropping the high half.
Cc: mesa-stable
Closes : #5070
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11954 >
2021-07-20 07:48:39 +00:00
Dave Airlie
66213ab2de
clover/il: return IL only for spirv and correct length
...
This is specified as char[] and I don't think requires null termination,
Also we should only return IL based programs.
Fixes CTS spirv_new get_program_il
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11868 >
2021-07-20 00:38:39 +00:00
Mike Blumenkrantz
59e69e8ec5
zink: remove screen info stuff from draw templates
...
we can initialize templates that we never need to evaluate again at
runtime, cutting the overhead for all tempaltes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
9bafcde42f
zink: add a ctx flag for shader reading basevertex
...
less rare than drawid, but still not great across repeated draw calls
with all the derefs
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
37ee123063
zink: use drawid_offset directly during draw
...
this used to be worth making a local variable for, now it's not
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
405d45f009
zink: flatten descriptor_refs_dirty into BATCH_CHANGED template
...
that's all this is now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
96559e7418
zink: add a ctx flag for drawid reading
...
avoid needing so many derefs and a bitset to check this during draw
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
a3321f1b85
zink: don't rebind vertex buffers if pipeline changes
...
two pipelines could use the exact same vertex buffers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
c6d268d1a0
zink: stop flagging pipeline dirty for line width changes
...
this is a dynamic state, it's already out of the pipeline hash
also don't store to ctx
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
eb3b758686
zink: split pipeline_changed to use template value separately
...
this enables template-based conditional jumps when possible to avoid
needing to evaluate the other conditions
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
b37a2c6ef2
zink: add template for starting new cmdbuf
...
this avoids reading/updating context changed flags
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
c88ce85799
zink: if descriptor updating flushes, re-call draw/compute
...
ensure upcoming template is correct for now, but this will eventually
be refactored out
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
f2f1892e62
zink: make descriptors_update hook return a bool if a flush occurred
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
c5ccc41ca5
zink: add draw template for dynamic state
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
cfcc2ff03f
zink: start adding C++ draw templates
...
templated draw functions enable moving some checks/calculations/code
into template conditionals, which are resolved in advance of the draw call,
reducing draw overhead
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
15c7e3e922
zink: ifdef out some context prototypes/inlines for c++ compile
...
msvc HATES this one simple trick for successfully compiling code
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11964 >
2021-07-20 00:25:31 +00:00
Mike Blumenkrantz
c4702204bc
zink: optimize shader recalc
...
now we only have to loop over the changed shaders that exist for the
program, and we can avoid a lot of hashing operations by reusing stored
hash values where possible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11962 >
2021-07-19 23:54:36 +00:00
Bas Nieuwenhuizen
785b4728cf
zink: set dedicated allocation when needed
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11958 >
2021-07-19 23:34:21 +00:00
Mike Blumenkrantz
a8727ec856
zink: hook up VK_KHR_dedicated_allocation
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11958 >
2021-07-19 23:34:21 +00:00
Mike Blumenkrantz
e9516a4edd
zink: check for dedicated allocation requirements during image alloc
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11958 >
2021-07-19 23:34:21 +00:00
Emma Anholt
bda26dfcfc
freedreno/ir3: Reduce choose_instr_dec() and _inc() overhead.
...
If you didn't have a freed+ready instruction, you'd redo the live_effect
and check_instr() logic multiple times per instr. Replace the multiple
loops in each function with a ranking that I think is more readable,
reducing the overhead in the process.
debugoptimized dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20
runtime goes from ~3.5s -> ~3.0s on my lazor. No shader-db change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11855 >
2021-07-19 23:16:54 +00:00
Mike Blumenkrantz
578190c0fe
lavapipe: implement VK_EXT_color_write_enable
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11961 >
2021-07-19 21:21:59 +00:00
Mike Blumenkrantz
0115fab46b
lavapipe: add a padding member to rendering_state
...
I always forget where to steal bits from otherwise
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11961 >
2021-07-19 21:21:59 +00:00
Kenneth Graunke
a296cc2684
gallium: Remove dead pb_malloc_buffer_create function prototype
...
This was deleted by commit ec686a66db .
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11922 >
2021-07-19 13:15:54 -07:00
Dave Airlie
75aa8524ec
wl/shm: don't fetch formats if not requested.
...
This aligns the code with the drm format code
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Simon Ser <contact@emersion.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11945 >
2021-07-20 05:03:04 +10:00
Jose Maria Casanova Crespo
fd5fa73e6c
v3d/driconf: Expose non-MSAA texture limits for mutter and gnome-shell
...
To enable dual 4k displays on mutter or gnome-shell under X11 we need to
expose the non-MSAA texture limit as we did for Xorg at 60a64f028d
("v3d: Use driconf to expose non-MSAA texture limits for Xorg.")
https://gitlab.gnome.org/GNOME/mutter/-/issues/1874
Cc: 21.1 21.2 mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11926 >
2021-07-19 11:56:45 +00:00
Karol Herbst
ff55412f40
nv50/ir/nir: fix smem size for GL
...
Originally I fixed the case where the nir itself has a shared mem size of
0, but the frontend (e.g. clover) set it to some other value.
But st/mesa sets the shared mem size on the state object as well and we
end up actually doubling the value in the driver as we set smemSize to the
value from the state object before calling into the compiler.
So just max the value instead.
Fixes the compute_shader.shared-max CTS test.
Fixes: dc667b1f19 ("nv50/ir/nir: fix smem size")
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11047 >
2021-07-19 13:40:30 +02:00
Andreas Bergmeier
d6dd13a62e
v3dv: implement VK_EXT_physical_device_drm
...
Reviewed-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9320 >
2021-07-19 06:03:02 +00:00
M Henning
8413c57a3f
nouveau: Support nir_intrinsic_*_atomic_fadd
...
This fixes failures in piglit's nv_shader_atomic_float tests with
NV50_PROG_USE_NIR=1
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9866 >
2021-07-18 12:56:46 -04:00
Dave Airlie
57dcfb4e55
softpipe/aniso: move DDQ calculation to after scaling.
...
I've read the papers on EWA filters and it seems like the calculate
DDQ = 2 * A after the scaling of A happens. This seems to make
things less blurry and more like real aniso.
Fixes: 2135aba8 ("softpipe: Constify variables")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11917 >
2021-07-18 16:16:26 +10:00
Alyssa Rosenzweig
7de5293b89
pan/bi: Shrink live array to 8-bits
...
We only actually use 4-bits, so we could shrink again. But this by
itself means 1/2 the memory usage for liveness analysis and 1/2 the
copying/alloc/free.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
bbf2ef6b4a
pan/bi: Clean up liveness freeing
...
This is ralloc'd, kind of pointless.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
84e2e5f23c
pan/bi: Clean up useless casts
...
Left over from removing inheritance with sed instead of coccinelle.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
1fcea30295
pan/bi: Copy block bi_block
...
Gets rid of the silly inheritance everywhere, which has caused _far_
more problems in practice than it has fixed. It was an idea I tried
before the pandemic. It didn't work. I'm finally cleaning it up.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00
Alyssa Rosenzweig
a372368e22
pan/bi: Copy back bi_foreach_successor
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11936 >
2021-07-18 01:49:26 +00:00