Commit Graph

135064 Commits

Author SHA1 Message Date
Bas Nieuwenhuizen b71406dda1 radv: Determine swizzles correctly.
Previously we were calculating the inverse swizzle instead and doing something
horrible to get 0/1 right, and then "fixing" our table.

Let's do it right an align with the mesa-wide table.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8797>
2021-02-13 21:47:16 +00:00
Hoe Hao Cheng a5685e4dd0 zink: fix detection of KHR_maintenance1/2
Since some extensions never got their dedicated feature structs, not all
extensions promoted to core Vulkan have the relevant feature bits in
`VkPhysicalDeviceVulkanXYFeatures`. Those extensions are supported by
the device when the device version is high enough.

For those extensions, set the screen flags directly if the device
version is sufficient, otherwise check for the extension as usual.

Fixes: efe6f00e ("zink/codegen: do not enable extensions that are now core")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9030>
2021-02-13 19:03:45 +00:00
Erico Nunes 83eebadf92 lima: implement GL_EXT_texture_swizzle
This is a desktop OpenGL 2.1 extension that seems to be required by
glamor to support glyph rendering acceleration with R8 textures.
Implementation borrowed from vc4.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8969>
2021-02-13 18:57:43 +00:00
Vinson Lee 628ce5472c r600/sfn: Initialize FragmentShaderFromNir member m_pos_input.
Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member m_pos_input is not
initialized in this constructor nor in any functions that it
calls.

