Dave Airlie
87a638dc1f
gallium/nir/tgsi: fix nir->tgsi info conversion for samplers/image
...
for sampler image arrays this code wasn't getting the correct values.
Fixes:
EQP-VK.binding_model.shader_access.primary_cmd_buf.sampler_immutable.*.descriptor_array*
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381 >
2020-08-31 10:28:26 +10:00
Dave Airlie
668e4c2356
vallium: limit buffer allocations to gallium max.
...
Don't allocate buffers greater than gallium can handle.
Fixes:
dEQP-VK.api.buffer.basic.size_max_uint64
Fixes: b38879f8c5
("vallium: initial import of the vulkan frontend")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381 >
2020-08-31 10:28:21 +10:00
Dave Airlie
857008850f
vallium: handle 3D image views properly.
...
Do pretty much what the gallium state tracker does here, and
fill out first/last layer for 3D image views correctly.
Fixes:
dEQP-VK.binding_model.shader_access.primary_cmd_buf.storage_image*3d*
Fixes: b38879f8c5
("vallium: initial import of the vulkan frontend")
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6381 >
2020-08-31 10:27:38 +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
Jason Ekstrand
ac6b8e42ce
nir: Take a variable remap parameter in nir_inline_function_impl
...
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6411 >
2020-08-29 18:32:46 +00:00
Jason Ekstrand
b6f31898a2
nir: Use a switch in nir_inline_function_impl
...
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6411 >
2020-08-29 18:32:46 +00:00
Jason Ekstrand
b7db9ee320
intel/nir: Clean up lower_alpha_to_coverage a bit
...
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6233 >
2020-08-29 16:41:05 +00:00
Jason Ekstrand
b6fdb1405e
intel/nir: Rewrite the guts of lower_alpha_to_coverage
...
I have no idea how this pass ever worked. I guess it worked ok on the
one or two piglit tests but the whole thing seemed very fragile. It
makes a number of undocumented and unasserted assumptions and they
aren't always valid. This rewrite makes a number of changes:
1. It now properly handles the case where the gl_SampleMask write comes
before the gl_FragColor or gl_FragData[0] write.
2. It should early-exit faster because it now looks at bits in
shader_info::outputs_written instead of looking for variables.
3. Instead of the fragile variable lookup where we try to look the
variable up by both location and driver_location and match, we just
use the driver_location calculations used by brw_fs_nir.
4. It asserts that the index parameter to store_output is a constant
instead of silently failing if it isn't.
5. We now actually assert the implicit assumption that the two writes
are in the same block. We go even further and assert that they are
in the last block in the shader.
6. In the case where 3 or fewer components of the output are written,
we explicitly choose to leave the sample mask alone.
Fixes: 7ecfbd4f6d
"nir: Add alpha_to_coverage lowering pass"
Closes : #3166
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6233 >
2020-08-29 16:41:05 +00:00
Jason Ekstrand
72dc06e07e
intel/nir: Pass the nir_builder by reference in lower_alpha_to_coverage
...
I'm honestly not sure how passing a builder by-value ever worked. I
guess the struct is mostly copyable. In any case, that's the wrong way
to use it and it's causing issues.
Fixes: 7ecfbd4f6d
"nir: Add alpha_to_coverage lowering pass"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6233 >
2020-08-29 16:41:05 +00:00
Eric Anholt
373e25e6b5
ci: Add a release build with -Werror enabled.
...
This will keep us from needing new MRs to fix up release build warnings
after the fact. I've mostly derived from meson-gallium, dropping
components that aren't clean yet.
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
60fb460f9d
virgl: 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
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
Eric Anholt
b9972fb6f5
gallium/tests: Fix compiler warning about unused vars in trivial tests.
...
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
4c24c8239a
panfrost: Fix remaining release-build warnings.
...
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
ecab580d48
panfrost: Fix OOB array access compiler warning.
...
-1 is used to select "choose the dest type", but we were dereffing src[-1]
anyway and the compiler is not a fan.
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
ccb5e0b02b
drm-shim: Fix unused variable warnings from asserts in release build.
...
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
9522eb7be1
panfrost: Store transient BOs in a dynamic array
...
We clearly don't need a hash here since we're never searching for BOs
that are in a pool.
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
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
Daniel Stone
b8f2d71c40
CI: Disable Windows again
...
We thought HTTP was stable after nginx changes, but sadly it isn't.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6495 >
2020-08-28 19:08:39 +01:00
Alyssa Rosenzweig
7fbded8b58
pan/decode: Drop prefix braces
...
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
eb261a8018
panfrost: Remove mali_vertex_tiler_postfix
...
Now XMLified everywhere.
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
760289174b
pan/decode: Use unpack for vertex_tiler_postfix_pre
...
Garbage collect some old incorrect/misleading comments and the braces
while we're at it.
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
2425bac8fe
pan/decode: Use generation for vertex_tiler_postfix
...
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
8004906926
pan/decode: Fix awkward syntax
...
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
c088a3b554
pan/decode: Print shader-db even for compute
...
Stated rationale is silly.
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
6855228726
pan/decode: Drop mali_vertex_tiler_postfix arg
...
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
38ae088565
pan/decode: Drop scratchpad size dump
...
It fails if the scratchpad isn't actually mapped from pandecode's
perspective, and isn't useful information to us at this point.
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
c92be29a47
panfrost: Use nir_builder_init_simple_shader for blits
...
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
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
0c1f44bab7
panfrost: Drop bifrost_payload_fused
...
Fused jobs are broken for various reasons almost everywhere. Drop the
reference - if for some reason somebody wants this later, it's preserved
in git.
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
0225ed4d72
panfrost: Add invocation XML
...
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
Alyssa Rosenzweig
e5c77cbead
panfrost: Detangle postfix from varying emits
...
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