platform/upstream/mesa.git
3 years agopan/bi: Implement saturated add/sub operations
Icecream95 [Tue, 29 Dec 2020 12:08:55 +0000 (01:08 +1300)]
pan/bi: Implement saturated add/sub operations

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

3 years agopanfrost: Set TLS for compute jobs
Icecream95 [Tue, 29 Dec 2020 10:10:41 +0000 (23:10 +1300)]
panfrost: Set TLS for compute jobs

Fixes CL programs using scratch storage, such as the Piglit test
i32-stack-array.cl.

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

3 years agopan/bi: Lower umul_high
Icecream95 [Mon, 28 Dec 2020 22:21:27 +0000 (11:21 +1300)]
pan/bi: Lower umul_high

Also lower uadd_carry, which the mul_high lowering generates.

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

3 years agopan/bi: Add w0 to the 'h01' swizzle bucket
Icecream95 [Mon, 28 Dec 2020 12:09:04 +0000 (01:09 +1300)]
pan/bi: Add w0 to the 'h01' swizzle bucket

A number of instructions, such as LOAD.i8, use this swizzle in the XML.

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

3 years agopan/mdg: Allow 64-bit src_bitsize for comparison operations
Icecream95 [Mon, 28 Dec 2020 12:05:52 +0000 (01:05 +1300)]
pan/mdg: Allow 64-bit src_bitsize for comparison operations

Fixes Piglit test attributes.cl.

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

3 years agopan/mdg: Don't reorder loads/stores past each other
Icecream95 [Mon, 28 Dec 2020 12:02:27 +0000 (01:02 +1300)]
pan/mdg: Don't reorder loads/stores past each other

Fixes Piglit test local-memory.cl.

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

3 years agopan/mdg: Limit int64 vectorization
Icecream95 [Mon, 28 Dec 2020 11:53:27 +0000 (00:53 +1300)]
pan/mdg: Limit int64 vectorization

Previously, nir_opt_vectorize was sometimes vectorizing 64-bit
load_const instructions to vec4.

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

3 years agopanfrost: Assert on sysval overflow
Icecream95 [Mon, 28 Dec 2020 11:49:36 +0000 (00:49 +1300)]
panfrost: Assert on sysval overflow

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

3 years agopanfrost: Add a sysval for local_work_dim
Icecream95 [Mon, 28 Dec 2020 11:47:54 +0000 (00:47 +1300)]
panfrost: Add a sysval for local_work_dim

Fixes Piglit test get-work-dim.cl.

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

3 years agopanfrost: Add a sysval for local_group_size
Icecream95 [Mon, 28 Dec 2020 11:44:56 +0000 (00:44 +1300)]
panfrost: Add a sysval for local_group_size

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

3 years agopan/bi: Use pan_nir_lower_64bit_intrin
Icecream95 [Tue, 5 Jan 2021 05:15:47 +0000 (18:15 +1300)]
pan/bi: Use pan_nir_lower_64bit_intrin

The intrinsics covered by the pass are implemented by reading 32-bit
registers, so there is no reason to keep them 64-bit.

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

3 years agopanfrost: Use the correct NIR options for OpenCL on Bifrost
Icecream95 [Sat, 26 Dec 2020 11:01:44 +0000 (00:01 +1300)]
panfrost: Use the correct NIR options for OpenCL on Bifrost

This is needed so that 64-bit operations are lowered properly.

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

3 years agopan/bi: Improve unknown intrinsic error
Icecream95 [Wed, 23 Dec 2020 00:27:37 +0000 (13:27 +1300)]
pan/bi: Improve unknown intrinsic error

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

3 years agopanfrost: Set bifrost_props for compute shaders
Icecream95 [Tue, 22 Dec 2020 10:24:30 +0000 (23:24 +1300)]
panfrost: Set bifrost_props for compute shaders

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

3 years agopan/bi: Implement load_kernel_input
Icecream95 [Tue, 22 Dec 2020 10:26:21 +0000 (23:26 +1300)]
pan/bi: Implement load_kernel_input

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

