platform/upstream/mesa.git
3 years agofreedreno/ci: Isolate dEQP-EGL reset_context tests
Rob Clark [Fri, 30 Apr 2021 19:48:42 +0000 (12:48 -0700)]
freedreno/ci: Isolate dEQP-EGL reset_context tests

To reduce flakes, separate out the dEQP-EGL tests that are intentionally
triggering GPU hangs.  This avoids some kernel side issues with bad
handling of ringbuffer-full scenarios, causing innocent tests to flake.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10560>

3 years agoci: Add DEQP_CASELIST_INV_FILTER
Rob Clark [Fri, 30 Apr 2021 19:41:03 +0000 (12:41 -0700)]
ci: Add DEQP_CASELIST_INV_FILTER

Inverts the match compared to DEQP_CASELIST_FILTER

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10560>

3 years agoci/freedreno: Mark another recent piglit flake.
Eric Anholt [Fri, 30 Apr 2021 17:19:29 +0000 (10:19 -0700)]
ci/freedreno: Mark another recent piglit flake.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10552>

3 years agoci/freedreno: Mark new flakes from the go-fast branch.
Eric Anholt [Fri, 30 Apr 2021 17:18:03 +0000 (10:18 -0700)]
ci/freedreno: Mark new flakes from the go-fast branch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10552>

3 years agoci/freedreno: Mark dEQP-EGL flakes reported on IRC since its introduction.
Eric Anholt [Fri, 30 Apr 2021 17:12:56 +0000 (10:12 -0700)]
ci/freedreno: Mark dEQP-EGL flakes reported on IRC since its introduction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10552>

3 years agopanfrost: Fix viewport scissor for preload draws
Icecream95 [Fri, 30 Apr 2021 10:18:09 +0000 (22:18 +1200)]
panfrost: Fix viewport scissor for preload draws

The max values are inclusive, so add 1 before aligning. This means
that a max of 32 will be aligned up to 64 then be decremented to 63.

Add a comment to the pan_fb_info struct to document maxx and maxy as
inclusive.

Fixes: 8ba2f9f6985 ("panfrost: Create a blitter library to replace the existing preload helpers")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10542>

3 years agopanfrost: Remove incorrect comment
Icecream95 [Fri, 30 Apr 2021 10:16:12 +0000 (22:16 +1200)]
panfrost: Remove incorrect comment

The comment was wrong in its original location and is wrong here, just
remove it.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10542>

3 years agomeson/vulkan: fix linkage on windows
Dylan Baker [Wed, 28 Apr 2021 23:14:58 +0000 (16:14 -0700)]
meson/vulkan: fix linkage on windows

The current approach likley breaks icl and clang-cl, but it seems that
the problem isn't even really related to MSVC, but to Meson's Visual
Studio backend, as such, let's use link-whole unless we're using a
Visual Studio backend.

Fixes: 48d31a6280c4de07279435606a5c0524c1787cad
       ("meson: link vulkan_util with link_whole on mingw")

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: James Park <jpark37@lagfreegames.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10506>

3 years agogitlab-ci: enable all 3 intel devices as manual in MR pipelines
Gustavo Padovan [Fri, 23 Apr 2021 11:20:42 +0000 (08:20 -0300)]
gitlab-ci: enable all 3 intel devices as manual in MR pipelines

This uses the rule created by .test-manual-mr that enables experimental
devices in MR pipelines, but not for Marge.

The goal is to expose the devices to more possibility of testing before
we enable them automatically.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10405>

3 years agogitlab-ci: rule anchor for experimental devices as manual in MRs
Gustavo Padovan [Thu, 22 Apr 2021 11:17:40 +0000 (08:17 -0300)]
gitlab-ci: rule anchor for experimental devices as manual in MRs

We want to give developers the option to run their jobs on devices
that are still being stabilized in the CI infrastructure.

These jobs should be optional and not prevent merging from happening.

The is-forked-branch-or-pre-merge anchor was not being used anywhere,
so it was changed to is-forked-branch-or-pre-merge-not-for-marge to
create this new rule.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10405>

3 years agointel/isl: Fix isl_color_value_unpack to match the prototype
Jason Ekstrand [Fri, 30 Apr 2021 03:47:35 +0000 (22:47 -0500)]
intel/isl: Fix isl_color_value_unpack to match the prototype

The prototype uses a pointer and the actual function definition had an
array.  For some reason, GCC never complained about this until GCC 11.
This fixes a compile warning when building with GCC 11.

Fixes: 09ced6542049 "intel/isl: Add format conversion code"
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10537>

