Commit Graph

149478 Commits

Author SHA1 Message Date
Kenneth Graunke 4d4f57b15c isl: Add isl_dev->mocs.blitter_{src,dst} fields
These will be used for XY_BLOCK_COPY_BLT on XeHP.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14687>
2022-01-24 23:27:25 +00:00
Kenneth Graunke abd71630fc blorp: Add a blorp_address::local_hint flag
This will be used as a performance hint for XY_BLOCK_COPY_BLT to
indicate whether the source/destination surfaces are (likely) in
device-local memory or system memory.  We don't need to be precise
here - it's okay to set the fields to LOCAL even if a buffer has
been evicted out to system memory.

We should set this from Vulkan too, but I haven't yet.  There isn't
a convenient anv_bo field like there is in iris...

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14687>
2022-01-24 23:27:25 +00:00
Kenneth Graunke 5262475242 intel/dev: Add a has_flat_ccs flag
This should only be set on XeHP.  It implies that CCS works via based on
the virtual addresses involved and a flat memory carve-out, rather than
treating CCS like a surface, or using auxiliary maps.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14687>
2022-01-24 23:27:25 +00:00
Kenneth Graunke 3e0bffbad3 intel/genxml: Add XY_BLOCK_COPY_BLT Color Depth enum values
Requested by Jason.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14687>
2022-01-24 23:27:25 +00:00
Kenneth Graunke 79b199b333 intel: Allow copy engine class in intel_gem_create_context_engines()
I want to use I915_ENGINE_CLASS_COPY in iris.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14687>
2022-01-24 23:27:25 +00:00
Mike Blumenkrantz 08ffbc055b lavapipe: remove unused struct member
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14695>
2022-01-24 22:55:07 +00:00
Thomas H.P. Andersen 373847609c ci: debian-android: drop -Wno-error=unused-label
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14639>
2022-01-24 22:23:33 +00:00
Thomas H.P. Andersen 73232d000f anv: drop unused label
Added in 053d4c328f
Last usage removed in 0967584549

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14639>
2022-01-24 22:23:33 +00:00
Mike Blumenkrantz 3dcf275786 vulkan/wsi: add VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT for swapchain image caps
I need this, and drivers can do it, so add it

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14641>
2022-01-24 21:53:21 +00:00
Dave Airlie f6926efaad mesa/st: move st_fb_orientation into a mesa function
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:27 +10:00
Dave Airlie 840aabe752 mesa/st: move invalidate_on_gl_viewport to ctx
This is cleaner in the gl context now.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:23 +10:00
Dave Airlie 0ba5def21a mesa/st: move manager colorbuffer interface to gl_context.
This just avoids some st_context in main.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:19 +10:00
Dave Airlie 2f14e0d695 mesa/st: move renderbuffer format choosing wrapper into mesa.
This moves this and cleans up the results.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:16 +10:00
Dave Airlie f74648f912 mesa/st: move last of renderbuffer functionality into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:12 +10:00
Dave Airlie 98df4f7a83 mesa/st: migrate blit code into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:09 +10:00
Dave Airlie 5f675630d9 mesa/st: fixup viewport drawable invalidation
This moves the code into more appropriate places

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:04 +10:00
Dave Airlie 018251908e mesa/st: move some fbo helpers around.
This inlines one, and moves the other to a more appropriate place

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:04:01 +10:00
Dave Airlie 9c7e79c4b7 mesa/st: move st_new_renderbuffer_fb to manager
This is st_manager code really.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:57 +10:00
Dave Airlie b70b738bd1 mesa/st: move map/unmap renderbuffer code into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:55 +10:00
Dave Airlie 90e4e7cf74 mesa/st: move st renderbuffer code into mesa renderbuffer
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:49 +10:00
Dave Airlie f88fb21885 mesa/st: move DrawBufferAllocate into mesa.
Little bit of refactoring here.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:45 +10:00
Dave Airlie 57dcaac31d mesa/st: move st_ReadBuffer functionality into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:42 +10:00
Dave Airlie e9b12fe20e mesa/st: move validate/discard framebuffer into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:39 +10:00
Dave Airlie caa7009cff mesa/st: move render/finish_render texture in to mesa.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:36 +10:00
Dave Airlie 7645e24045 mesa/st: merge framebuffer objects from st to mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:32 +10:00
Dave Airlie 21d4dd8c39 mesa/st: move some renderbuffer code into mesa
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:27 +10:00
Dave Airlie 527b6ca412 mesa/st: merge st_renderbuffer into gl_renderbuffer.
This touches lots of places

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
2022-01-25 07:03:23 +10:00
Jesse Natalie 0b6caed85c mesa/st: Lower user clip planes for tess eval too
The logic in st_atom_shader.c leads me to believe this was supposed
to work, but was incomplete to actually finish it. This fixes
compatibility tess tests on d3d12.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14662>
2022-01-24 09:13:57 -08:00
Alyssa Rosenzweig c85df67f27 pan/decode: Fix missing newlines in error messages
Otherwise these error message lines end up truncated, which is a bit
annoying.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14575>
2022-01-24 16:20:49 +00:00
Alyssa Rosenzweig 2bdfa4800d pan/bi: Pull BLEND precolouring out of per-dest loop
Indentation fail. This should happen once per instruction, not once per
destination. In theory, this is a minor performance win; in practice,
it's simply less wrong.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14575>
2022-01-24 16:20:49 +00:00
Alyssa Rosenzweig 1e5bb54f59 panfrost: Only cull polygons
The spec says only polygons, not points/lines, should be culled when
culling is enabled. The hardware does not make this distinction, so we
have to.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95 <ixn@disroot.org>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14575>
2022-01-24 16:20:49 +00:00
Alyssa Rosenzweig 3f1abda631 panfrost: Use u_reduced_prim for primitive checks
Use a Gallium helper that papers over the differences between primitive
types, as required by hardware operation.

