mesa.git
3 years agomesa/st: release debug_output after destroying the context
Pierre-Eric Pelloux-Prayer [Tue, 7 Jul 2020 09:08:50 +0000 (11:08 +0200)]
mesa/st: release debug_output after destroying the context

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

3 years agomesa: add bool param to _mesa_free_context_data
Pierre-Eric Pelloux-Prayer [Tue, 7 Jul 2020 09:06:21 +0000 (11:06 +0200)]
mesa: add bool param to _mesa_free_context_data

The param controls whether _mesa_destroy_debug_output should be called or not.
No functional changes; this will be used by the next commit.

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

3 years agomesa: rename _mesa_free_errors_data
Pierre-Eric Pelloux-Prayer [Tue, 7 Jul 2020 09:00:58 +0000 (11:00 +0200)]
mesa: rename _mesa_free_errors_data

Use the _mesa_init_XXX / _mesa_destroy_XXX pattern to clearly associate
the 2 functions.

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

3 years agogitlab-ci: Fix "triggered by Marge for a merge request" rule
Michel Dänzer [Tue, 14 Jul 2020 09:12:19 +0000 (11:12 +0200)]
gitlab-ci: Fix "triggered by Marge for a merge request" rule

The commit below changed the rule such that it accidentally also applied
to the non-MR pipelines created by Marge, resulting in Marge triggering
twice as many jobs as necessary.

Fixes: 549b4a3dd4ab "gitlab-ci: Automatically run pipelines for Marge
                     Bot pre-merge only"

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5898>

3 years agointel/ehl: Add new PCI-IDs
Anuj Phogat [Thu, 9 Jul 2020 22:56:25 +0000 (15:56 -0700)]
intel/ehl: Add new PCI-IDs

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
3 years agointel/ehl: Rename gen_device_info struct
Anuj Phogat [Thu, 9 Jul 2020 22:15:13 +0000 (15:15 -0700)]
intel/ehl: Rename gen_device_info struct

Renaming makes it easier to relate a pciid with device configuration.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
3 years agointel/ehl: Use macro GEN11_LP_FEATURES in device info
Anuj Phogat [Thu, 9 Jul 2020 22:47:36 +0000 (15:47 -0700)]
intel/ehl: Use macro GEN11_LP_FEATURES in device info

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
3 years agointel/ehl: Use GEN11_URB_MIN_MAX_ENTRIES in device info
Anuj Phogat [Thu, 9 Jul 2020 22:00:21 +0000 (15:00 -0700)]
intel/ehl: Use GEN11_URB_MIN_MAX_ENTRIES in device info

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
3 years agopanfrost: Dual source blend support
Icecream95 [Thu, 25 Jun 2020 10:56:14 +0000 (22:56 +1200)]
panfrost: Dual source blend support

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

3 years agopan/mdg: Skip z/s combining for dual-source writes
Icecream95 [Fri, 10 Jul 2020 11:28:21 +0000 (23:28 +1200)]
pan/mdg: Skip z/s combining for dual-source writes

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

3 years agopan/mdg: Dual source blend input/writeout support
Icecream95 [Thu, 25 Jun 2020 10:21:50 +0000 (22:21 +1200)]
pan/mdg: Dual source blend input/writeout support

We write to r2, which is preseved through to the blend shader, from
where it is read. We won't worry about MRT to keep things simple.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

3 years agopan/mdg: Add a nir pass to reorder store_output intrinsics
Icecream95 [Mon, 6 Jul 2020 11:52:40 +0000 (23:52 +1200)]
pan/mdg: Add a nir pass to reorder store_output intrinsics

Real writeout stores, which break execution, need to be moved to after
dual-source stores, which are just standard register writes.

v2: Don't move stores forward, to avoid moving them to before where
    their source is written.

v3: Only reorder past dual-source stores.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

3 years agogallium: Dual source support in blend_factor_to_shader
Icecream95 [Thu, 25 Jun 2020 10:50:15 +0000 (22:50 +1200)]
gallium: Dual source support in blend_factor_to_shader

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