3 years agoir3: do not move varying inputs that depend on unmovable instrs
Danylo Piliaiev [Tue, 27 Apr 2021 11:51:26 +0000 (14:51 +0300)]
ir3: do not move varying inputs that depend on unmovable instrs

Not all varying fetches could be pulled into the start block.
If there are fetches we couldn't pull, like load_interpolated_input
with offset which depends on a non-reorderable ssbo load or on a
phi node, this pass is skipped since it would be hard to find a place
to set (ei) flag (beside at the very end).

We also don't have to manually set (ei) in such cases since a5xx and
a6xx do automatically release varying storage at the end.
Earlier gens need further testing, however they do not support
interpolateAt* functions at moment, so unless we would like to support
sample shading on them - they are fine.

Fixes crash in GTA V.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10483>

3 years agoci: add the dEQP expectations for radv on Renoir
Martin Peres [Thu, 29 Apr 2021 14:42:47 +0000 (17:42 +0300)]
ci: add the dEQP expectations for radv on Renoir

This patch should not be backported directly to 21.1, as master already
fixed one failure. I'll post a backport of this series with the
additional failure documented when this one gets merged.

v2:
 - remove dEQP-VK.synchronization.* from the skip list (Hakzsam)
 - drop dEQP-VK.memory.pipeline_barrier.* from the skip list (Hakzsam, me)

v3:
 - re-introduce dEQP-VK.memory.pipeline_barrier.transfer_src_transfer_dst.1048576

Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10539>

3 years agozink: also enable float16 from KHR extension
Erik Faye-Lund [Fri, 30 Apr 2021 08:03:49 +0000 (10:03 +0200)]
zink: also enable float16 from KHR extension

This allows us to use 16 bit floats on pre Vulkan 1.2 drivers as well.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink/codegen: prefer first definition of prop/feature structs
Erik Faye-Lund [Fri, 30 Apr 2021 08:00:50 +0000 (10:00 +0200)]
zink/codegen: prefer first definition of prop/feature structs

Some extensions have renamed their property and/or feature structs,
listing the "correct" type first. So we should prefer that one rather
than overwriting it with a later one.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink: enable 16-bit float support
Erik Faye-Lund [Wed, 7 Apr 2021 14:50:22 +0000 (16:50 +0200)]
zink: enable 16-bit float support

This finally enables the 16-bit float feature.

Ideally we would also check VK_KHR_shader_float16_int8, but the python
code for that is giving me some issues now, so let's deal with that
later.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink: perform fp16 texture-lookups as fp32 and then convert
Erik Faye-Lund [Thu, 8 Apr 2021 08:31:15 +0000 (10:31 +0200)]
zink: perform fp16 texture-lookups as fp32 and then convert

SPIR-V doesn't seem to have any opcodes to sample textures using lower
precision directly, so let's sample and downcast later instead.

Ideally, we'd do this as a NIR-pass first, but this does the trick for
now.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink: support emitting 16-bit float types
Erik Faye-Lund [Wed, 7 Apr 2021 14:50:22 +0000 (16:50 +0200)]
zink: support emitting 16-bit float types

This prepares us for being able to support using 16-bit float types
in shaders, which might help performance in some cases.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink: enable 16-bit int support
Erik Faye-Lund [Tue, 6 Apr 2021 16:52:19 +0000 (18:52 +0200)]
zink: enable 16-bit int support

The mysterious support_16bit_int_alu-option doesn't really mean what it
says. Instead it means "we support 16 bit compares, if 16 bit ALU
operations occur". And since 16 bit operations only appear if we're
lowering mediump/lowp, we can always set this option.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink: support emitting 16-bit int types
Erik Faye-Lund [Tue, 6 Apr 2021 16:51:06 +0000 (18:51 +0200)]
zink: support emitting 16-bit int types

This prepares us for being able to support using 16-bit int types in
shaders, which might help performance in some cases.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink: always lower function-temp derefs
Erik Faye-Lund [Wed, 7 Apr 2021 17:26:33 +0000 (19:26 +0200)]
zink: always lower function-temp derefs

We're about to need this in order to support 16-bit floats, because the
lowering code for that emits function-temp derefs, and we don't handle
it.

A better long-term solution would be to just support function-temp
variables and indirect derefs. But that's more work, and kinda
orthogonal to what this patchset tries to accomplish, so let's save that
for another day.

Fixes the following piglit:
- spec@arb_gl_spirv@execution@ubo@array-inside-ubo-copy

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink: run nir_opt_algebraic_late
Erik Faye-Lund [Tue, 6 Apr 2021 15:27:13 +0000 (17:27 +0200)]
zink: run nir_opt_algebraic_late