3 years agopan/bi: Implement load/store intrinsics
Icecream95 [Mon, 4 Jan 2021 09:05:06 +0000 (22:05 +1300)]
pan/bi: Implement load/store intrinsics

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

3 years agopan/bi: Improve interoperability of the command-line disassembler
Icecream95 [Tue, 22 Dec 2020 10:04:02 +0000 (23:04 +1300)]
pan/bi: Improve interoperability of the command-line disassembler

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

3 years agopan/bi: Set compute lowering options
Icecream95 [Tue, 22 Dec 2020 12:28:02 +0000 (01:28 +1300)]
pan/bi: Set compute lowering options

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

3 years agopan/bi: Add some compute intrinsic loads
Icecream95 [Tue, 22 Dec 2020 12:28:57 +0000 (01:28 +1300)]
pan/bi: Add some compute intrinsic loads

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

3 years agopan/bi: Handle 64-bit pack and unpack operations
Icecream95 [Tue, 22 Dec 2020 10:25:30 +0000 (23:25 +1300)]
pan/bi: Handle 64-bit pack and unpack operations

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

3 years agopan/bi: Lower 64-bit integers
Icecream95 [Tue, 22 Dec 2020 10:20:10 +0000 (23:20 +1300)]
pan/bi: Lower 64-bit integers

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

3 years agopan/bi: Pipe scratch_size in from NIR
Alyssa Rosenzweig [Tue, 22 Dec 2020 16:53:20 +0000 (11:53 -0500)]
pan/bi: Pipe scratch_size in from NIR

Needs to be added to whatever we spill ourselves.

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

3 years agonvc0: index_bias is now only set for indexed draws
Ilia Mirkin [Sat, 16 Jan 2021 23:08:44 +0000 (18:08 -0500)]
nvc0: index_bias is now only set for indexed draws

Fixes: cbdc00ac3a6 ("nouveau: fix handling draw info")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8539>

3 years agocso: set index_bounds_valid = true for arrays draws
Ilia Mirkin [Sun, 17 Jan 2021 17:46:03 +0000 (12:46 -0500)]
cso: set index_bounds_valid = true for arrays draws

The min/max indices are valid. Set the bit to true to indicate that.

Fixes glClear (+ clear_with_quads) on nouveau.

Fixes: 72ff53098c64 (gallium: add pipe_draw_info::index_bounds_valid)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reported-by: Simon Ser <contact@emersion.fr>
Tested-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8546>

3 years agozink: handle NULL views in zink_set_sampler_views
Erik Faye-Lund [Mon, 18 Jan 2021 16:48:27 +0000 (17:48 +0100)]
zink: handle NULL views in zink_set_sampler_views

Passing NULL for the views parameter should be the same as passing an
array of NULL, according to the documentation. So let's respect that
detail.

This fixes a crash when using GALLIUM_HUD.

Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8564>

3 years agoturnip: disable UBWC on Z24_S8 MSAA images on A630
Samuel Iglesias Gonsálvez [Thu, 17 Dec 2020 10:38:49 +0000 (11:38 +0100)]
turnip: disable UBWC on Z24_S8 MSAA images on A630

Fixes GPU hangs in dEQP-VK.renderpass2.depth_stencil_resolve.* tests
on A630.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8381>

3 years agoanv: Add a trivial implementation of VK_KHR_deferred_host_operation
Jason Ekstrand [Mon, 22 Jun 2020 16:57:32 +0000 (11:57 -0500)]
anv: Add a trivial implementation of VK_KHR_deferred_host_operation

This isn't actually capable of deferring anything; it just trivially
returns success.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7735>

3 years agoradv: Do not use a pipe offset for aliased sparse images.
Bas Nieuwenhuizen [Sat, 16 Jan 2021 13:27:58 +0000 (14:27 +0100)]
radv: Do not use a pipe offset for aliased sparse images.

Otherwise the offset might not match between the images that are
aliased.