3 years agocompiler: Add dual-source factors to blend_factor
Icecream95 [Thu, 25 Jun 2020 10:48:32 +0000 (22:48 +1200)]
compiler: Add dual-source factors to blend_factor

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5620>

3 years agofreedreno/ir3: DCE unused arrays
Rob Clark [Tue, 14 Jul 2020 17:36:04 +0000 (10:36 -0700)]
freedreno/ir3: DCE unused arrays

Letting unused arrays stick around confuses RA, which assigns vreg names
to the unused arrays, but then does not precolor them (because they are
unused).  This leads to an assert in ra_select_reg_merged():

  skqp: ../src/freedreno/ir3/ir3_ra.c:589: name_to_instr: Assertion '!name_is_array(ctx, name)' failed.

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

3 years agofreedreno/a6xx: don't enable early-z/lrz if no z-test
Rob Clark [Mon, 13 Jul 2020 21:49:01 +0000 (14:49 -0700)]
freedreno/a6xx: don't enable early-z/lrz if no z-test

But if shader explicitly asks for early-fragment-tests, obey it's
wishes.

Fixes a handful of skia (skqp) CTS fails (9.0_r12)

* gles_bug593049
* gles_circular_arcs_fill
* gles_circular_arcs_stroke_and_fill_square
* gles_clippedcubic2
* gles_complexclip2_path_bw
* gles_complexclip2_rrect_bw
* gles_complexclip3_complex
* gles_complexclip3_simple
* gles_crbug_691386
* gles_cubicclosepath
* gles_cubicpath
* gles_degeneratesegments
* gles_filltypespersp
* gles_innershapes_bw
* gles_inverse_paths
* gles_mixedtextblobs
* gles_onebadarc
* gles_quadclosepath
* gles_quadpath
* gles_rrect_clip_bw
* gles_scale-pixels
* gles_scaledstrokes
* gles_squarehair
* gles_strokes_zoomed
* gles_windowrectangles

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

3 years agofreedreno/ir3/ra: be better at failing
Rob Clark [Sat, 11 Jul 2020 21:22:08 +0000 (14:22 -0700)]
freedreno/ir3/ra: be better at failing

It doesn't happen much.  But it's annoying when we hit an impossible
condition deep in RA 90% thru a long test run.  Add some ra_assert()/
ra_unreachable() helper macros so we can bail cleanly and fail RA.

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

3 years agofreedreno/a6xx: bail instead of crash for compile fails
Rob Clark [Sat, 11 Jul 2020 20:27:36 +0000 (13:27 -0700)]
freedreno/a6xx: bail instead of crash for compile fails

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

3 years agofreedreno/ir3: make compile fails more visible
Rob Clark [Sat, 11 Jul 2020 20:21:36 +0000 (13:21 -0700)]
freedreno/ir3: make compile fails more visible

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

3 years agofreedreno/ir3: add missing VS driver params
Rob Clark [Sat, 11 Jul 2020 20:21:57 +0000 (13:21 -0700)]
freedreno/ir3: add missing VS driver params

Some of these only used by turnip so far, this is just for clarity.

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

3 years agozink: enable tgsi texcoord pipe cap
Mike Blumenkrantz [Wed, 17 Jun 2020 21:40:04 +0000 (17:40 -0400)]
zink: enable tgsi texcoord pipe cap

this requires some modifications to the ntv slot remapping, as we definitely
don't want to reserve another 25% of the available slots for the (deprecated)
texcoord varyings

now we remap VARYING_SLOT_TEX[n] to the last available slots, which lets us avoid
needing to do permanent reservation, and we check to make sure that we haven't
seen the corresponding texcoord varying any time we emit a non-texcoord varying in
that slot

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

3 years agonouveau: expose HMM
Karol Herbst [Tue, 5 Jun 2018 12:12:55 +0000 (14:12 +0200)]
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/5906>