This pass is needed to finish off the [ui]2imp lowering. Follow what
other drivers do and perform some dead-code elimimation etc when
lowering happens.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink: respect bit-size of dref-result
Erik Faye-Lund [Wed, 7 Apr 2021 12:09:54 +0000 (14:09 +0200)]
zink: respect bit-size of dref-result

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agozink: use UINT32_MAX instead of UINT_MAX
Erik Faye-Lund [Thu, 8 Apr 2021 08:23:08 +0000 (10:23 +0200)]
zink: use UINT32_MAX instead of UINT_MAX

This is a 32-bit argument, so on platforms where UINT_MAX is larger,
this is going to... well, do exactly the same thing, but this is
slightly clearer why.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>

3 years agopan/mdg: Fix calculation of available work registers
Icecream95 [Wed, 28 Apr 2021 23:27:28 +0000 (11:27 +1200)]
pan/mdg: Fix calculation of available work registers

Make the rmu variable signed; otherwise the MAX2 has no effect and
work_count can end up being larger than 16.

Fixes INSTR_OPERAND_FAULTs in SuperTuxKart.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4707
Fixes: c6ed8bf77cb ("panfrost: Fix uniform_count on Midgard")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10507>

3 years agointel/compiler: Fix INTEL_DEBUG=hex
Jordan Justen [Thu, 29 Apr 2021 22:12:10 +0000 (15:12 -0700)]
intel/compiler: Fix INTEL_DEBUG=hex

With the missing else, this prints the compacted hex followed by hex
for an uncompacted version of the compacted instruction. It also
doesn't print hex for instructions that are not compacted.

Fixes: bc4a127d6e1 ("intel/disasm: Label support in shader disassembly for UIP/JIP")
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4245
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10535>

3 years agoci/v3d: Update piglit expectations.
Jose Maria Casanova Crespo [Fri, 30 Apr 2021 00:29:48 +0000 (02:29 +0200)]
ci/v3d: Update piglit expectations.

As piglit job is manual, I forgot to update three new test passing at
spec@ext_image_dma_buf_import subgroup after merging
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10536>

3 years agoutil/tc: split out drawid-using draws into a separate call
Mike Blumenkrantz [Sun, 11 Apr 2021 17:48:20 +0000 (13:48 -0400)]
util/tc: split out drawid-using draws into a separate call

we can pre-filter these to reduce merge overhead

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10166>

3 years agogallium: remove padding members from pipe_draw_info
Mike Blumenkrantz [Tue, 20 Apr 2021 15:50:06 +0000 (11:50 -0400)]
gallium: remove padding members from pipe_draw_info

these are no longer used, and the tc usage can be moved to the tc struct

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10166>

3 years agogallium: split drawid out of pipe_draw_info and as a separate draw_vbo param
Mike Blumenkrantz [Sun, 11 Apr 2021 17:35:38 +0000 (13:35 -0400)]
gallium: split drawid out of pipe_draw_info and as a separate draw_vbo param

the only case in which this is nonzero is if a multidraw gets split by the frontend,
i.e., mesa core, and in all other cases it can be ignored. the value can also be ignored
for all indirect draws, though it seems many (most?) gallium drivers are not aware of this

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10166>

3 years agomesa/st: rename DrawGalliumComplex -> DrawGalliumMultiMode
Mike Blumenkrantz [Mon, 19 Apr 2021 13:33:15 +0000 (09:33 -0400)]
mesa/st: rename DrawGalliumComplex -> DrawGalliumMultiMode

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10166>

3 years agogallium: move pipe_draw_info::index_bias to pipe_draw_start_count_bias
Mike Blumenkrantz [Sun, 11 Apr 2021 14:26:29 +0000 (10:26 -0400)]
gallium: move pipe_draw_info::index_bias to pipe_draw_start_count_bias

this moves index_bias into the multidraw struct, enabling draws where the value
changes to be merged; the draw_info struct member is renamed and moved to the end
of the struct for tc use

u_vbuf still has some checks to split draws if index_bias changes, maybe
this can be removed at some point?

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10166>

3 years agogallium: rename pipe_draw_start_count -> pipe_draw_start_count_bias
Mike Blumenkrantz [Sun, 11 Apr 2021 13:49:49 +0000 (09:49 -0400)]
gallium: rename pipe_draw_start_count -> pipe_draw_start_count_bias

and add an index_bias member

no functional changes yet, just the rename and unused struct member

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10166>

3 years agomesa: fix glShaderSource() error handling
Timothy Arceri [Tue, 27 Apr 2021 04:01:08 +0000 (14:01 +1000)]
mesa: fix glShaderSource() error handling