[Cc'd to mesa-stable for use in the next commit.]

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14575>
2022-01-24 16:20:49 +00:00
Rob Clark 2dfebf3487 freedreno/a5xx: Fix clip_mask
The clip_mask needs to also take into account rast->clip_plane_enable

Fixes: 99838513ae ("freedreno/a5xx: Add support for clip distances and use them for userclip.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
2022-01-24 15:51:47 +00:00
Rob Clark d26cdfac2c freedreno/a6xx: Fix clip_mask
The clip_mask needs to also take into account rast->clip_plane_enable

Fixes: f2ae8d116a ("freedreno/a6xx: Implement user clip/cull distances")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
2022-01-24 15:51:47 +00:00
Rob Clark 5e2bd30ea4 freedreno: Add FD_DIRTY_RASTERIZER_CLIP_PLANE_ENABLE
Add a dirty bit for clip_plane_enable changes.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
2022-01-24 15:51:47 +00:00
Rob Clark c190356040 freedreno: Pass shader cache key instead of shader key
We are going to need to extend the cache key to add state that effects
the program stateobj, but not necessarily the shader itself (ie. so
ir3_shader_key wouldn't be the correct place to add it).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
2022-01-24 15:51:47 +00:00
Rob Clark 26d591a669 mesa/st: Lowered ucp should still mark rast state dirty
Lowered clip planes should respect the enabled/disabled GL_CLIP_PLANEn
(aka GL_CLIP_DISTANCEn), which means updating the rast state as well.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14643>
2022-01-24 15:51:47 +00:00
Alyssa Rosenzweig b4108e1d01 agx: Lower UBO loads to use per-element indexing
This lets us support indirect access to UBOs easily. The existing
constant special case disappears too, since the peephole optimizer can
inline the constant later. (note: this is too conservative since we can
go up to 16-bit immediates...)

Unfortunately, nir_opt_algebraic can't seem to optimize expressions like
"((a << 3) + 4) >> 2" to "(a << 1) + 1" which would be necessary for
reasonable perf out of this...

Fixes:

dEQP-GLES2.functional.shaders.indexing.uniform_array.float_dynamic_loop_read_fragment

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14581>
2022-01-24 14:25:18 +00:00
Rohan Garg 1c825d14fb docs: Update features and new_features for anv
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14681>
2022-01-24 14:18:33 +00:00
Iago Toral Quiroga a6aa35a091 v3dv: implement VK_KHR_driver_properties
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14680>
2022-01-24 13:56:39 +00:00
Bas Nieuwenhuizen 492dc06fbe radv: Remove VK_EXT_display_control support in favor of common impl.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14365>
2022-01-24 12:57:35 +00:00
Bas Nieuwenhuizen 3443557364 anv: Remove VK_EXT_display_control support in favor of common impl.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14365>
2022-01-24 12:57:35 +00:00
Bas Nieuwenhuizen ce95871a50 vulkan/wsi/display: Add common implementation of VK_EXT_display_control.
Based on the new vk_sync functions.

Copied the version from anv as that seemed more thorough by using the
temporary sync payload. However that does mean we have do use the vk_sync
functions instead of being able to layer it on top of the dispatch table.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14365>
2022-01-24 12:57:35 +00:00
Rohan Garg 63e91148b7 anv: Enable VK_VALVE_mutable_descriptor_type
This change introduces the anv_descriptor_size_for_mutable_type and
anv_descriptor_data_for_mutable_type helpers to compute the size and
data flags respectively for mutable descriptor types.

In order to make handling these types easier we now store a precomputed
descriptor stride for all types and use in the in appropriate places.

We also need to adjust the compiler to take into account this descriptor
stride. To that extent, we now pack the stride into the upper 16 bits
alongside the index and the dynamic offset index and use it later to
compute the correct offset.

Closes: #4250
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14633>
2022-01-24 12:24:53 +00:00
Jianxun Zhang e1376b59ef anv: refactor queue chain
Simplify the buffer chaining process with a single loop and
a helper function from Lionel Landwerlin's input.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14578>
2022-01-24 11:53:06 +00:00
Iago Toral Quiroga be11948a95 broadcom/simulator: handle DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT
Without this the simulator wrapper will abort upon seeing this
query, rendering the driver unusable in that context.

Also, it seems the simulator environment doesn't quite work with
multisync at present, so do not enable it until we figure out what
the issue is.

Reviewed-by: Melissa Wen <mwen@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14678>
2022-01-24 11:34:00 +00:00
Samuel Pitoiset a0e8b774fc radv: stop checking if pipelines are NULL during draws/dispatches
This can't happen.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14617>
2022-01-24 11:15:00 +00:00
Kenneth Graunke 77b93cf3b1 iris: Directly access BOs rather than using iris_resource_bo(...)
iris_resource_bo() is convenient when we only have a pipe_resource *
variable, and don't need to do a lot with it other than get at the BO.

When we need to do more with a resource, we usually cast it to
iris_resource *, at which point we can just use res->bo instead.

This patch updates iris_copy_region to use src_res->bo, dst_res->bo,
rather than iris_resource_bo(src) and iris_resource_bo(dst), since we
already have those cast versions on hand.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14667>
2022-01-24 10:28:50 +00:00
Iago Toral Quiroga 33c668a0e0 docs/features: flag VK_KHR_create_renderpass2 as implemented for v3dv
This was implemented in 3c86292321.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14677>
2022-01-24 10:58:51 +01:00
Samuel Pitoiset 86b8fa9aee radv: do not restore NULL compute pipelines after meta operations
This should be safe as long as the driver restores descriptors and
push constants correctly for compute pipelines.

This might also reduce the number of compute pipeline changes if eg.
consecutve subpass fast clears with compute.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14616>
2022-01-24 08:47:58 +00:00