Fixes: e553ea51e8c ("radv: Create sparse images.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4072
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8535>

3 years agowsi/x11: Use get_screen_resources_current in wsi_x11_detect_xwayland
Michel Dänzer [Thu, 14 Jan 2021 12:04:57 +0000 (13:04 +0100)]
wsi/x11: Use get_screen_resources_current in wsi_x11_detect_xwayland

get_screen_resources may trigger an active probe of display connections
in the X server, which may take significant time and/or result in log
file spam.

Fixes: b5268d532a01 "wsi/x11: Detect Xwayland"
Reported-by: Sylvain Bertrand <sylvain.bertrand@legeek.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8492>

3 years agoradeonsi: trim the size of si_vgt_param_key and si_vgt_stages_key
Marek Olšák [Sun, 10 Jan 2021 04:54:30 +0000 (23:54 -0500)]
radeonsi: trim the size of si_vgt_param_key and si_vgt_stages_key

These are the minimum sizes we can use.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: don't use si_get_vs_state in most places
Marek Olšák [Sat, 9 Jan 2021 12:23:48 +0000 (07:23 -0500)]
radeonsi: don't use si_get_vs_state in most places

It's incorrect because si_get_vs_state returns gs_copy_shader for legacy
GS. It was harmless, but let's use si_get_vs, which is simpler.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: rearrange condition for streamout workaround on gfx7 and gfx8
Marek Olšák [Sat, 9 Jan 2021 12:00:25 +0000 (07:00 -0500)]
radeonsi: rearrange condition for streamout workaround on gfx7 and gfx8

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: get out of si_emit_vs_state early for blit vertex shaders
Marek Olšák [Sat, 9 Jan 2021 10:53:29 +0000 (05:53 -0500)]
radeonsi: get out of si_emit_vs_state early for blit vertex shaders

They don't use current_vs_state.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: remove MRT-draw-calls, spill-draw-calls, spill-compute-calls
Marek Olšák [Sat, 9 Jan 2021 10:41:32 +0000 (05:41 -0500)]
radeonsi: remove MRT-draw-calls, spill-draw-calls, spill-compute-calls

due to limited usefulness and overhead in si_draw_vbo.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: make sctx->vertex_elements always non-NULL
Marek Olšák [Sat, 9 Jan 2021 10:27:57 +0000 (05:27 -0500)]
radeonsi: make sctx->vertex_elements always non-NULL

Bind a state with 0 vertex elements there.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: add a specialized function for CP DMA L2 prefetch
Marek Olšák [Sun, 27 Dec 2020 04:14:01 +0000 (23:14 -0500)]
radeonsi: add a specialized function for CP DMA L2 prefetch

This radically simplifies the code to decrease CPU overhead in si_draw_vbo.
The generic CP DMA copy function is too complicated.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: make cik_emit_prefetch_L2 templated and move it to si_state_draw.cpp
Marek Olšák [Sun, 27 Dec 2020 01:34:09 +0000 (20:34 -0500)]
radeonsi: make cik_emit_prefetch_L2 templated and move it to si_state_draw.cpp

This is a great candidate for a template. There are a lot of conditions
that are already templated in si_draw_vbo.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: fix si_num_prims_for_vertices for PIPE_PRIM_POLYGON
Marek Olšák [Sun, 27 Dec 2020 03:13:13 +0000 (22:13 -0500)]
radeonsi: fix si_num_prims_for_vertices for PIPE_PRIM_POLYGON

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: don't compute average vertex count in si_draw_vbo
Marek Olšák [Sun, 27 Dec 2020 03:06:42 +0000 (22:06 -0500)]
radeonsi: don't compute average vertex count in si_draw_vbo

It's probably not needed and we also have draw merging on gfx10,
so we should be able to use total_driver_count in theory.
(I may be wrong, but I don't know if having avg_direct_count really
improves anything)

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: don't pass pipe_draw_info into si_emit_derived_tess_state
Marek Olšák [Sun, 27 Dec 2020 02:29:39 +0000 (21:29 -0500)]
radeonsi: don't pass pipe_draw_info into si_emit_derived_tess_state

Only one field is used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: translate pipe_prim_type only when it changes
Marek Olšák [Sun, 27 Dec 2020 02:16:28 +0000 (21:16 -0500)]
radeonsi: translate pipe_prim_type only when it changes

just sink it into the branch

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: don't pass pipe_draw_info into si_emit_ia_multi_vgt_param
Marek Olšák [Sun, 27 Dec 2020 02:10:58 +0000 (21:10 -0500)]
radeonsi: don't pass pipe_draw_info into si_emit_ia_multi_vgt_param

Only one field is used.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: don't pass pipe_draw_info into si_emit_vs_state
Marek Olšák [Sun, 27 Dec 2020 02:07:40 +0000 (21:07 -0500)]
radeonsi: don't pass pipe_draw_info into si_emit_vs_state

only one field is used

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: move emit_cache_flush functions into si_gfx_cs.c
Marek Olšák [Sun, 27 Dec 2020 01:59:38 +0000 (20:59 -0500)]
radeonsi: move emit_cache_flush functions into si_gfx_cs.c

This is a better place for them. They are not inlined anyway.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: don't clear unaligned bits when unbinding vertex buffers
Marek Olšák [Sat, 19 Dec 2020 21:45:28 +0000 (16:45 -0500)]
radeonsi: don't clear unaligned bits when unbinding vertex buffers

It's initialized to 0, so &= is a no-op.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoradeonsi: constant buffer cleanups
Marek Olšák [Sat, 26 Dec 2020 17:10:01 +0000 (12:10 -0500)]
radeonsi: constant buffer cleanups

si_set_clip_state unreferenced a NULL pointer = no-op.
si_set_tess_state can just pass the user buffer to si_set_rw_buffer directly.

Then si_upload_const_buffer can be static.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>

3 years agoandroid: freedreno/ir3: Switch over to new encoder/decoder
Mauro Rossi [Sat, 16 Jan 2021 20:46:23 +0000 (21:46 +0100)]
android: freedreno/ir3: Switch over to new encoder/decoder

Fixes the following building error:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: isa_assemble
>>> referenced by ir3_shader.c:151 (external/mesa/src/freedreno/ir3/ir3_shader.c:151)
...
ld.lld: error: undefined symbol: isa_decode
>>> referenced by ir3_shader.c:668 (external/mesa/src/freedreno/ir3/ir3_shader.c:668)

Fixes: 5cae4779c ("freedreno/ir3: Switch over to new encoder/decoder")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8538>

3 years agoandroid: freedreno/hw/isa: Add description of ir3 ISA
Mauro Rossi [Sat, 16 Jan 2021 20:36:47 +0000 (21:36 +0100)]
android: freedreno/hw/isa: Add description of ir3 ISA

Necessary to build libir3decode and libir3encode for Android

Fixes: 6d94f575d ("freedreno/hw/isa: Add description of ir3 ISA")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8538>

3 years agozink: remove excessive checks for loader version
Hoe Hao Cheng [Fri, 15 Jan 2021 18:24:20 +0000 (02:24 +0800)]
zink: remove excessive checks for loader version

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

3 years agozink/codegen: find promotion version using vulkan registry
Hoe Hao Cheng [Fri, 15 Jan 2021 17:48:33 +0000 (01:48 +0800)]
zink/codegen: find promotion version using vulkan registry

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

3 years agozink/codegen: adding/fixing comments and copyright notice
Hoe Hao Cheng [Fri, 15 Jan 2021 09:23:59 +0000 (17:23 +0800)]
zink/codegen: adding/fixing comments and copyright notice

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

3 years agozink/codegen: codegen-ize load_instance_extensions()
Hoe Hao Cheng [Fri, 15 Jan 2021 09:16:54 +0000 (17:16 +0800)]
zink/codegen: codegen-ize load_instance_extensions()

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

3 years agozink/codegen: enable instance extension unconditionally if promoted
Hoe Hao Cheng [Fri, 15 Jan 2021 09:13:51 +0000 (17:13 +0800)]
zink/codegen: enable instance extension unconditionally if promoted

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

3 years agozink/codegen: make 'struct' optional in Version
Hoe Hao Cheng [Fri, 15 Jan 2021 09:01:44 +0000 (17:01 +0800)]
zink/codegen: make 'struct' optional in Version

while we are at it, fix a typo too

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

3 years agozink/codegen: add some new attributes to Extension
Hoe Hao Cheng [Thu, 14 Jan 2021 18:04:50 +0000 (02:04 +0800)]
zink/codegen: add some new attributes to Extension

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

3 years agonouveau: Fix typos.
Vinson Lee [Thu, 14 Jan 2021 06:01:58 +0000 (22:01 -0800)]
nouveau: Fix typos.

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

3 years agolima: introduce fs and vs shader cache
Erico Nunes [Mon, 4 Jan 2021 20:13:30 +0000 (21:13 +0100)]
lima: introduce fs and vs shader cache

Some opengl features require shader recompilation to be implemented in
the mali400 and can only be detected at draw time. In some applications,
this could lead to recompiling shaders on every frame which could kill
performance. Introduce a shader cache to prevent this issue.
lima didn't have vertex shader recompilation yet but it is needed to
implement followup features, so include it here too.
Code heavily borrowed from the vc4 shader cache implementation.

One notable difference between the vc4 reference implementation and lima
is that lima still compiles the base shader at state creation time
without deferring it to the next draw (so that it stays compatible with
behaviour expected by unmodified shader-db, for example).

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8357>

3 years agofrontends/va/image: Eliminate repetitive code on error paths
Alexander Kapshuk [Wed, 13 Jan 2021 19:17:02 +0000 (19:17 +0000)]
frontends/va/image: Eliminate repetitive code on error paths

Removes repetitive code in exit on error paths in the derive image function.

Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8481>

3 years agofreedreno/a2xx: add RB perfcounter 1-3
Joel Linn [Tue, 17 Nov 2020 23:49:58 +0000 (00:49 +0100)]
freedreno/a2xx: add RB perfcounter 1-3

Xenos driver reads four perf counters in total.

v2: fix register names

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

3 years agofreedreno/a2xx: fix/add RBBM perfcounter
Joel Linn [Tue, 17 Nov 2020 23:41:10 +0000 (00:41 +0100)]
freedreno/a2xx: fix/add RBBM perfcounter

Xenos driver read two perf counters and their order is also different.

v2: fix typo in register address

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

3 years agoglsl: only expose int64 atomics when extension is enabled
Ilia Mirkin [Sat, 16 Jan 2021 06:10:24 +0000 (01:10 -0500)]
glsl: only expose int64 atomics when extension is enabled

This limits the exposure of these functions to when the extension is
available. Prevents crashes otherwise, as the rest of the infrastructure
doesn't necessarily expect these functions when the extension is not
available.

Fixes: 40c1f9883e5 ("mesa,glsl: add support for GL_NV_shader_atomic_int64")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8533>

3 years agonv50/ir: clear dnz flag when converting mul/mad to simpler ops
Ilia Mirkin [Fri, 15 Jan 2021 22:01:27 +0000 (17:01 -0500)]
nv50/ir: clear dnz flag when converting mul/mad to simpler ops

Fixes some assertion failures in the GM107 emitter with the game
'tansei', noticed while debugging gitlab issue 4101.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8534>

3 years agofreedreno/a6xx: Add r2d support for GMEM resolves
Rob Clark [Wed, 13 Jan 2021 23:56:27 +0000 (15:56 -0800)]
freedreno/a6xx: Add r2d support for GMEM resolves

For cases where we need to do an MSAA resolve that BLIT events cannot
handle, fall back to CP_BLIT (r2d)

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

3 years agoac/surface: Fix GFX9 sparse mip info.
Bas Nieuwenhuizen [Fri, 15 Jan 2021 13:27:02 +0000 (14:27 +0100)]
ac/surface: Fix GFX9 sparse mip info.

Used the wrong offset & pitch for gfx9.

Fixes: 50bafb85ec1 ("ac/surf: Add sparse texture info to radeon_surf.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4072
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8526>

3 years agost/mesa: fix broken moves for u2i64 and related ops
Ilia Mirkin [Wed, 13 Jan 2021 07:14:07 +0000 (02:14 -0500)]
st/mesa: fix broken moves for u2i64 and related ops

These ops just put out mov's directly, which screws up the assignment
logic -- it just tries to only process the "last" mov. Don't try to do
the more optimized thing for 64-bit types, where this is just much
trickier.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8463>

3 years agozink: reduce blendfactor when alpha_to_one is set
Mike Blumenkrantz [Fri, 14 Aug 2020 15:39:00 +0000 (11:39 -0400)]
zink: reduce blendfactor when alpha_to_one is set

if alpha is 1, some of these blendfactors can be reduced to simpler ones

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

3 years agolavapipe: fix missing piece of VK_KHR_get_physical_device_properties2
Dave Airlie [Thu, 14 Jan 2021 23:57:52 +0000 (09:57 +1000)]
lavapipe: fix missing piece of VK_KHR_get_physical_device_properties2

I missed two parts of the APIs for this, so add them, should fix
crashes in gstreamer vulkan when it tries to load lvp.

Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3989
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8511>

3 years agoFall back on clock_gettime when timespec_get() is unavailable
Jeremy Huddleston Sequoia [Wed, 13 Jan 2021 00:44:34 +0000 (16:44 -0800)]
Fall back on clock_gettime when timespec_get() is unavailable

Fixes: e3a8013de8ca "util/u_queue: add util_queue_fence_wait_timeout"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1020
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4088

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8482>

3 years agopan/bi: Fix assertion
Alyssa Rosenzweig [Thu, 14 Jan 2021 04:16:30 +0000 (23:16 -0500)]
pan/bi: Fix assertion

Fixes: bef3fedc814 ("pan/bi: Lower 8bit fragment outputs to 16bit")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reported-by: Coverity
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8489>

3 years agodevice-select-layer: update for vulkan 1.2
Dave Airlie [Thu, 14 Jan 2021 23:19:03 +0000 (09:19 +1000)]
device-select-layer: update for vulkan 1.2

The vulkan loader doesn't load layers for apps that require a newer
version of vulkan, so this layer didn't get loaded for vulkan 1.2 apps.

I would like to just stick 1.09 in there but it might be worth
validating it works at new version of vulkan I suppose and the major
doesn't revise that often

Fixes: 9bc5b2d169d3 ("vulkan: add initial device selection layer. (v6)")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8508>

3 years agodarwin: Use the system libunwind
Jeremy Huddleston Sequoia [Thu, 14 Jan 2021 18:08:34 +0000 (10:08 -0800)]
darwin: Use the system libunwind

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4094

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8507>

3 years agoutil: Fix pointer to integer conversion error when using libunwind
Jeremy Huddleston Sequoia [Thu, 14 Jan 2021 18:16:15 +0000 (10:16 -0800)]
util: Fix pointer to integer conversion error when using libunwind

../src/util/u_debug_stack.c:97:20: error: incompatible pointer to integer conversion assigning to 'unw_word_t' (aka 'unsigned long') from 'void *' [-Werror,-Wint-conversion]
   pip.unwind_info = NULL;
                   ^ ~~~~
1 error generated.

Fixes: 70c272004f72 "gallium/util: libunwind support"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4094

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8507>

3 years agodarwin: Use the system libexpat
Jeremy Huddleston Sequoia [Thu, 14 Jan 2021 18:08:07 +0000 (10:08 -0800)]
darwin: Use the system libexpat

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4093

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8506>

3 years agoutil/format: Simplify the generated unpack code.
Eric Anholt [Mon, 11 Nov 2019 22:43:14 +0000 (14:43 -0800)]
util/format: Simplify the generated unpack code.

We were declaring the temps, then in the same order declaring
assignments to those temps.  The code is more legible (and shorter)
with the assignments moved in place.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agomesa: Move the rest of format_unpack.py out of code generation.
Eric Anholt [Thu, 7 Nov 2019 22:16:30 +0000 (14:16 -0800)]
mesa: Move the rest of format_unpack.py out of code generation.

There's nothing conditional any more in the template, so just move it
to plain .c code at last.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agomesa: Use a bunch of util functions for Z/S unpacking.
Eric Anholt [Thu, 7 Nov 2019 21:22:21 +0000 (13:22 -0800)]
mesa: Use a bunch of util functions for Z/S unpacking.

Drops another 2k of text.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agoutil: Give a reasonable answer when unpacking z32unorm from floats.
Eric Anholt [Thu, 7 Nov 2019 21:51:15 +0000 (13:51 -0800)]
util: Give a reasonable answer when unpacking z32unorm from floats.

We weren't clamping the float Z value, just multiplying it by a big
float and casting that to int.  This makes util/format's z unpacking
match Mesa's.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agomesa: Reuse util_format's unpack functions for pure integer formats.
Eric Anholt [Thu, 7 Nov 2019 19:55:11 +0000 (11:55 -0800)]
mesa: Reuse util_format's unpack functions for pure integer formats.

Drops 5k of compiled text from all GL drivers.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agomesa: Reuse util_format's unpack_8unorm.
Eric Anholt [Thu, 7 Nov 2019 19:35:10 +0000 (11:35 -0800)]
mesa: Reuse util_format's unpack_8unorm.

Drops ~8k of compiled text from all GL drivers.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agoutil: Fix rounding of unpack_unorm8 from small unorm formats.
Eric Anholt [Mon, 11 Nov 2019 23:29:37 +0000 (15:29 -0800)]
util: Fix rounding of unpack_unorm8 from small unorm formats.

The code was doing the bit-shift trick, but not accounting for the
rounding necessary which the Mesa unpack code was previously doing.
Using the helpers prevents a regression in
KHR-GL46.copy_image.smoke_test on iris as we consolidate the
pack/unpack code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agoutil: Fix UBSan failure on _mesa_unorm_to_unorm.
Eric Anholt [Wed, 12 Aug 2020 21:30:18 +0000 (14:30 -0700)]
util: Fix UBSan failure on _mesa_unorm_to_unorm.

It complains about shifting 1<<31 being undefined, so make it a 1u.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agoutil: Move most of src/mesa/main/format_utils.h to util/format/
Eric Anholt [Mon, 11 Nov 2019 23:02:25 +0000 (15:02 -0800)]
util: Move most of src/mesa/main/format_utils.h to util/format/

This is a set of very nice, complete helpers for moving around bits in
various formats, and we want to retain its behavior when deduplicating
Mesa's format pack/unpack and gallium's.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agomesa: Make _mesa_unpack_rgba_block() use the u_format pack/unpack.
Eric Anholt [Thu, 7 Nov 2019 18:56:06 +0000 (10:56 -0800)]
mesa: Make _mesa_unpack_rgba_block() use the u_format pack/unpack.

This moves it to non-generated code, since there wasn't any codegen
anyway.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agomesa: Replace the float[4] unpack code with util/format's.
Eric Anholt [Thu, 7 Nov 2019 18:37:54 +0000 (10:37 -0800)]
mesa: Replace the float[4] unpack code with util/format's.

The gallium drivers lose 10-15k of binary by not having this duplicated
unpack code, but classic i965 gains 215k of binary by pulling in
u_format's pack/unpack code.  The cost to classic will go down as we drop
more of the duplicated code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agomesa: Drop incorrect statement about Z unpack behavior.
Eric Anholt [Thu, 7 Nov 2019 21:27:04 +0000 (13:27 -0800)]
mesa: Drop incorrect statement about Z unpack behavior.

We pass z32f pixels through without clamping, as one would expect.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agomesa: Add some little unit tests showing format unpack behavior.
Eric Anholt [Thu, 7 Nov 2019 20:10:51 +0000 (12:10 -0800)]
mesa: Add some little unit tests showing format unpack behavior.

I'm about to refactor pack/unpack code, and it would be nice to
document what it does as I change it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agoutil/format: Fix pack/unpack of A1R5G5B5_UINT.
Eric Anholt [Fri, 15 Jan 2021 00:17:21 +0000 (16:17 -0800)]
util/format: Fix pack/unpack of A1R5G5B5_UINT.

Avoids regressing KHR-GL33.packed_pixels.pbo_rectangle.* when
transitioning from mesa/main pack/unpack codegen to util/format's.

Fixes: b28eb044cdc1 ("gallium: Add equivalents of packed MESA_FORMAT_*UINT formats.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297>

3 years agofreedreno/isa: Fix branch/jump offset encoding
Rob Clark [Fri, 15 Jan 2021 16:51:39 +0000 (08:51 -0800)]
freedreno/isa: Fix branch/jump offset encoding

When cross compiling with clang, `1ul` would end up 32b instead of 64b,
resulting in 32b fields (like branch/jump offsets) being encoded as
zero.  Which results in infinite loops.

Fixes: e7630ec278f ("freedreno/hw: Add isaspec mechanism for documenting/defining an ISA")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8528>

3 years agozink: enable PIPE_CAP_CLEAR_TEXTURE
Mike Blumenkrantz [Thu, 13 Aug 2020 17:50:21 +0000 (13:50 -0400)]
zink: enable PIPE_CAP_CLEAR_TEXTURE

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

3 years agozink: add a pipe_context::clear_texture hook
Mike Blumenkrantz [Thu, 13 Aug 2020 21:23:51 +0000 (17:23 -0400)]
zink: add a pipe_context::clear_texture hook

there's a lot going on here, but the gist of it is:
* if we're not in a renderpass, use the no_rp clear helpers
* if we're in a renderpass, use our lord and savior u_blitter with a temporary
  surface that we create just for the blit

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

3 years agozink: break out some of the u_blitter setup into util function
Mike Blumenkrantz [Thu, 13 Aug 2020 21:17:38 +0000 (17:17 -0400)]
zink: break out some of the u_blitter setup into util function

we'll be using this for more than just zink_blit, so we can reuse some code

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

3 years agozink: break out color/zs no_rp clear into separate functions
Mike Blumenkrantz [Thu, 13 Aug 2020 19:09:30 +0000 (15:09 -0400)]
zink: break out color/zs no_rp clear into separate functions

make more code more reusable

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

3 years agozink: break out scissor region testing for clear functions
Mike Blumenkrantz [Thu, 13 Aug 2020 18:22:14 +0000 (14:22 -0400)]
zink: break out scissor region testing for clear functions

it'll be handy to be able to reuse this

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

3 years agozink: handle clears with scissor regions
Mike Blumenkrantz [Thu, 13 Aug 2020 17:44:56 +0000 (13:44 -0400)]
zink: handle clears with scissor regions

this just sets the info struct members as needed

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

3 years agozink: start to refactor clearing
Mike Blumenkrantz [Thu, 13 Aug 2020 15:45:30 +0000 (11:45 -0400)]
zink: start to refactor clearing

we currently only handle clears inside renderpasses, but it's also possible
to perform clears outside of renderpasses, so we can break this logic up a bit
to open the door to handling the non-rp case

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

3 years agozink: move zink_clear to zink_clear.c
Mike Blumenkrantz [Thu, 13 Aug 2020 15:38:32 +0000 (11:38 -0400)]
zink: move zink_clear to zink_clear.c

we're going to have a bunch of clear code, so having it all in a concise
place that's consistent with other gallium drivers is helpful

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

3 years agointel/perf: move gt_frequency to results
Lionel Landwerlin [Tue, 8 Sep 2020 11:33:12 +0000 (14:33 +0300)]
intel/perf: move gt_frequency to results

We want to unify things a bit between GL & Vulkan. So store those
values in the results rather than just in the GL query code.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525>

3 years agointel/perf: link queries back to the gen_perf_config object
Lionel Landwerlin [Thu, 3 Sep 2020 09:19:11 +0000 (12:19 +0300)]
intel/perf: link queries back to the gen_perf_config object

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525>

3 years agointel/perf: add definition for generic perf counters
Lionel Landwerlin [Mon, 7 Sep 2020 14:35:08 +0000 (17:35 +0300)]
intel/perf: add definition for generic perf counters

Those are not part of the OA report but will be used in upcoming
counters.

v2: Rename counter defines (Marcin)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525>

3 years agointel/perf: restructure i915 perf version checks
Lionel Landwerlin [Tue, 1 Sep 2020 10:09:04 +0000 (13:09 +0300)]
intel/perf: restructure i915 perf version checks

Trying to make things more readable.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525>