Section 7.1 (SHADER OBJECTS) of the OpenGL 4.6 spec says:

   "An INVALID_VALUE error is generated if count is negative."

However a count of 0 is not an error. Previously it would cause a
GL_OUT_OF_MEMORY error.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10477>

3 years agomicrosoft/compiler: Maintain sorting of resource type in the context
Michael Tang [Thu, 29 Apr 2021 20:10:55 +0000 (13:10 -0700)]
microsoft/compiler: Maintain sorting of resource type in the context

This change moves the SRVs associated with read-only SSBOs to be emitted
before any other UAV. We do this because the validator expects resources
to be emitted in a specific order, as noted by `emit_module`.

Previously, we emitted SSBOs as SRVs (read-only) or UAVs (read-write)
after other UAVs.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10514>

3 years agov3d: DRM_FORMAT_MOD_BROADCOM_SAND128 only available for NV12 format.
Jose Maria Casanova Crespo [Thu, 29 Apr 2021 16:47:53 +0000 (18:47 +0200)]
v3d: DRM_FORMAT_MOD_BROADCOM_SAND128 only available for NV12 format.

We were exposing as available DRM_FORMAT_MOD_BROADCOM_SAND128 for
any format.

Fixes: 95c4f0f91098 "v3d: Enables DRM_FORMAT_MOD_BROADCOM_SAND128 support"
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524>

3 years agov3d: YUV formats at query_dmabuf_modifiers are external_only
Jose Maria Casanova Crespo [Thu, 29 Apr 2021 16:37:25 +0000 (18:37 +0200)]
v3d: YUV formats at query_dmabuf_modifiers are external_only

This fixes Issue https://github.com/Igalia/meta-webkit/issues/185
"Issue Raspberry 4-64 + Mesa VC4 driver + Gstreamer = red Label on video"

Fixes: 95c4f0f91098 "v3d: Enables DRM_FORMAT_MOD_BROADCOM_SAND128 support"
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524>

3 years agov3d: YUV formats at is_dmabuf_modifier_supported are external_only
Jose Maria Casanova Crespo [Thu, 29 Apr 2021 16:15:27 +0000 (18:15 +0200)]
v3d: YUV formats at is_dmabuf_modifier_supported are external_only

This fixes Issue https://github.com/Igalia/meta-webkit/issues/185
"Issue Raspberry 4-64 + Mesa VC4 driver + Gstreamer = red Label on video"

Fixes: 6ee10ab3de86 "gallium: Add pipe_screen::is_dmabuf_modifier_supported"
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10524>

3 years agoglx: init __GLXvendorInfo to NULL
Pierre-Eric Pelloux-Prayer [Thu, 29 Apr 2021 11:46:33 +0000 (13:46 +0200)]
glx: init __GLXvendorInfo to NULL

Since 01ba8a8d02b the dd variable isn't necessarly initialized,
so the compiler complains:

   warning: ‘dd’ may be used uninitialized in this function

Initialize dd to NULL to fix this.

Fixes: 01ba8a8d02b ("glx: Implement GLX_EXT_no_config_context")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: Remove some dead declarations from glxclient.h
Adam Jackson [Wed, 28 Apr 2021 22:54:06 +0000 (18:54 -0400)]
glx: Remove some dead declarations from glxclient.h

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: s/Display */struct glx_display */ over internal API
Adam Jackson [Fri, 23 Apr 2021 15:32:17 +0000 (11:32 -0400)]
glx: s/Display */struct glx_display */ over internal API

We'd like to avoid __glXInitialize as much as possible since it involves
taking a global lock. This means converting internal APIs to operate as
much as possible in terms of something other than a Display *, since if
that's all you have then you're forced to call __glXInitialize to get to
the glx_display.

The contortions in DRI2 displease me, but DRI2 displeases me, so.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: Move server GLX vendor and version strings to glx_screen
Adam Jackson [Fri, 23 Apr 2021 05:17:00 +0000 (01:17 -0400)]
glx: Move server GLX vendor and version strings to glx_screen

These can in fact vary between screens.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: Simplify some overuse of GetGLXScreenConfigs
Adam Jackson [Fri, 23 Apr 2021 04:55:46 +0000 (00:55 -0400)]
glx: Simplify some overuse of GetGLXScreenConfigs

If you call this on your current display and screen you're just going to
look up the same value we already stored in your context when we created
it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: Stash a copy of the XExtCodes in the glx_display
Adam Jackson [Fri, 23 Apr 2021 04:42:35 +0000 (00:42 -0400)]
glx: Stash a copy of the XExtCodes in the glx_display