3 years agonvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
Karol Herbst [Wed, 27 May 2020 14:29:06 +0000 (16:29 +0200)]
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/5906>

3 years agogallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
Karol Herbst [Tue, 5 May 2020 13:09:50 +0000 (15:09 +0200)]
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/5906>

3 years agonouveau: enable HMM
Karol Herbst [Sun, 29 Jul 2018 20:06:18 +0000 (22:06 +0200)]
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/5906>

3 years agoci: bump libdrm to 2.4.102
Karol Herbst [Tue, 30 Jun 2020 10:26:43 +0000 (12:26 +0200)]
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/5906>

3 years agoci: need to install wget in order to download libdrm
Karol Herbst [Tue, 14 Jul 2020 15:49:00 +0000 (17:49 +0200)]
ci: need to install wget in order to download libdrm

Fixes: dcd171f5e9b ("gitlab-ci: More stable URL for kernel and ramdisk artifacts, for LAVA")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>

3 years agonir: Support load/store of temps as scratch in nir_lower_explicit_io
Jesse Natalie [Tue, 26 May 2020 19:21:33 +0000 (12:21 -0700)]
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>

3 years agonir: When nir_lower_vars_to_explicit_types is run on temps, update scratch_size
Jesse Natalie [Tue, 26 May 2020 19:20:20 +0000 (12:20 -0700)]
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>

3 years agonir_lower_io: Add addr_format_is_offset helper
Jesse Natalie [Tue, 14 Jul 2020 17:38:32 +0000 (10:38 -0700)]
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>

3 years agofreedreno/regs: update a6xx PC regs
Jonathan Marek [Sat, 11 Jul 2020 19:55:12 +0000 (15:55 -0400)]
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>

3 years agofreedreno/regs: update a6xx VPC regs
Jonathan Marek [Sat, 11 Jul 2020 17:03:41 +0000 (13:03 -0400)]
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>

3 years agofreedreno/regs: update a6xx RB regs
Jonathan Marek [Sat, 11 Jul 2020 16:29:38 +0000 (12:29 -0400)]
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>

3 years agofreedreno/regs: update a6xx GRAS registers
Jonathan Marek [Thu, 9 Jul 2020 18:59:04 +0000 (14:59 -0400)]
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>

3 years agogitlab-ci: re-enable arm64_a630_vk
Jonathan Marek [Tue, 14 Jul 2020 14:58:56 +0000 (10:58 -0400)]
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>

3 years agoturnip: remove use of tu_cs_entry for draw states
Jonathan Marek [Thu, 18 Jun 2020 20:24:26 +0000 (16:24 -0400)]
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>

3 years agoturnip: fix inconsistencies with tu6_load_state_size
Jonathan Marek [Sat, 20 Jun 2020 00:43:50 +0000 (20:43 -0400)]
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>

3 years agoturnip: emit compute pipeline directly in CmdBindPipeline
Jonathan Marek [Thu, 18 Jun 2020 19:41:31 +0000 (15:41 -0400)]
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>

3 years agoturnip: use DIRTY SDS bit to avoid making copies of pipeline load state ib
Jonathan Marek [Thu, 18 Jun 2020 17:07:48 +0000 (13:07 -0400)]
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>

3 years agozink: try to handle multisampled null buffers
Mike Blumenkrantz [Mon, 13 Jul 2020 20:35:10 +0000 (16:35 -0400)]
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>

3 years agozink: handle empty attachments
Mike Blumenkrantz [Fri, 29 May 2020 20:23:49 +0000 (16:23 -0400)]
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>

