Commit Graph

126091 Commits

Author SHA1 Message Date
Jesse Natalie 0e90b3d0c4 nir: Support load/store of temps as scratch in nir_lower_explicit_io
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5889>
2020-07-14 18:15:40 +00:00
Jesse Natalie 99aaf0ec18 nir: When nir_lower_vars_to_explicit_types is run on temps, update scratch_size
To allow interop with other scratch ops, append any remaining temp vars
to the end of any already-allocated scratch space.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5889>
2020-07-14 18:15:40 +00:00
Jesse Natalie bf138c1fd4 nir_lower_io: Add addr_format_is_offset helper
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5889>
2020-07-14 18:15:40 +00:00
Jonathan Marek d00487dd42 freedreno/regs: update a6xx PC regs
Update some registers in the 0x9800-0xa000 range.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5870>
2020-07-14 18:00:06 +00:00
Jonathan Marek 2e32a20f7c freedreno/regs: update a6xx VPC regs
Update some registers in the 0x9000-0x95ff range.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5870>
2020-07-14 18:00:06 +00:00
Jonathan Marek e883aa2585 freedreno/regs: update a6xx RB regs
Update some registers in the 0x8c00-0x8dff range.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5870>
2020-07-14 18:00:06 +00:00
Jonathan Marek a5c668518a freedreno/regs: update a6xx GRAS registers
Update some registers in the 0x8000-0x87ff range.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5870>
2020-07-14 18:00:06 +00:00
Jonathan Marek be33d5859e gitlab-ci: re-enable arm64_a630_vk
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5904>
2020-07-14 17:15:06 +00:00
Jonathan Marek f37f1a1a64 turnip: remove use of tu_cs_entry for draw states
The tu_cs_entry struct doesn't match well what we want for SET_DRAW_STATE
and CP_INDIRECT_BUFFER (requires extra steps to get iova and size), so
start phasing it out.

Additionally, use newly added tu_cs_draw_state where it doesn't require any
effort (it requires a fixed size, but gets rid of the extra end_sub_stream)

Note this also changes the behavior of CmdBindDescriptorSets for compute to
emit directly in cmd->cs instead of doing through a CP_INDIRECT.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5558>
2020-07-14 17:00:08 +00:00
Jonathan Marek 7f24a69ace turnip: fix inconsistencies with tu6_load_state_size
The next patch assumes the correct size is returned in tu6_emit_load_state.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5558>
2020-07-14 17:00:07 +00:00
Jonathan Marek bf997ca306 turnip: emit compute pipeline directly in CmdBindPipeline
There's no need to defer it, and can get rid DIRTY_COMPUTE_PIPELINE.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5558>
2020-07-14 17:00:07 +00:00
Jonathan Marek dce6cb1196 turnip: use DIRTY SDS bit to avoid making copies of pipeline load state ib
Some testing showed that the DIRTY bit has the desired behavior, so use it
to make things a bit simpler.

Note in CmdBindPipeline, having the TU_CMD_DIRTY_DESCRIPTOR_SETS behind a
if(pipeline->layout->dynamic_offset_count) was wrong.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5558>
2020-07-14 17:00:07 +00:00
Mike Blumenkrantz 2e488305d6 zink: try to handle multisampled null buffers
I don't have any tests for this that I've run into yet, so this is mostly
just guessing

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5686>
2020-07-14 16:40:12 +00:00
Mike Blumenkrantz 1ee598cfed zink: handle empty attachments
create an empty buffer and surface to reuse for the fb attachment here

this fixes most of the arb_framebuffer_object tests in piglit

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5686>
2020-07-14 16:40:12 +00:00
Icecream95 6493d29f21 pan/mdg: Fix non-debug compiliation
Fixes error when the assert is optimized out:

   ../src/panfrost/midgard/midgard_compile.c: In function ‘output_load_rt_addr’:
   ../src/panfrost/midgard/midgard_compile.c:1644:1: error: control reaches end of non-void function [-Werror=return-type]
    }

Closes #3270