Instead of a pointer into xlib's state for it. Mostly because it lets us
remove our copy of majorOpcode from the display without taking another
pointer indirection.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: Remove unused opcode argument to __glX{Get,QueryServer}String
Adam Jackson [Thu, 22 Apr 2021 22:39:41 +0000 (18:39 -0400)]
glx: Remove unused opcode argument to __glX{Get,QueryServer}String

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: Remove warn-once-ery around GLX 1.3 functions
Adam Jackson [Thu, 22 Apr 2021 22:18:44 +0000 (18:18 -0400)]
glx: Remove warn-once-ery around GLX 1.3 functions

Like, yes, this is an app bug, but we kinda emulate 1.3 anyway already
and are moving further in that direction, and at this point the app is
not going to get fixed. Just hush.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: Simplify glXIsDirect
Adam Jackson [Thu, 22 Apr 2021 20:46:44 +0000 (16:46 -0400)]
glx: Simplify glXIsDirect

This answer is cached for us at context creation, we never really need
to generate protocol here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: Stop force-enabling extensions "implied" by GLX 1.3
Adam Jackson [Thu, 22 Apr 2021 18:44:26 +0000 (14:44 -0400)]
glx: Stop force-enabling extensions "implied" by GLX 1.3

1.3 has been ubiquitous since xserver 1.2 in early 2007, and has always
been supported with DRI2.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agoglx: Stop pretending the GLX major number isn't 1
Adam Jackson [Thu, 22 Apr 2021 17:10:44 +0000 (13:10 -0400)]
glx: Stop pretending the GLX major number isn't 1

Clarify the comments and logic accordingly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10418>

3 years agovenus: handle wsi image queue ownership transfer for Android
Yiwei Zhang [Wed, 28 Apr 2021 23:03:10 +0000 (23:03 +0000)]
venus: handle wsi image queue ownership transfer for Android

1. pre-allocate command pools at device creation if anb enabled
2. force VK_SHARING_MODE_CONCURRENT for wsi image if necessary
3. pre-allocate and record command buffers at android wsi image creation
4. transfer in the ownership at vkAcquireImageANDROID
5. transfer out the ownership at vkQueueSignalReleaseImageANDROID

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10335>

3 years agovenus: handle VK_IMAGE_LAYOUT_PRESENT_SRC_KHR transfer
Yiwei Zhang [Tue, 20 Apr 2021 23:01:23 +0000 (23:01 +0000)]
venus: handle VK_IMAGE_LAYOUT_PRESENT_SRC_KHR transfer

Whenver VK_IMAGE_LAYOUT_PRESENT_SRC_KHR is used, replace it with
VK_IMAGE_LAYOUT_GENERAL as required for proper layout and ownership
transfer for external memory backed swapchain images.

This will be Android only until common WSI is fixed.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10335>

3 years agovenus: enable VK_EXT_queue_family_foreign
Yiwei Zhang [Mon, 19 Apr 2021 22:19:50 +0000 (22:19 +0000)]
venus: enable VK_EXT_queue_family_foreign

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10335>

3 years agovenus: update venus-protocol headers
Yiwei Zhang [Tue, 27 Apr 2021 20:36:36 +0000 (20:36 +0000)]
venus: update venus-protocol headers

Advertise VK_EXT_queue_family_foreign

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10335>

3 years agodocs: mark off GL_ARB_shader_clock for zink
Mike Blumenkrantz [Thu, 29 Apr 2021 12:07:21 +0000 (08:07 -0400)]
docs: mark off GL_ARB_shader_clock for zink

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10521>

3 years agoradv: fix possible use-after-free when inserting GS copy shader from cache
Rhys Perry [Fri, 23 Apr 2021 12:10:42 +0000 (13:10 +0100)]
radv: fix possible use-after-free when inserting GS copy shader from cache

If we give radv_pipeline_cache_insert_shaders() a variant which was
retrived from the cache, it will free it.

I haven't encountered this issue, but it seems possible.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10433>

3 years agoradv: fix use-after-free upon GS copy shader cache hits
Rhys Perry [Fri, 23 Apr 2021 12:03:01 +0000 (13:03 +0100)]
radv: fix use-after-free upon GS copy shader cache hits

If radv_pipeline_cache_insert_shaders() finds a GS copy shader in the
cache, it will free the variant in gs_variants and replace it with the one
in the cache.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10433>

3 years agovulkan: fix use-after-free in vk_common_DestroyDebugReportCallbackEXT
Rhys Perry [Fri, 23 Apr 2021 11:49:33 +0000 (12:49 +0100)]
vulkan: fix use-after-free in vk_common_DestroyDebugReportCallbackEXT

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: bd1705a4808 ("vulkan: Make vk_debug_report_callback derive from vk_object_base")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10433>