3 years agopan/mdg: Fix non-debug compiliation
Icecream95 [Tue, 14 Jul 2020 03:06:09 +0000 (15:06 +1200)]
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: 7781d2c2ead ("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>

3 years agoRevert https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580
Michel Dänzer [Tue, 14 Jul 2020 15:08:10 +0000 (17:08 +0200)]
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>

3 years agonouveau: expose HMM
Karol Herbst [Tue, 5 Jun 2018 12:12:55 +0000 (14:12 +0200)]
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>

3 years agonvc0: support PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
Karol Herbst [Wed, 27 May 2020 14:29:06 +0000 (16:29 +0200)]
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>

3 years agogallium: add PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY
Karol Herbst [Tue, 5 May 2020 13:09:50 +0000 (15:09 +0200)]
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>

3 years agonouveau: enable HMM
Karol Herbst [Sun, 29 Jul 2018 20:06:18 +0000 (22:06 +0200)]
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>

3 years agoci: bump libdrm to 2.4.102
Karol Herbst [Tue, 30 Jun 2020 10:26:43 +0000 (12:26 +0200)]
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>

3 years agozink: block resolve blits for depth/stencil buffers
Mike Blumenkrantz [Sun, 14 Jun 2020 05:44:38 +0000 (01:44 -0400)]
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>

3 years agozink: block vkCmdBlitImage usage for multi sampled blits
Mike Blumenkrantz [Sun, 14 Jun 2020 04:30:55 +0000 (00:30 -0400)]
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>

3 years agozink: try copy_region hook for blits where we can't do a regular blit or resolve
Mike Blumenkrantz [Sun, 14 Jun 2020 04:03:31 +0000 (00:03 -0400)]
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>

3 years agomesa/main: use call_once instead of open-coding
Erik Faye-Lund [Fri, 10 Jul 2020 11:08:30 +0000 (13:08 +0200)]
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>

3 years agomesa/main: factor out one-time-init into a helper
Erik Faye-Lund [Fri, 10 Jul 2020 11:05:32 +0000 (13:05 +0200)]
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>

3 years agogv100/ir: set ftz bit on floating point operations
Karol Herbst [Mon, 13 Jul 2020 14:24:20 +0000 (16:24 +0200)]
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>

3 years agomeson: fix android vulkan build
Eric Engestrom [Sat, 11 Jul 2020 08:17:30 +0000 (10:17 +0200)]
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 448eb19158f483d807ef).

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

