Jason Ekstrand
536727c465
iris: Patch constant data pointers into shaders
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6244 >
2020-09-02 19:48:44 +00:00
Jason Ekstrand
bc2c5f9a4b
iris: Use gen_disassemble
...
This one doesn't require the program size and so it won't mess up if we
have a bunch of constant data at the end.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6244 >
2020-09-02 19:48:44 +00:00
Eric Anholt
f25e169897
nir/opt_vectorize: Add a callback for filtering of vectorizing.
...
For NIR-to-TGSI, we don't want to revectorize 64-bit ops that we split to
scalar beyond vec2 width. We even have some ops that we would rather
retain as scalar due to TGSI opcodes being scalar, or having more unusual
requirements.
This could be used to do the vectorize_vec2_16bit filtering, but that
shader compiler option is also used in algebraic so leave it in place for
now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6567 >
2020-09-02 09:59:17 -07:00
Marcin Ślusarz
5e676ac671
iris: verify color component width in convert_fast_clear_color
...
Coverity complains about possible 2^32-1 bit shift.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6126 >
2020-09-02 15:08:01 +00:00
Danylo Piliaiev
bc4a127d6e
intel/disasm: Label support in shader disassembly for UIP/JIP
...
Shader instructions which use UIP/JIP now get formatted with a label
in addition with immediate value, labels have "LABEL%d" format.
v2: - Consider brw_jump_scale when calculating label's offset
From: "Lonnberg, Toni" <toni.lonnberg@intel.com >
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4245 >
2020-09-02 10:33:29 +00:00
Pierre-Eric Pelloux-Prayer
b8445520cb
radeonsi,driconf: add clamp_div_by_zero option
...
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6259 >
2020-09-02 11:53:16 +02:00
Pierre-Eric Pelloux-Prayer
f8c0e20152
radeonsi: enable PIPE_CAP_NO_CLIP_ON_COPY_TEX
...
This fixes specviewperf13 catia test rendering.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6259 >
2020-09-02 11:53:16 +02:00
jzielins
54fed1cf95
gallium/swr: Fix compilation TCS/TES compilation issues
...
Gallvm API changes in TCS/TES, but the compilation worked
for older LLVM APIs. With LLVM 12 update is needed.
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6554 >
2020-09-02 11:13:31 +02:00
jzielins
639605e5ba
gallium/swr: Fix compilation with LLVM 12
...
Update to reflect changes in VectorType and ElementCount APIs
Closes : #3457
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6554 >
2020-09-02 11:12:21 +02:00
Eric Anholt
0369dd9077
freedreno/a6xx: Add ARB_depth_clamp and separate clamp support.
...
Passes piglit depth_clamp, depth-clamp-range,
amd_depth_clamp_separate_range. This is part of enabling GL 3.2 (the
other is bumping PIPE_CAP_GLSL_FEATURE_LEVEL, which I'm hoping to do once
we have the KHR-GL* testing in place).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6544 >
2020-09-01 23:03:46 +00:00
Alyssa Rosenzweig
b9df3fef4d
panfrost: Drop PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER/BUFFERS
...
Just leave it at 0 and the frontend will lower for us.
Fixes dEQP-GLES31.functional.atomic_counter.get.1_counter_*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439 >
2020-09-01 21:04:09 +00:00
Jason Ekstrand
4087b5343d
nouveau/nir: Implement load_global_constant
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379 >
2020-09-01 20:50:04 +00:00
Karol Herbst
6e52c6dfcc
nvc0/cl: hande 64 bit pointers in nvc0_set_global_handle
...
clover gives us a uint32_t pointer into the kernel input bufffer, but also
for actual 64 bit pointers, so we can just use memcpy instead.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
1c9efcd7a6
nvc0/ir: fix load propagation for sub 4 byte addressing
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
d7b65cf7d3
nv50/ir: fix cas lowering for 64 bit
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433 >
2020-09-01 18:47:30 +00:00
Karol Herbst
70cbddc4a7
nir: use enum operator helper for nir_variable_mode and nir_metadata
...
those are used quite a bit
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6520 >
2020-09-01 17:45:08 +00:00
Jonathan Marek
a6291b1b11
freedreno/ir3: rework setup_{input,output} to make struct varyings work
...
Rework setup_{input,output} to be called during emit_intrinsic, in a way
which allows struct/array/matrix type varyings to work.
This allows turnip to pass dEQP-VK.glsl.linkage.varying.struct.*
Signed-off-by: Jonathan Marek <jonathan@marek.ca >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6181 >
2020-09-01 15:10:47 +00:00
Marek Olšák
b7a6333ee4
amd/registers: switch to new generated register definitions
...
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6423 >
2020-09-01 08:45:54 -04:00
Ilia Mirkin
4c050f222f
panfrost: enable DrawTransformFeedback*
...
This is needed for ARB_transform_feedback2, which I plan on requiring
for ES3. Also update docs/features.txt
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu >
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6247 >
2020-08-31 17:10:35 +00:00
Mike Blumenkrantz
8239fe5d74
zink: add note about buffer<->image copy functions not handling multisample
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6266 >
2020-08-31 13:45:42 +00:00
Mike Blumenkrantz
d84a75466c
zink: use u_transfer_helper to split/merge interleaved depth/stencil formats
...
EXT_packed_depth_stencil adds GL_UNSIGNED_INT_24_8_EXT which is an interleaved format,
but vulkan spec states that reading/writing the corresponding format provides only the
D24 component, which requires that we perform separate operations for each component
using separate buffers
fixes mesa/mesa#3031
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6266 >
2020-08-31 13:45:42 +00:00
Alyssa Rosenzweig
8ff6e7c739
panfrost: Set PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS
...
Exposes ARB_texture_gather when PAN_MESA_DEBUG=deqp is set. Also update
docs/features.txt.
Fixes:
dEQP-GLES31.functional.texture.gather.offset.implementation_offset.*
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6516 >
2020-08-31 07:46:32 -04:00
Alyssa Rosenzweig
fd41dece39
panfrost: Emit texture/sampler points for compute
...
Fixes page faults on dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.compute.sampler2d
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6516 >
2020-08-31 07:46:31 -04:00
Dave Airlie
dc6313b098
llvmpipe/fs: multisample depth/stencil bad ir generated
...
Need to update the z value after updating the pos at pixel
center, and later reupdate it again, so we can avoid some
LLVM IR values not being dominant issues.
Fixes:
dEQP-VK.renderpass.suballocation.multisample.s8_uint.samples_4
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381 >
2020-08-31 13:20:11 +10:00
Dave Airlie
6d60cd44f3
llvmpipe: add array/3d clearing support
...
Fixes:
dEQP-VK.pipeline.multisample.sampled_image.64x64_4.*.samples_4
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381 >
2020-08-31 13:20:11 +10:00
Dave Airlie
2d6385715d
llvmpipe: blend has effects even if no colorbuffers.
...
ARB_framebuffer_no_attachments + multisampling means blend
can have an effect even outside of colorbufs
Fixes:
dEQP-VK.pipeline.multisample.alpha_to_coverage_no_color_attachment.samples_4.alpha_opaque
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381 >
2020-08-31 13:20:11 +10:00
Dave Airlie
21324c4036
gallivm/nir: lower frexp/ldexp
...
Fixes:
dEQP-VK.glsl.builtin.precision.frexp*
dEQP-VK.glsl.builtin.precision.ldexp*
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381 >
2020-08-31 13:20:11 +10:00
Dave Airlie
1d4a560ba2
gallivm/nir: add indirect swizzle output loading support
...
Fixes:
dEQP-VK.clipping.user_defined.clip_distance.*
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381 >
2020-08-31 13:20:11 +10:00
Dave Airlie
99330e50c9
llvmpipe: add reference counting to fragment shaders.
...
Currently llvmpipe calls finish on the context when a shader
variant has to be destroyed just in case the variant is currently
in use by the setup engine.
Fix this by reference counting the shaders, and reference counting
the shader variants.
Whenever a shader is used in the rasteriser backend, it is added
to a reference list and removed when the rasterizer is finished with it.
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6341 >
2020-08-31 10:02:22 +10:00
Eric Anholt
c24f792c8b
lima: Fix uninitialized var warning from using assert() as unreachable().
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462 >
2020-08-28 22:45:08 +00:00
Eric Anholt
f6456d74ed
lima: Fix unused var/function warnings in release build from assertions.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462 >
2020-08-28 22:45:08 +00:00
Eric Anholt
65f484198a
etnaviv: Fix unused var warning in release build from assertions.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462 >
2020-08-28 22:45:08 +00:00
Eric Anholt
ab6a09f25b
zink: Fix unused var warnings in release build from assertions.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462 >
2020-08-28 22:45:08 +00:00
Eric Anholt
ca73c3bc59
nv50: Fix uninitialized var warnings from using assert() as unreachable().
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462 >
2020-08-28 22:45:08 +00:00
Eric Anholt
689e36ebfe
vc4: Fix unused var warnings in release builds from assertions.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462 >
2020-08-28 22:45:08 +00:00
Eric Anholt
26471264bf
nvc0: Fix compiler warning about unused var that gets asserted.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462 >
2020-08-28 22:45:08 +00:00
Rob Clark
8d1d0c126f
freedreno/a6xx: move ubwc clear to blitter
...
Avoid having to mmap() unnecessarily by moving UBWC clear/init to
blitter.
Because we don't have a context when the bo is allocated, we need to
lazily initialize UBWC data, so hook into the resource_written()
tracking to do this. Don't bother with resource_read() because that
would be undefined anyways.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6475 >
2020-08-28 22:24:25 +00:00
Rob Clark
8d9ab0a33b
freedreno/a5xx+a6xx: use sysmem path for nondraw batches
...
For prologue's in the nondraw path, we need a "gmem" rb that we can emit
the IB to the prologue before the main part of the batch. This has the
side benefit of cleaning up a bunch of duplicate setup code in a5xx.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6475 >
2020-08-28 22:24:25 +00:00
Rob Clark
21b90708a4
freedreno/batch: replace lrz_clear with prologue
...
Replace lrz_clear with the more general purpose prologue rb. While the
epilogue is per-tile (in gmem mode), the prologue is per-batch, so also
add some comments to make that point more clear.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6475 >
2020-08-28 22:24:25 +00:00
Rob Clark
28079970f2
freedreno/batch: split out helper for rb alloc
...
Going to want to re-use this in next patch.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6475 >
2020-08-28 22:24:25 +00:00
Boris Brezillon
d87ab72ce9
panfrost: Avoid accessing pan_pool fields directly
...
Having panfrost_batch access the pan_pool fields directly makes it hard
to change pan_pool internals, like for instance, changing the hash table
for a dynamic array. Let's hide pan_pool internals behind helpers that do
what we need.
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/6494 >
2020-08-28 19:18:08 +00:00
Boris Brezillon
4047c691bf
panfrost: Rename panfrost_create_pool() into panfrost_pool_init()
...
_create functions usually allocate an object and return a pointer to the
allocated object, _init ones usually take an existing object and
initialize it. Let's follow this semantic here by renaming the
panfrost_create_pool() function and updating its prototype.
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/6494 >
2020-08-28 19:18:08 +00:00
Alyssa Rosenzweig
4467e792c5
panfrost: Inline bifrost_tiler_only
...
Pointless abstraction now that fused jobs are dropped.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476 >
2020-08-28 14:53:53 +00:00
Alyssa Rosenzweig
02e768e6a9
panfrost: XMLify invocations
...
Not so bad :)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476 >
2020-08-28 14:53:53 +00:00
Alyssa Rosenzweig
b60d567edd
panfrost: XMLify primitive information
...
This is grouped as the latter part of the prefix. Some kludges around a
magic field for compute jobs that we'll deal with later. (I hope.)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476 >
2020-08-28 14:53:53 +00:00
Alyssa Rosenzweig
3bae493d1a
panfrost: Drop point sprite from shader key
...
It's not implemented on Bifrost, and not needed on Midgard. For Bifrost
this will belong in mesa/st anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476 >
2020-08-28 14:53:53 +00:00
Alyssa Rosenzweig
b17b6cca36
panfrost: Cleanup point sprite linking
...
Use the common Gallium helper, and get the sprite coord mask from the
rasterizer instead of the shader state (which requires useless keying).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476 >
2020-08-28 14:53:53 +00:00
Alyssa Rosenzweig
7d328e7ba9
panfrost: Simplify ZSA bind
...
void* casts are implicit.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476 >
2020-08-28 14:53:53 +00:00
Alyssa Rosenzweig
90cc815628
panfrost: Use pack for draw descriptor
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476 >
2020-08-28 14:53:53 +00:00
Alyssa Rosenzweig
33895ac2c8
panfrost: Use draw pack for compute jobs
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476 >
2020-08-28 14:53:53 +00:00