3 years agoradv: fix computation of the number of user SGPRS for NGG GS state
Samuel Pitoiset [Tue, 27 Apr 2021 15:01:45 +0000 (17:01 +0200)]
radv: fix computation of the number of user SGPRS for NGG GS state

The NGG GS state uses one user SGPR.

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10485>

3 years agozink: hook up EXT_image_drm_format_modifier
Mike Blumenkrantz [Thu, 29 Apr 2021 11:57:48 +0000 (07:57 -0400)]
zink: hook up EXT_image_drm_format_modifier

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10520>

3 years agozink: hook up VK_EXT_shader_subgroup_ballot
Mike Blumenkrantz [Mon, 5 Apr 2021 16:00:42 +0000 (12:00 -0400)]
zink: hook up VK_EXT_shader_subgroup_ballot

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10520>

3 years agozink: hook up VK_EXT_conservative_rasterization
Mike Blumenkrantz [Sat, 3 Apr 2021 14:32:31 +0000 (10:32 -0400)]
zink: hook up VK_EXT_conservative_rasterization

just the ext bits

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10520>

3 years agozink: hook up VK_EXT_sample_locations
Mike Blumenkrantz [Fri, 2 Apr 2021 19:15:45 +0000 (15:15 -0400)]
zink: hook up VK_EXT_sample_locations

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10520>

3 years agodriconf: add workaround for Golf With Friends
Pierre-Eric Pelloux-Prayer [Fri, 16 Apr 2021 07:42:46 +0000 (09:42 +0200)]
driconf: add workaround for Golf With Friends

The game has a shader that uses texture functions that rely on implicit
derivatives after a discard.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4547

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10278>

3 years agoutil/hash_table: do not leak u64 struct key
Juan A. Suarez Romero [Tue, 27 Apr 2021 10:08:50 +0000 (12:08 +0200)]
util/hash_table: do not leak u64 struct key

For non 64bit devices the key stored in hash_table_u64 is wrapped in
hash_key_u64 structure, which is never free.

This commit fixes this issue by just removing the user-defined
`delete_function` parameter in hash_table_u64_{destroy,clear} (which
nobody is using) and using instead a delete function to free this
structure.

Fixes: 608257cf82f ("i965: Fix INTEL_DEBUG=bat")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10480>

3 years agov3dv: check dest bitsize in color blit
Juan A. Suarez Romero [Thu, 15 Apr 2021 08:53:41 +0000 (10:53 +0200)]
v3dv: check dest bitsize in color blit

Otherwise, if src_bit_size > 0 and dst_bit_size == 0, we end up doing a
bad shift in `1 << (dst_bit_size - 1)`, as `dst_bit_size - 1` is a
negative value (in this case would be MAX_UINT32).

Fixes CID#1468134 "Bad bit shift operation (BAD_SHIFT)":
   "large_shift: In expression 1 << dst_bit_size - 1U, left shifting by
    more than 31 bits has undefined behavior. The shift amount,
    dst_bit_size - 1U, is 4294967295."