Fixes: 7781d2c2ea ("pan/mdg: Support MRT in output load lowering")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5895>
2020-07-14 15:54:41 +00:00
Michel Dänzer 89caa485f1 Revert https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580
It broke the CI pipeline on master:

https://gitlab.freedesktop.org/mesa/mesa/-/jobs/3604314
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/3604315

Revert for now, to allow other MRs to be merged.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5905>
2020-07-14 17:08:10 +02:00
Karol Herbst 460300ed59 nouveau: expose HMM
v2: moved caps

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>
2020-07-14 14:05:00 +00:00
Karol Herbst efa847dbc9 nvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
v2: rework by adding a new buffer status

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>
2020-07-14 14:04:59 +00:00
Karol Herbst dd2cc5bc44 gallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
With the current UAPI we only support user pointers from the compute
engines, so we need a way to express that in gallium.

v2: fix typos
v3: add allows_user_pointers helper

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>
2020-07-14 14:04:59 +00:00
Karol Herbst f67cd0bbd9 nouveau: enable HMM
v2: move declarations into libdrm
v3: fix typos
    rework handling of how much memory to reserve
v4: remove unused parameter
    unmap cutout on error and when the screen is destroyed
v5: move into screen_create
    enable HMM only if CL gets enabled

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>
2020-07-14 14:04:59 +00:00
Karol Herbst 6f4a6ed0e0 ci: bump libdrm to 2.4.102
Since version 2.4.101 there are only xz archives hence the bz2 to xz
change.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>
2020-07-14 14:04:59 +00:00
Mike Blumenkrantz e1e7584bde zink: block resolve blits for depth/stencil buffers
"The format features of dstImage must contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT"
- vkCmdResolveImage spec

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5888>
2020-07-14 12:57:22 +00:00
Mike Blumenkrantz 582669f07e zink: block vkCmdBlitImage usage for multi sampled blits
this is prohibited by spec

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5888>
2020-07-14 12:57:22 +00:00
Mike Blumenkrantz ab78831baa zink: try copy_region hook for blits where we can't do a regular blit or resolve
in cases where the formats match, we can likely just pass this through for now

fixes a ton of spec@!opengl 1.1@depthstencil-default_fb-blit piglit tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5888>
2020-07-14 12:57:22 +00:00
Erik Faye-Lund 34fe561895 mesa/main: use call_once instead of open-coding
We already have a utility for this, so let's use that instead.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5879>
2020-07-14 10:56:03 +00:00
Erik Faye-Lund 0a4aa612ba mesa/main: factor out one-time-init into a helper
This will make the next commit a bit cleaner.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5879>
2020-07-14 10:56:03 +00:00
Karol Herbst 38e3cbb639 gv100/ir: set ftz bit on floating point operations
Fixes Unigine Heavens ambient occlusion

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5881>
2020-07-14 10:35:24 +00:00
Eric Engestrom f95637f01a meson: fix android vulkan build
Android doesn't have `pthread_cancel()` and is unlikely to ever
implement it [1], but `wsi_common_display.c` needs it (or an
alternative).

Let's just disable the platform on Android (as it used to be
before 448eb19158).

[1] https://android-review.googlesource.com/c/platform/bionic/+/1215779/1/docs/status.md