Fixes: 448eb19158f483d807ef ("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>

3 years agogitlab-ci: Drop dependencies:
Michel Dänzer [Fri, 10 Jul 2020 15:19:00 +0000 (17:19 +0200)]
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>

3 years agogitlab-ci: Remove indirect dependencies from needs:
Michel Dänzer [Fri, 10 Jul 2020 15:00:14 +0000 (17:00 +0200)]
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>

3 years agotu: Don't invalidate irrelevant state when changing pipeline
Connor Abbott [Mon, 13 Jul 2020 10:54:36 +0000 (12:54 +0200)]
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>

3 years agofreedreno/a6xx: Add some documentation for shared consts
Connor Abbott [Mon, 13 Jul 2020 10:51:43 +0000 (12:51 +0200)]
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>

3 years agofreedreno/a6xx: Rename and document HLSQ_UPDATE_CNTL
Connor Abbott [Mon, 13 Jul 2020 10:22:20 +0000 (12:22 +0200)]
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>

3 years agoclover: implements clEnqueueFillBuffer
Serge Martin [Sun, 3 May 2020 11:56:15 +0000 (13:56 +0200)]
clover: implements clEnqueueFillBuffer

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5897>

3 years agoclover: add more cl_mem_object_type to pipe_texture_target mapping
Serge Martin [Tue, 19 May 2020 13:56:15 +0000 (15:56 +0200)]
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>

3 years agoradv: add the custom border color BO to the list of buffers
Samuel Pitoiset [Mon, 13 Jul 2020 18:09:15 +0000 (20:09 +0200)]
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: 57e796a12a8 ("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>

3 years agofreedreno/registers: Rename SP_2D_SRC_FORMAT
Kristian H. Kristensen [Tue, 14 Jul 2020 03:06:25 +0000 (20:06 -0700)]
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>

3 years agofreedreno/a6xx: Split clear and blit texture into different functions
Kristian H. Kristensen [Fri, 3 Jul 2020 23:25:30 +0000 (16:25 -0700)]
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>

3 years agofreedreno/a6xx: Don't take pipe_blit_info in emit_blit_dst
Kristian H. Kristensen [Fri, 3 Jul 2020 22:54:33 +0000 (15:54 -0700)]
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>

3 years agofreedreno/a6xx: Program RB_UNKNOWN_8C01 in setup helper
Kristian H. Kristensen [Fri, 3 Jul 2020 22:18:32 +0000 (15:18 -0700)]
freedreno/a6xx: Program RB_UNKNOWN_8C01 in setup helper

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

3 years agofreedreno/a6xx: Move CP_SET_MARKER to setup helper
Kristian H. Kristensen [Fri, 3 Jul 2020 22:18:01 +0000 (15:18 -0700)]
freedreno/a6xx: Move CP_SET_MARKER to setup helper

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

3 years agofreedreno/a6xx: Move REG_A6XX_SP_2D_SRC_FORMAT programming to helper
Kristian H. Kristensen [Fri, 3 Jul 2020 22:12:25 +0000 (15:12 -0700)]
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>

3 years agofreedreno/a6xx: Program A6XX_SP_2D_SRC_FORMAT_COLOR_FORMAT based on dst format
Kristian H. Kristensen [Fri, 3 Jul 2020 22:07:39 +0000 (15:07 -0700)]
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>

3 years agofreedreno/a6xx: Make blit_control helper a little more helpful
Kristian H. Kristensen [Fri, 3 Jul 2020 22:00:34 +0000 (15:00 -0700)]
freedreno/a6xx: Make blit_control helper a little more helpful

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

3 years agofreedreno/a6xx: Enable FMT6_10_10_10_2_UNORM blitting
Kristian H. Kristensen [Fri, 3 Jul 2020 21:34:28 +0000 (14:34 -0700)]
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>

3 years agofreedreno/a6xx: Separate stencil sysmem clear fix
Kristian H. Kristensen [Thu, 2 Jul 2020 20:42:58 +0000 (13:42 -0700)]
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>

3 years agofreedreno/a6xx: Don't emit src state when clearing
Kristian H. Kristensen [Thu, 2 Jul 2020 11:13:27 +0000 (04:13 -0700)]
freedreno/a6xx: Don't emit src state when clearing

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

3 years agofreedreno/a6xx: Consolidate computing blit_cntl
Kristian H. Kristensen [Thu, 2 Jul 2020 11:03:16 +0000 (04:03 -0700)]
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>

3 years agofreedreno/a6xx: Program SP_2D_SRC_FORMAT outside blit loop
Kristian H. Kristensen [Thu, 2 Jul 2020 11:00:42 +0000 (04:00 -0700)]
freedreno/a6xx: Program SP_2D_SRC_FORMAT outside blit loop

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

3 years agofreedreno/a6xx: Set src and dst rects outside blit loop
Kristian H. Kristensen [Thu, 2 Jul 2020 10:54:58 +0000 (03:54 -0700)]
freedreno/a6xx: Set src and dst rects outside blit loop

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

3 years agofreedreno/a6xx: Don't set unknown bit when tiling differs
Kristian H. Kristensen [Thu, 2 Jul 2020 10:49:57 +0000 (03:49 -0700)]
freedreno/a6xx: Don't set unknown bit when tiling differs

There is a bit here that's sometimes set, but it's generally not
related to whether tiling differs between src and dst.  Let's stop
setting it until we know more.

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

3 years agofreedreno/a6xx: Split out src and dst setup helpers for blit
Kristian H. Kristensen [Thu, 2 Jul 2020 10:42:19 +0000 (03:42 -0700)]
freedreno/a6xx: Split out src and dst setup helpers for blit

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

3 years agofreedreno/a6xx: Move fd6_ifmt into fd6_blitter.c
Kristian H. Kristensen [Thu, 2 Jul 2020 10:05:12 +0000 (03:05 -0700)]
freedreno/a6xx: Move fd6_ifmt into fd6_blitter.c

It's only used in this file.

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

3 years agofreedreno/a6xx: Don't blit with R2D_RAW
Kristian H. Kristensen [Wed, 1 Jul 2020 21:50:52 +0000 (14:50 -0700)]
freedreno/a6xx: Don't blit with R2D_RAW

Map all formats to a valid ifmt.  FMT6_10_10_10_2_UNORM_DEST still
doesn't work on the blitter so keep that one on the u_blitter path.

Fixes
dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.*
with FD_MESA_DEBUG=nogmem.

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

3 years agoturnip: drop GS clear path
Jonathan Marek [Tue, 7 Jul 2020 17:12:14 +0000 (13:12 -0400)]
turnip: drop GS clear path

We didn't know how to write layer id without GS, since that's the only way
to do it through VK/GL, and the blob didn't implement this clear case (and
failed cases where it was absolutely necessary). However now we know how to
set it after some educated guesses and looking at tess/geom traces, so the
GS path can be dropped.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5790>

3 years agoturnip: clean up primitive output state
Jonathan Marek [Tue, 7 Jul 2020 14:37:40 +0000 (10:37 -0400)]
turnip: clean up primitive output state

We only need to emit one set of primitive output registers. This may differ
from the blob, because it seems to try to allow using the same pipeline
with tess/geom enabled/disabled.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5790>

3 years agofreedreno/regs: update primitive output related registers
Jonathan Marek [Tue, 7 Jul 2020 04:08:33 +0000 (00:08 -0400)]
freedreno/regs: update primitive output related registers

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5790>

3 years agofreedreno/ir3: Fix uninit var warning.
Eric Anholt [Wed, 8 Jul 2020 20:49:31 +0000 (13:49 -0700)]
freedreno/ir3: Fix uninit var warning.

It's a decent bit of analysis to see that the initialization will always
happen, and my compiler isn't doing so in at least one configuration.

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

3 years agofreedreno/ir3_cmdline: Fix an uninit var warning.
Eric Anholt [Thu, 9 Jul 2020 23:15:16 +0000 (16:15 -0700)]
freedreno/ir3_cmdline: Fix an uninit var warning.

You could only access entry through the initialized path, but we can clean
up the compiler warning by not keeping the other var.

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

3 years agoturnip: implement VK_EXT_private_data
Hyunjun Ko [Mon, 13 Jul 2020 03:12:56 +0000 (03:12 +0000)]
turnip: implement VK_EXT_private_data

Which is using base class's implementation.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539>

3 years agoturnip: Use the common base object type and struct.
Hyunjun Ko [Mon, 13 Jul 2020 03:08:15 +0000 (03:08 +0000)]
turnip: Use the common base object type and struct.

v2. Define new helper function to avoid duplicated a pair of function calls.
v3. Move new helper functions to vk_object.h and call them.
v4. Merge 2 commits to use commomn base object type and struct into one.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539>

3 years agotu: Fix wrong copies of sampler descriptor.
Hyunjun Ko [Tue, 14 Jul 2020 00:47:30 +0000 (00:47 +0000)]
tu: Fix wrong copies of sampler descriptor.

Found this with the following patch but it exists since adding ycbcr
sampler to the struct.

Fixes: d070a7ba0cfb11f1e01774b9dd3775ab7cd0c4ea
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539>

3 years agovulkan: Adds helpers for vk_object (de)alloation and (de)initialization.
Hyunjun Ko [Wed, 1 Jul 2020 05:05:25 +0000 (05:05 +0000)]
vulkan: Adds helpers for vk_object (de)alloation and (de)initialization.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539>

3 years agogitlab-ci: reduce a630 runner load
Rob Clark [Tue, 14 Jul 2020 02:00:57 +0000 (19:00 -0700)]
gitlab-ci: reduce a630 runner load

They seem to be sometimes taking a while to boot, which is triggering CI
timeouts.  (Possibly tftp server in bad shape?)  Cut out non-essential
a630 CI jobs, and reduce the gles3/gles31 jobs to compensate.

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

3 years agomeson/intel: add missing dep on git_sha1.h
Eric Engestrom [Mon, 13 Jul 2020 16:14:01 +0000 (18:14 +0200)]
meson/intel: add missing dep on git_sha1.h

Fixes: 805b32cab90547a576af ("intel: add identifier for debug purposes")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5882>

3 years agozink: use type of src[0] for ntv store and load ops
Mike Blumenkrantz [Wed, 17 Jun 2020 19:06:27 +0000 (15:06 -0400)]
zink: use type of src[0] for ntv store and load ops

in some cases (e.g., gl_ClipDistance) the nir_variable type doesn't match
the needed destination type, so we can simplify this code to just use
the destination type

fixes spec@glsl-1.10@execution@interpolation@interpolation-none-gl_backcolor-smooth-vertex

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

3 years agozink: add lengthy comment and remove assert from discard_if ntv pass
Mike Blumenkrantz [Sun, 14 Jun 2020 21:24:29 +0000 (17:24 -0400)]
zink: add lengthy comment and remove assert from discard_if ntv pass

as in the comment, while we may want to try verifying that discard will be
the last instruction in a block, it's a bit problematic given that other nir
passes we're doing may insert instructions after a discard as part of e.g.,
nir_opt_dead_cf in the process of removing another block

fixes shaders@glsl-fs-discard-04

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

3 years agozink: handle ntv case of nested loop instructions more permissively
Mike Blumenkrantz [Wed, 10 Jun 2020 15:09:47 +0000 (11:09 -0400)]
zink: handle ntv case of nested loop instructions more permissively

if the last instruction in a loop's body terminates a block, e.g., from
a nested loop with a jump as its final instruction, then no block will
have been started when returning to the original loop, and there's no need
to emit a branch

fixes shaders@glsl-vs-continue-in-switch-in-do-while

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

3 years agozink: use right vulkan type for GL_PRIMITIVES_GENERATED queries
Mike Blumenkrantz [Thu, 9 Jul 2020 19:59:29 +0000 (15:59 -0400)]
zink: use right vulkan type for GL_PRIMITIVES_GENERATED queries

VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT includes
primitives which won't get drawn due to e.g., not enough vertices emitted
by geometry shader

fixes spec@glsl-1.50@gs-emits-too-few-verts

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

3 years agozink: only reset query pool on query end if current batch isn't in renderpass
Mike Blumenkrantz [Mon, 8 Jun 2020 13:59:44 +0000 (09:59 -0400)]
zink: only reset query pool on query end if current batch isn't in renderpass

reset can't be performed during a renderpass, so we need to defer that until a
time when we're definitely not in a renderpass, such as when we're starting a
new query or resuming a query

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

3 years agozink: properly handle query pool overflows
Mike Blumenkrantz [Mon, 25 May 2020 14:59:57 +0000 (10:59 -0400)]
zink: properly handle query pool overflows

inline a query result value to each query object so we can stash the partial
result just before we do a pool reset, which will always happen during the
suspend/resume query mechanism that swaps active queries from a flushed batch
to the next batch

once (or if) the "real" call to fetch query results is called, we can dump the
inlined value into the fetch value and return the full results

fixes mesa/mesa#3000

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

3 years agozink: only stall during query destroy for xfb queries
Mike Blumenkrantz [Mon, 25 May 2020 14:55:17 +0000 (10:55 -0400)]
zink: only stall during query destroy for xfb queries

xfb queries allocate vk buffer objects in the underlying driver which
can be deallocated while an xfb query is in-flight if we attempt to
defer it due to the way that gl xfb is translated to vk, so we need to
continue forcing this behavior in that case

for other query types, we can safely defer here until the current batch has
finished rather than block

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

3 years agozink: use #define for number of queries per-pool
Mike Blumenkrantz [Mon, 25 May 2020 14:54:23 +0000 (10:54 -0400)]
zink: use #define for number of queries per-pool

just to ensure we're consistent internally

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