v2:
 - Use an assertion instead (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10251>

3 years agov3dv: rename VC5 to V3D
Juan A. Suarez Romero [Fri, 23 Apr 2021 08:24:57 +0000 (10:24 +0200)]
v3dv: rename VC5 to V3D

As we are not using anymore references to the old VC5, let's rename
definitions from VC5 to V3D in the Vulkan driver.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402>

3 years agobroadcom/simulator: change references to VC5
Juan A. Suarez Romero [Fri, 23 Apr 2021 08:03:22 +0000 (10:03 +0200)]
broadcom/simulator: change references to VC5

We are referring the driver as V3D instead old VC5; so let's update the
references.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402>

3 years agobroadcom/qpu: rename from VC5 to V3D
Juan A. Suarez Romero [Fri, 23 Apr 2021 07:57:54 +0000 (09:57 +0200)]
broadcom/qpu: rename from VC5 to V3D

Get rid of old references to VC5.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402>

3 years agov3d: rename VC5 enums and definitions
Juan A. Suarez Romero [Wed, 21 Apr 2021 16:43:14 +0000 (18:43 +0200)]
v3d: rename VC5 enums and definitions

As the driver was renamed in the past from VC5 to V3D, let's rename also
the definitions and enumerations to keep it consistent across the code.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402>

3 years agov3d: rename header include guards
Juan A. Suarez Romero [Wed, 21 Apr 2021 16:12:46 +0000 (18:12 +0200)]
v3d: rename header include guards

Long time ago VC5 was renamed to V3D, but the include guards `VC5_FOO_H`
were not.

In order to keep consistency, let's rename these guards from `VC5_FOO_H`
to `V3D_FOO_H`.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402>

3 years agospirv: Don't replicate patch bool in vtn_variable
Caio Marcelo de Oliveira Filho [Thu, 4 Mar 2021 06:49:00 +0000 (22:49 -0800)]
spirv: Don't replicate patch bool in vtn_variable

When we originally added patch variable handling to spirv_to_nir, we
were splitting I/O block variables in spirv_to_nir, so we weren't
guaranteed to have a nir_variable early enough in processing.

Since b0c643d8f57 ("spirv: Use NIR per-member splitting"), we've been
using NIR per-member splitting where we have a nir_variable which has
a separate nir_variable_data per member.  With this, we can drop
vtn_variable::patch and use the patch boolean on the nir_variable
instead.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10469>

3 years agoclover: Add constructor for constant_argument.
Vinson Lee [Thu, 22 Apr 2021 02:17:15 +0000 (19:17 -0700)]
clover: Add constructor for constant_argument.

Fix defects reported by Coverity Scan.

member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize buf.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize st.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10399>

3 years agointel/isl: There are seven aux states
Jason Ekstrand [Thu, 29 Apr 2021 04:16:03 +0000 (23:16 -0500)]
intel/isl: There are seven aux states

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10515>

3 years agozink: use first-created shader variant as the default
Mike Blumenkrantz [Tue, 23 Mar 2021 17:37:30 +0000 (13:37 -0400)]
zink: use first-created shader variant as the default

it's not really expected that most apps are going to be switching variants
all the time, so having the "default" one be more dynamic allows skipping
shader lookups more frequently

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10513>

3 years agozink: add fastpath for getting default shader variants
Mike Blumenkrantz [Sat, 23 Jan 2021 16:02:59 +0000 (11:02 -0500)]
zink: add fastpath for getting default shader variants

no need for hashing or lookups if this is the default variant

also have an alt variant for vertex stages to account for streamout and
halfz lowering

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10513>

3 years agozink: create entrypoints for descriptor variables with spirv 1.5
Mike Blumenkrantz [Tue, 23 Mar 2021 14:51:38 +0000 (10:51 -0400)]
zink: create entrypoints for descriptor variables with spirv 1.5

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10512>

3 years agozink: generate spirv 1.5 from ntv when using vk >= 1.2
Mike Blumenkrantz [Tue, 23 Mar 2021 14:50:53 +0000 (10:50 -0400)]
zink: generate spirv 1.5 from ntv when using vk >= 1.2

this has an ntv option so further tuning here should be easy enough

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10512>

3 years agozink: export PIPE_CAP_TGSI_CLOCK
Mike Blumenkrantz [Mon, 5 Apr 2021 13:54:43 +0000 (09:54 -0400)]
zink: export PIPE_CAP_TGSI_CLOCK

ARB_shader_clock

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>

3 years agozink: support nir_intrinsic_shader_clock
Mike Blumenkrantz [Mon, 5 Apr 2021 13:54:31 +0000 (09:54 -0400)]
zink: support nir_intrinsic_shader_clock

simple const unop

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>

3 years agozink: add spirv builder for unops with a const operand
Mike Blumenkrantz [Mon, 5 Apr 2021 13:54:05 +0000 (09:54 -0400)]
zink: add spirv builder for unops with a const operand

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>

3 years agozink: add conversion util for nir_scope -> SpvScope
Mike Blumenkrantz [Mon, 5 Apr 2021 13:53:44 +0000 (09:53 -0400)]
zink: add conversion util for nir_scope -> SpvScope

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>

3 years agozink: hook up VK_KHR_shader_clock
Mike Blumenkrantz [Mon, 5 Apr 2021 13:53:29 +0000 (09:53 -0400)]
zink: hook up VK_KHR_shader_clock

more extensions wooo

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>

3 years agoci: Uprev piglit to b3a9fa345 ("framework/replay: Quote resource names before signing")
Ian Romanick [Tue, 27 Apr 2021 19:27:31 +0000 (12:27 -0700)]
ci: Uprev piglit to b3a9fa345 ("framework/replay: Quote resource names before signing")

The PIGLIT_BUILD_CL_TESTS related changes were shamelessly stolen from
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6441/diffs?commit_id=5742be00e6b493b5289ed8120eb06f10d341ea3a.

v2: Remove glslang-tools from arm_build.sh.  Suggested by Michel.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10492>

3 years agovenus: enable external memory support
Chia-I Wu [Wed, 21 Apr 2021 20:14:21 +0000 (13:14 -0700)]
venus: enable external memory support

This enables VK_KHR_external_memory_fd and
VK_EXT_external_memory_dma_buf support.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: rework external memory capability queries
Chia-I Wu [Wed, 21 Apr 2021 19:43:33 +0000 (12:43 -0700)]
venus: rework external memory capability queries

The idea is to allow the renderer to use a completely different external
memory handle type (e.g., OPAQUE_WIN32!?) than the driver (always
OPAQUE_FD and DMA_BUF).  It hides the mismatch by doing translations in
vkGetPhysicalDevice*.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: update venus-protocol for external memory
Chia-I Wu [Wed, 21 Apr 2021 00:27:46 +0000 (17:27 -0700)]
venus: update venus-protocol for external memory

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: make sure gem_handle and vn_renderer_bo are 1:1
Chia-I Wu [Fri, 23 Apr 2021 07:12:27 +0000 (00:12 -0700)]
venus: make sure gem_handle and vn_renderer_bo are 1:1

When two vn_renderer_bo's share the same gem_handle, destroying one of
them would invalidate the other.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: use sparse array to manage vn_renderer_bo
Chia-I Wu [Fri, 23 Apr 2021 04:07:27 +0000 (21:07 -0700)]
venus: use sparse array to manage vn_renderer_bo

It should be faster.  More importantly, we want to use it to keep track
of all BOs for correct dmabuf import.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: move some common members to vn_renderer_bo
Chia-I Wu [Fri, 23 Apr 2021 03:59:36 +0000 (20:59 -0700)]
venus: move some common members to vn_renderer_bo

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: merge bo create and init ops
Chia-I Wu [Fri, 23 Apr 2021 17:36:55 +0000 (10:36 -0700)]
venus: merge bo create and init ops

There is no good reason to seprate them.  I also plan to adopt
util_sparse_array, which requires the kernel BO to be created first (to
use its gem_handle/res_id as the key).

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: move vn_renderer_bo_ops to vn_renderer
Chia-I Wu [Thu, 22 Apr 2021 22:30:38 +0000 (15:30 -0700)]
venus: move vn_renderer_bo_ops to vn_renderer

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: pass vn_renderer in vn_renderer_bo functions
Chia-I Wu [Thu, 22 Apr 2021 16:40:10 +0000 (09:40 -0700)]
venus: pass vn_renderer in vn_renderer_bo functions

We will move vn_renderer_bo_ops to vn_renderer in the following commit.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: add dev->renderer pointer
Chia-I Wu [Fri, 23 Apr 2021 17:15:53 +0000 (10:15 -0700)]
venus: add dev->renderer pointer

dev->instance->renderer is slower to type and to follow.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: use vn_renderer_shmem
Chia-I Wu [Thu, 22 Apr 2021 20:33:59 +0000 (13:33 -0700)]
venus: use vn_renderer_shmem

vn_renderer_bo_create_cpu becomes unused and is removed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: add vn_renderer_shmem
Chia-I Wu [Thu, 22 Apr 2021 20:33:55 +0000 (13:33 -0700)]
venus: add vn_renderer_shmem

CPU BOs and GPU BOs are used different enough that it makes sense to
treat them as different objects.  This commit adds vn_renderer_shmem to
represent CPU BOs.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: rename VN_CS_ENCODER_INITIALIZER
Chia-I Wu [Fri, 23 Apr 2021 06:21:31 +0000 (23:21 -0700)]
venus: rename VN_CS_ENCODER_INITIALIZER

Rename it to VN_CS_ENCODER_INITIALIZER_LOCAL to make it clear that it is
only for local variables.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: update venus-protocol headers to use accessors
Chia-I Wu [Thu, 22 Apr 2021 18:21:24 +0000 (11:21 -0700)]
venus: update venus-protocol headers to use accessors

Switch to the newly added vn_instance_submit_command accessors.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agovenus: provide accessors for vn_instance_submit_command
Chia-I Wu [Thu, 22 Apr 2021 17:55:59 +0000 (10:55 -0700)]
venus: provide accessors for vn_instance_submit_command

This will allow us to change vn_instance_submit_command without
regenerating the headers.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437>

3 years agodocs: update calendar for 21.1.0-rc3
Dylan Baker [Wed, 28 Apr 2021 16:34:33 +0000 (09:34 -0700)]
docs: update calendar for 21.1.0-rc3

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10503>

3 years agodocs: update calendar for 21.1.0-rc2
Dylan Baker [Wed, 28 Apr 2021 16:34:32 +0000 (09:34 -0700)]
docs: update calendar for 21.1.0-rc2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10503>