Fixes: 448eb19158 ("vulkan: automatically compile the `display` platform when available")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5860>
2020-07-14 09:34:54 +00:00
Michel Dänzer 3ed104b2aa gitlab-ci: Drop dependencies:
Artifacts from jobs listed in needs: are downloaded by default, so
there's no need to list them in dependencies: as well (in fact,
https://docs.gitlab.com/ce/ci/yaml/#artifact-downloads-with-needs says
using dependencies: together with needs: is invalid, so we might have
been getting lucky...).

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5845>
2020-07-14 08:51:14 +00:00
Michel Dänzer aa2457fc13 gitlab-ci: Remove indirect dependencies from needs:
Tomeu discovered that GitLab 12.8 fixed the bug where jobs would
spuriously run even though some of their dependency jobs were skipped.
So we don't need to list indirect dependencies anymore.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5845>
2020-07-14 08:51:14 +00:00
Connor Abbott bf1376aba0 tu: Don't invalidate irrelevant state when changing pipeline
At least in the future this could let us avoid re-emitting gfx/cs
constants when the other changes. This also matches what the blob does.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5877>
2020-07-14 10:23:58 +02:00
Connor Abbott a16136796f freedreno/a6xx: Add some documentation for shared consts
I'm not convinced we'll actually want to use this, and there may be
another enable bit in SP_UNKNOWN_AB00, but it's nice to at least write
this down in case we want to try using it in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5877>
2020-07-14 10:23:58 +02:00
Connor Abbott e1fa740c4c freedreno/a6xx: Rename and document HLSQ_UPDATE_CNTL
It turns out that this clears CP_LOAD_STATE6 packets, including
disabling any pending loads for SS6_INDIRECT/SS6_BINDLESS (these loads
don't actually happen until the draw itself, and I'm not sure if they
happen if the state is unused by the shader) and marking constants and
UBO descriptors loaded with SS6_DIRECT as invalid. It's used very
differently from HLSQ_UPDATE_CNTL on a4xx from whence the name came, and
unlike on a4xx it's not readable, so this probably doesn't line up with
HLSQ_UPDATE_CNTL on a4xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5877>
2020-07-14 10:23:58 +02:00
Serge Martin dad042b15a clover: implements clEnqueueFillBuffer
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5897>
2020-07-14 09:33:02 +02:00
Serge Martin fea109d40f clover: add more cl_mem_object_type to pipe_texture_target mapping
It avoid unnecessary CL_INVALID_VALUE return from clGetSupportedImageFormats

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5897>
2020-07-14 09:33:02 +02:00
Samuel Pitoiset ac642d8e6d radv: add the custom border color BO to the list of buffers
The buffer was never added to the list of buffers. This might lead to
VM faults and GPU hangs.

Found this by luck.

Fixes: 57e796a12a ("radv: Implement VK_EXT_custom_border_color")
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/5884>
2020-07-14 08:29:06 +02:00
Kristian H. Kristensen 684cfca748 freedreno/registers: Rename SP_2D_SRC_FORMAT
This register contains information about the destination format, so
let's rename to SP_2D_DST_FORMAT.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen d5c82c3c5f freedreno/a6xx: Split clear and blit texture into different functions
Now that most of the state programming is in shareable helpers, we can
split emit_blit_or_clear_texture into emit_blit_texture and
fd6_clear_surface.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen f383b2c18a freedreno/a6xx: Don't take pipe_blit_info in emit_blit_dst
We only need a few fields and we'll want to use this in cases where we
don't have a pipe_blit_info.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen 3158b8ba0a freedreno/a6xx: Program RB_UNKNOWN_8C01 in setup helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen 3ee89e6d03 freedreno/a6xx: Move CP_SET_MARKER to setup helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen 3961fb7e28 freedreno/a6xx: Move REG_A6XX_SP_2D_SRC_FORMAT programming to helper
Rename helper to emit_blit_setup().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen 03ad130bc9 freedreno/a6xx: Program A6XX_SP_2D_SRC_FORMAT_COLOR_FORMAT based on dst format
It's a badly named register...

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen 5c3c0c5c7b freedreno/a6xx: Make blit_control helper a little more helpful
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen 77d4aa7687 freedreno/a6xx: Enable FMT6_10_10_10_2_UNORM blitting
Now that we correctly program the _DEST version for the blit
destination and use float16 internal format, these formats work with
the blitter.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen 1a58596258 freedreno/a6xx: Separate stencil sysmem clear fix
We need to clear with PIPE_FORMAT_S8_UINT.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen ab61393bc7 freedreno/a6xx: Don't emit src state when clearing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen 416513d915 freedreno/a6xx: Consolidate computing blit_cntl
Compute the blit_cntl value in one place and group it with the
register writes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen b36c675858 freedreno/a6xx: Program SP_2D_SRC_FORMAT outside blit loop
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00
Kristian H. Kristensen 556cd8f3e1 freedreno/a6xx: Set src and dst rects outside blit loop
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5717>
2020-07-14 06:12:22 +00:00