Fixes: 374bc76706 ("r600/sfn: Add the position input as varying")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9004>
2021-02-12 22:31:06 -08:00
Marek Olšák 0408279e8c radeonsi: add debug options nodisplaytiling and nodisplaydcc
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>
2021-02-13 04:56:05 +00:00
Marek Olšák 61fd8fc10b radeonsi: skip s_sendmsg(gs_alloc_req) for NGG passthrough on new chips
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>
2021-02-13 04:56:05 +00:00
Marek Olšák d151fcf719 amd: sort chip enums based on hw revision
A future commit will depend on this.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>
2021-02-13 04:56:05 +00:00
Marek Olšák 29ca71e10e ac/gpu_info: conceal L2 cache sizes
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>
2021-02-13 04:56:05 +00:00
Marek Olšák 16cf791861 ac/gpu_info: inline get_l2_cache_size and set cache sizes farther down
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>
2021-02-13 04:56:05 +00:00
Marek Olšák bec7b7d528 ac/gpu_info: remove redundant radeon_info::num_sdp_interfaces
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>
2021-02-13 04:56:05 +00:00
Marek Olšák dcb6ab84e6 ac/gpu_info: add radeon_info::num_tcc_blocks
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>
2021-02-13 04:56:05 +00:00
Marek Olšák 4ccf664f05 ac/gpu_info: rename num_tcc_blocks -> max_tcc_blocks
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>
2021-02-13 04:56:05 +00:00
Marek Olšák 7099513380 ac/gpu_info: print use_late_alloc
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>
2021-02-13 04:56:05 +00:00
Marek Olšák 8481a3414f winsys/amdgpu: disallow pb_cache for backing buffers of sparse buffers
because amdgpu_bo_wait doesn't wait for active CS jobs using the buffers.
This fixes incorrect buffer reuse of busy buffers.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8895>
2021-02-12 23:39:11 -05:00
Caio Marcelo de Oliveira Filho a36d5bf11b compiler: Drop now unused gl_varying_slot_name()
There's reuse of values depending on the stage, so a function that
just takes the value might produce invalid results.  All the codebase
was already changed to use the gl_varying_slot_name_for_stage()
instead.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>
2021-02-13 00:44:53 +00:00
Caio Marcelo de Oliveira Filho b5716cadc5 st/atifs: Use gl_varying_slot_name_for_stage()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>
2021-02-13 00:44:53 +00:00
Caio Marcelo de Oliveira Filho 0589bd46c8 etnaviv: Use gl_varying_slot_name_for_stage()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>
2021-02-13 00:44:53 +00:00
Caio Marcelo de Oliveira Filho e4e962cbe0 freedreno/ir3: Use gl_varying_slot_name_for_stage()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>
2021-02-13 00:44:53 +00:00
Caio Marcelo de Oliveira Filho 9da54b9252 intel/compiler: Use gl_varying_slot_name_for_stage()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>
2021-02-13 00:44:53 +00:00
Mike Blumenkrantz 3fc8da13f6 zink: flag exact alu op results in ntv with NoContraction
this propagates the exact flag and ensures precision isn't lost during
optimizations

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8660>
2021-02-12 23:25:40 +00:00
Daniel Schürmann 8b793f9567 aco: remove dead code for the handling of exec temporaries
Totals from 26026 (18.67% of 139391) affected shaders (Navi10):
PreSGPRs: 370993 -> 326177 (-12.08%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8870>
2021-02-12 22:41:31 +00:00
Daniel Schürmann a56ddca4e8 aco: make all exec accesses non-temporaries
So that they are not counted into the register demand.

Totals from 107336 (77.00% of 139391) affected shaders (Navi10):
VGPRs: 4023452 -> 4023248 (-0.01%); split: -0.01%, +0.01%
SpillSGPRs: 14088 -> 12571 (-10.77%); split: -11.03%, +0.26%
CodeSize: 266816164 -> 266765528 (-0.02%); split: -0.04%, +0.02%
MaxWaves: 1553339 -> 1553374 (+0.00%); split: +0.00%, -0.00%
Instrs: 50977701 -> 50973093 (-0.01%); split: -0.02%, +0.01%
Cycles: 1733911128 -> 1733605320 (-0.02%); split: -0.05%, +0.03%
VMEM: 40867650 -> 40900204 (+0.08%); split: +0.13%, -0.05%
SMEM: 6835980 -> 6829073 (-0.10%); split: +0.10%, -0.20%
VClause: 1032783 -> 1032788 (+0.00%); split: -0.01%, +0.01%
SClause: 2103705 -> 2104115 (+0.02%); split: -0.09%, +0.11%
Copies: 3195658 -> 3193656 (-0.06%); split: -0.30%, +0.24%
Branches: 1140213 -> 1140120 (-0.01%); split: -0.05%, +0.04%
PreSGPRs: 3603785 -> 3437064 (-4.63%); split: -5.13%, +0.50%
PreVGPRs: 3321996 -> 3321850 (-0.00%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8870>
2021-02-12 22:41:31 +00:00
Daniel Schürmann 5d7b3bf1a7 aco: handle non-temp phi definitions and operands
This will be necessary as we make exec non-temp.

No fossil-db changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8870>
2021-02-12 22:41:31 +00:00
Daniel Schürmann e663a15098 aco: don't create unnecessary exec phi on merge blocks
No fossil-db changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8870>
2021-02-12 22:41:31 +00:00
Alejandro Piñeiro 3f614c6f7c v3dv/meta_copy: get tlb compatible BC compressed formats for copies
So we can use the tlb path for several operations (copy image, clear,
copy buffer to image, etc).

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929>
2021-02-12 22:04:13 +00:00
Alejandro Piñeiro 6fdf375a90 v3dv/formats: expose support for BC1-3 compressed formats
Even though we can't expose textureCompressedBC as the hw doesn't
support all the formats, we can expose as supported individual
formats.

This gets several ~850 CTS tests going from skip to pass, with
patterns like:

  * dEQP-VK.texture.compressed.bc*
  * dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.2d*bc*
  * dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.3d*bc*
  * dEQP-VK.api.info.image_format_properties*bc*
  * etc

v2: BC1-3 formats are texture filterable (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929>
2021-02-12 22:04:13 +00:00
Alejandro Piñeiro fcb229cbe0 v3dv/device: clarify that we can't expose textureCompressionBC
From spec:

"textureCompressionBC specifies whether all of the BC compressed
 texture formats are supported. If this feature is enabled"

Note the *all*. v3d hw supports BC1, BC2, and BC3, but not BC4 through
BC7.

Let's clarify that we can't expose textureCompressionBC even if we
support some of them.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929>
2021-02-12 22:04:13 +00:00
Alyssa Rosenzweig 643873a94f docs/features: gl_HelperInvocation on Panfrost
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig 2f70317e0d docs/features: Mark sample shading done on Panfrost
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig 2193d768bd docs/features: Mark some ES3.1 done on Panfrost
These should be working on both Midgard and Bifrost now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig 0308095af7 docs/features: Mark more TBO exts done on panfrost
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig 2e33dfafbe panfrost: Advertise OES_standard_derivatives
Has been implemented for ages since it's part of ES3, but we missed the
CAP needed for the ES2 extension.

Closes: #4203
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig f21e13301a panfrost: Bump advertised ESSL feature level
Needed to run more dEQP tests.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig ea289ee1db panfrost: Bump max SSBO count
There's no actual architectural limit, this is totally arbitrary, but
fixes some NotSupported errors in dEQP-GLES31.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:32 -05:00
Alyssa Rosenzweig 6bba718027 panfrost: Advertise SAMPLE_SHADING
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 9aede94711 panfrost: Assert on indirect compute shaders
This case was overlooked. Much simpler than indirect graphics calls, can
come as a follow on to the other indirect work.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 4b00d311e7 panfrost: Remove stale TODOs
The answer is no, we do not. Putting them in the primary batch allows
proper intermixing with graphics work. There's no harm for pure compute
loads, either.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 5d83442f8e panfrost: Simplify bind_compute_state
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 856f0abd2b pan/{mdg, bi}: Lower load_sample_pos
Conceptually same lowering as the DDK, although we're missing a number
of relevant compiler optimizations so the generated code is awful.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 00c1d5da34 pan/{mdg, bi}: Lower load_helper_invocation
Passes dEQP-GLES31.functional.shaders.helper_invocation.* on both
architectures

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 00df274586 pan/bi: Implement coverage mask updates
Impressive how simple this looks after dozens of patches of
sysval-related prepwork :)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig ae8b1fa7db pan/bi: Decouple sysval loading from NIR
Useful for builder-based sysvals.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 1e7b5f3826 pan/bi: Implement nir_intrinsic_load_sample_positions_pan
Just copy the FAU result.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig ca0f50ec6a pan/bi: Implement load_sample_mask_in
Preloaded.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 92569f5d6e pan/bi: Fix gl_SampleID read
Fixes dEQP-GLES31.functional.shaders.sample_variables.sample_id.default_framebuffer

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 56240f6e85 pan/bi: Lower ifind_msb
We have ufind_msb efficient, implement in terms of that.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig ad06e0592a pan/bi: Implement ufind_msb
Lowered to #(sz - 1) - clz(x), taking advantage of the machine's
8-bit and 16-bit variants of clz and the widening on the second argument
of ISUB to implement neatly in two instructions.

Note that in NIR, ufind_msb can take any integer type but always output
i32.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Alyssa Rosenzweig 2ef97a079a pan/bi: Implement bitfield_reverse
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:31 -05:00
Boris Brezillon 06d6dd1b40 pan/bi: Support bit_count()
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:30 -05:00
Boris Brezillon 58e887f07e pan/bi: Add uclz() support
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
2021-02-12 16:44:30 -05:00