platform/upstream/mesa.git
3 years agoi965: Rename intel_mip* to brw_mip*.
Kenneth Graunke [Mon, 22 Feb 2021 19:01:33 +0000 (11:01 -0800)]
i965: Rename intel_mip* to brw_mip*.

With lots of indentation fixes.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>

3 years agoi965: Rename intel_renderbuffer to brw_renderbuffer
Kenneth Graunke [Mon, 22 Feb 2021 18:43:42 +0000 (10:43 -0800)]
i965: Rename intel_renderbuffer to brw_renderbuffer

For now, keeping the 'irb' name on local variables.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>

3 years agoi965: Rename intel_texture_{object,image} to brw_texture_{object,image}
Kenneth Graunke [Mon, 22 Feb 2021 18:41:26 +0000 (10:41 -0800)]
i965: Rename intel_texture_{object,image} to brw_texture_{object,image}

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>

3 years agoi965: Rename intel_screen to brw_screen
Kenneth Graunke [Mon, 22 Feb 2021 18:40:10 +0000 (10:40 -0800)]
i965: Rename intel_screen to brw_screen

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>

3 years agoi965: Rename intel_batchbuffer_* to brw_batch_*.
Kenneth Graunke [Mon, 22 Feb 2021 18:35:03 +0000 (10:35 -0800)]
i965: Rename intel_batchbuffer_* to brw_batch_*.

Shorter, matching the convention in iris, and drops use of "intel_"
on i965-specific code that isn't shared.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>

3 years agoi965: Rename use_intel_mipree_map_blit to use_blitter_to_map
Kenneth Graunke [Mon, 22 Feb 2021 19:04:53 +0000 (11:04 -0800)]
i965: Rename use_intel_mipree_map_blit to use_blitter_to_map

Mip...ree?  Use a more descriptive name instead of just fixing the typo.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9207>

3 years agofreedreno: Add macro for duration based warns
Rob Clark [Wed, 24 Feb 2021 19:21:01 +0000 (11:21 -0800)]
freedreno: Add macro for duration based warns

Add a macro to do a perf_debug() if a block of code takes longer than a
specified amount of time.

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

3 years agofreedreno: Slight perf_debug rework
Rob Clark [Wed, 24 Feb 2021 20:36:56 +0000 (12:36 -0800)]
freedreno: Slight perf_debug rework

Allow ctx to be NULL in perf_debug_ctx() and make perf_debug() a
shortcut for perf_debug_ctx(NULL, ...) to simplify things slightly
in the next patch.

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

3 years agofreedreno: Add FD_DBG() macro
Rob Clark [Wed, 24 Feb 2021 21:31:43 +0000 (13:31 -0800)]
freedreno: Add FD_DBG() macro

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

3 years agofreedreno/ir3: Fix initial_variants_synchronous() condition
Rob Clark [Thu, 25 Feb 2021 17:12:54 +0000 (09:12 -0800)]
freedreno/ir3: Fix initial_variants_synchronous() condition

This was meant to be an || rather than &&, although it didn't matter for
shaderdb because both conditions would be true.  But it did matter if
you were trying to force synchronous compile to avoid having nir/ir3
prints interleaved from multiple threads.

While at it, add a more specific debug flag to force initial variant
compile to be synchronous, because at some point the 'shaderdb' flag
itself will not force this.

Fixes: 75b0c4b5e1e ("freedreno/ir3: Async shader compile")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264>

3 years agofreedreno: Fix think-o in fd_resource_wait()
Rob Clark [Wed, 24 Feb 2021 18:58:15 +0000 (10:58 -0800)]
freedreno: Fix think-o in fd_resource_wait()

Fixes: dabec19b05e ("freedreno: Add perf_debug logging for bo stalls")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9264>

3 years agoandroid: pan/bi: reorder static dependencies in gallium/dri
Mauro Rossi [Tue, 23 Feb 2021 20:50:18 +0000 (21:50 +0100)]
android: pan/bi: reorder static dependencies in gallium/dri

libpanfrost_lib depends on libpanfrost_bifrost for 'bifrost_compile_shader_nir' symbol
libpanfrost_lib depends on libpanfrost_bifrost_disasm for 'disassemble_bifrost' symbol
LOCAL_STATIC_LIBRARIES requires proper ordering to make the symbols available

Fixes the following building error happening with Android P:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
external/mesa/src/panfrost/lib/decode.c:534: error: undefined reference to 'disassemble_bifrost'
external/mesa/src/panfrost/lib/pan_shader.c:145: error: undefined reference to 'bifrost_compile_shader_nir'

Cc: 20.3 21.0 <mesa-stable@lists.freedesktop.org>
Fixes: 166630f ("android: pan/bi: Separate disasm/compiler targets")
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9265>

3 years agofreedreno/a5xx: Fix cube image load/stores.
Eric Anholt [Thu, 25 Feb 2021 00:28:18 +0000 (16:28 -0800)]
freedreno/a5xx: Fix cube image load/stores.

This is the same thing we do on a6xx for cubes.

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

3 years agoci: try building lavapipe on windows
Dave Airlie [Thu, 18 Feb 2021 04:56:39 +0000 (14:56 +1000)]
ci: try building lavapipe on windows

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

3 years agovulkan: Update dispatch table gen for Windows
James Park [Wed, 3 Feb 2021 18:28:47 +0000 (10:28 -0800)]
vulkan: Update dispatch table gen for Windows

Update entry null test to deal with MSVC not supporting weak functions.

Also fix warnings for returning from void functions.

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

3 years agovulkan: Fix source list for vulkan_wsi on Windows
James Park [Wed, 3 Feb 2021 18:32:02 +0000 (10:32 -0800)]
vulkan: Fix source list for vulkan_wsi on Windows

I don't think link_whole works right for VS project generation, but MSVC
doesn't support GCC weak functions anyway, so work around it.

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

3 years agozink: fix dynamic bo lowering for ssbo stores
Mike Blumenkrantz [Wed, 17 Feb 2021 23:23:43 +0000 (18:23 -0500)]
zink: fix dynamic bo lowering for ssbo stores

there are no piglit tests for this, so naturally it would not have worked

fixes KHR-GL46.compute_shader.resources-max

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9113>

3 years agomeson/gallium: Add an option to not use LLVM for gallium draw module
Jesse Natalie [Wed, 24 Feb 2021 18:42:49 +0000 (10:42 -0800)]
meson/gallium: Add an option to not use LLVM for gallium draw module

We'd like to use one Mesa build environment which builds our CL compiler
stack (which needs Clang/LLVM) and which builds our GL driver. The GL
driver doesn't really need LLVM support, and since we're statically
linking LLVM, removing it from the driver drastically reduces our DLL
size on disk.

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

3 years agoegl: android: use num_planes param in createImageFromDmaBufs()
Roman Stratiienko [Thu, 20 Aug 2020 15:46:57 +0000 (18:46 +0300)]
egl: android: use num_planes param in createImageFromDmaBufs()

Fixes 972f36d8fa62 ("egl/android: Call createImageFromDmaBufs directly")

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9278>

3 years agomeson/xmlconfig: win32 regex fallback
Michel Zou [Wed, 24 Feb 2021 19:28:38 +0000 (20:28 +0100)]
meson/xmlconfig: win32 regex fallback

xmlconfig now uses regex fonctions even without xml support

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

3 years agozink: ci updates
Mike Blumenkrantz [Thu, 25 Feb 2021 13:38:48 +0000 (08:38 -0500)]
zink: ci updates

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

3 years agozink: relax tessellation shader reqs
Mike Blumenkrantz [Tue, 23 Feb 2021 19:20:10 +0000 (14:20 -0500)]
zink: relax tessellation shader reqs

vk memory model isn't actually required for tcs io semantics due
to how control barriers are emitted in GL

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

3 years agolima: fix xserver page flip fail for full screen client
Qiang Yu [Sun, 14 Feb 2021 10:41:10 +0000 (18:41 +0800)]
lima: fix xserver page flip fail for full screen client

Need to import client buffer to display drm device, otherwise
get following xserver error log:

[   190.982] (WW) modeset(0): Page flip failed: No such file or directory
[   190.982] (EE) modeset(0): present flip failed

With this fix, full screen x11 client can display its window
buffer directly without a copy. Tested on Allwinner H3, 1080p
full screen glxgears go from 163FPS to 173FPS.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9038>

3 years agowgl: Match opengl32.dll export ordinals.
Jose Fonseca [Tue, 14 Apr 2020 15:36:33 +0000 (16:36 +0100)]
wgl: Match opengl32.dll export ordinals.

Some apps import GL/WGL symbols by ordinal.  See
https://github.com/apitrace/apitrace/issues/652

This is not an issue when Mesa is used as an OpenGL ICD, but it might
create troubles when used as a drop-in opengl32.dll replacement.

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

3 years agoaco/value_numbering: use can_eliminate() function to avoid unnecessary hashmap lookups
Daniel Schürmann [Tue, 22 Dec 2020 10:59:26 +0000 (11:59 +0100)]
aco/value_numbering: use can_eliminate() function to avoid unnecessary hashmap lookups

No fossil-db changes.

Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9195>

3 years agoaco: value number VOPC instructions with different exec masks
Daniel Schürmann [Mon, 21 Dec 2020 11:49:07 +0000 (12:49 +0100)]
aco: value number VOPC instructions with different exec masks

This becomes possible as long as we do

   val = s_and_b32/64 exec, val

before any subgroup operations.

This precautional instruction can be removed by the
optimizer if 'val' was computed by a VOPC instruction
using the same exec mask.

Totals from 59 (0.04% of 146267) affected shaders (Navi10):
VGPRs: 2808 -> 2816 (+0.28%)
CodeSize: 340888 -> 340852 (-0.01%); split: -0.20%, +0.19%
Instrs: 61733 -> 61625 (-0.17%); split: -0.18%, +0.01%
Cycles: 470636 -> 469112 (-0.32%); split: -0.33%, +0.01%
VMEM: 8091 -> 7993 (-1.21%)
SMEM: 2736 -> 2719 (-0.62%); split: +0.29%, -0.91%
VClause: 1745 -> 1741 (-0.23%)
SClause: 2394 -> 2392 (-0.08%); split: -0.25%, +0.17%
Copies: 3249 -> 3253 (+0.12%); split: -0.62%, +0.74%
Branches: 1210 -> 1206 (-0.33%)
PreSGPRs: 3126 -> 3176 (+1.60%); split: -0.16%, +1.76%

Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9195>

3 years agoclover: implement CL_IMAGE_NUM_MIP_LEVELS and CL_IMAGE_NUM_SAMPLES
Aaron Watry [Sun, 25 Oct 2020 19:20:00 +0000 (20:20 +0100)]
clover: implement CL_IMAGE_NUM_MIP_LEVELS and CL_IMAGE_NUM_SAMPLES

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212>

3 years agoclover: Implement CL_MEM_OBJECT_IMAGE1D
Edward O'Callaghan [Fri, 18 Nov 2016 05:38:13 +0000 (16:38 +1100)]
clover: Implement CL_MEM_OBJECT_IMAGE1D

v2: Consider surface height as valid when unused by using 1.
    Fixup width boundary checking.
v3 (Karol): Pull in changes from later commits
            Fix validation

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212>

3 years agoclover: rework quering image max sizes
Karol Herbst [Mon, 26 Oct 2020 12:57:22 +0000 (13:57 +0100)]
clover: rework quering image max sizes

The 3D one was always wrongly used, also the consumers always wanted the
size, not the levels. This should make it easier to use the interface and
also prevent future bugs like the 3D one.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212>

3 years agoclover: implement CL_IMAGE_ELEMENT_SIZE
Aaron Watry [Sun, 11 Oct 2020 19:33:19 +0000 (21:33 +0200)]
clover: implement CL_IMAGE_ELEMENT_SIZE

v2 (Karol Herbst): extracted from other commit

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212>

3 years agoclover: simplify image arguments
Karol Herbst [Wed, 21 Oct 2020 00:55:11 +0000 (02:55 +0200)]
clover: simplify image arguments

We don't care how many dimensions the image arg has, so drop it otherwise
we would have to add a lot of variants for arrays, msaa and depth
combinations. Yes, image2d_array_msaa_depth_t is a thing.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212>

3 years agoclover: return CL_INVALID_VALUE when origin or region are NULL
Serge Martin [Sun, 11 Oct 2020 18:27:44 +0000 (20:27 +0200)]
clover: return CL_INVALID_VALUE when origin or region are NULL

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9212>

3 years agoradv: do not scale the depth bias for D16_UNORM depth surfaces
Samuel Pitoiset [Wed, 24 Feb 2021 12:05:26 +0000 (13:05 +0100)]
radv: do not scale the depth bias for D16_UNORM depth surfaces

Scaling the depth bias doesn't seem correct with Vulkan. This is
probably the root cause of the shadow artifacts differences between
RADV and AMDVLK/AMDGPU-PRO.

Fix dEQP-VK.rasterization.depth_bias.d16_unorm.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2217
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/9249>

3 years agozink: hook up nir_texop_query_levels
Mike Blumenkrantz [Tue, 20 Oct 2020 19:20:40 +0000 (15:20 -0400)]
zink: hook up nir_texop_query_levels

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9275>

3 years agozink: add spirv builder methods for OpImageQueryLevels
Mike Blumenkrantz [Tue, 20 Oct 2020 19:20:29 +0000 (15:20 -0400)]
zink: add spirv builder methods for OpImageQueryLevels

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9275>

3 years agozink: do batch-program tracking after possibly cycling batch in update_descriptors()
Mike Blumenkrantz [Fri, 27 Nov 2020 17:14:30 +0000 (12:14 -0500)]
zink: do batch-program tracking after possibly cycling batch in update_descriptors()

ensure we have the right batch here

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

3 years agozink: increment batch->descs_used during update_descriptors flushing
Mike Blumenkrantz [Fri, 27 Nov 2020 17:13:23 +0000 (12:13 -0500)]
zink: increment batch->descs_used during update_descriptors flushing

ensure that this actually flushes

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

3 years agozink: properly size descriptorset layout binding stack array
Mike Blumenkrantz [Fri, 27 Nov 2020 15:37:03 +0000 (10:37 -0500)]
zink: properly size descriptorset layout binding stack array

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

3 years agozink: unref programs last in batch reset
Mike Blumenkrantz [Sun, 4 Oct 2020 14:19:28 +0000 (10:19 -0400)]
zink: unref programs last in batch reset

we're going to want to make sure all other resources have been handled
at this point so that we can make some better decisions in this block
based on descriptor usage

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

3 years agozink: ralloc zink program structs
Mike Blumenkrantz [Fri, 2 Oct 2020 17:20:42 +0000 (13:20 -0400)]
zink: ralloc zink program structs

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

3 years agozink: use zink_program in zink_batch_reference_program()
Mike Blumenkrantz [Fri, 2 Oct 2020 17:18:21 +0000 (13:18 -0400)]
zink: use zink_program in zink_batch_reference_program()

this is a little nicer

no functional changes

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

3 years agozink: add zink_program struct as a base class for compute/gfx structs
Mike Blumenkrantz [Fri, 2 Oct 2020 17:12:47 +0000 (13:12 -0400)]
zink: add zink_program struct as a base class for compute/gfx structs

this is going to be useful for managing descriptors

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

3 years agozink: Remove leftover dead code.
Vinson Lee [Mon, 22 Feb 2021 01:47:47 +0000 (17:47 -0800)]
zink: Remove leftover dead code.

Fix defect reported by Coverity Scan.

Structurally dead code (UNREACHABLE)
unreachable: This code cannot be reached: return progress;

Fixes: d550c5780f6 ("zink: use nir_shader_instructions_pass for draw params pass")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9182>

3 years agogv100/ir: Initialize CodeEmitterGV100 members in constructor.
Vinson Lee [Mon, 22 Feb 2021 03:20:57 +0000 (19:20 -0800)]
gv100/ir: Initialize CodeEmitterGV100 members in constructor.

Fix defects reported by Coverity Scan.

uninit_member: Non-static class member prog is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member insn is not initialized in this constructor nor in any functions that it calls.

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/9183>

3 years agonir/lower_tex: Change coord type to int.
Vinson Lee [Mon, 22 Feb 2021 01:31:30 +0000 (17:31 -0800)]
nir/lower_tex: Change coord type to int.

nir_tex_instr_src_index returns an int.

Fix defect reported by Coverity Scan.

Macro compares unsigned to 0 (NO_EFFECT)
unsigned_compare: This greater-than-or-equal-to-zero comparison of an unsigned value is always true. coord >= 0U.

Fixes: b154a4154b4 ("nir/lower_tex: rewrite tex/txb -> txd/txl before saturating srcs")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9181>

3 years agollvmpipe: Fix typos.
Vinson Lee [Sun, 17 Jan 2021 06:04:44 +0000 (22:04 -0800)]
llvmpipe: Fix typos.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8542>

3 years agor600: Fix typos.
Vinson Lee [Sat, 2 Jan 2021 01:31:15 +0000 (17:31 -0800)]
r600: Fix typos.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8293>

3 years agogallium: remove DROP_PIPE_LOADER_MISC
Michel Zou [Wed, 24 Feb 2021 05:20:36 +0000 (06:20 +0100)]
gallium: remove DROP_PIPE_LOADER_MISC

not needed since these code paths are always enabled

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

3 years agolavapipe: set empty dll prefix
Michel Zou [Tue, 23 Feb 2021 08:28:25 +0000 (09:28 +0100)]
lavapipe: set empty dll prefix

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

3 years agolavapipe: add mingw32 def file
Michel Zou [Tue, 23 Feb 2021 08:22:50 +0000 (09:22 +0100)]
lavapipe: add mingw32 def file

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

3 years agovulkan: implement wsi_win32 backend
Michel Zou [Mon, 9 Nov 2020 21:51:01 +0000 (22:51 +0100)]
vulkan: implement wsi_win32 backend

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

3 years agolavapipe: use null probe path on win32
Dave Airlie [Tue, 23 Feb 2021 08:30:20 +0000 (18:30 +1000)]
lavapipe: use null probe path on win32

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

3 years agoutil/disk_cache: fix crash in fossilize_db
Timothy Arceri [Wed, 24 Feb 2021 12:27:15 +0000 (23:27 +1100)]
util/disk_cache: fix crash in fossilize_db

We don't need to close the file here check_files_opened_successfully()
already does that for us if needed.

This fixes a crash when invalid filename/paths are provided to the
MESA_DISK_CACHE_READ_ONLY_FOZ_DBS environment variable.

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

3 years agozink: rename zink_context::buffers -> vertex_buffers (and usage mask)
Mike Blumenkrantz [Thu, 1 Oct 2020 13:37:08 +0000 (09:37 -0400)]
zink: rename zink_context::buffers -> vertex_buffers (and usage mask)

this is more descriptive

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

3 years agozink: use dynamic vertex buffer strides
Mike Blumenkrantz [Mon, 28 Sep 2020 18:23:15 +0000 (14:23 -0400)]
zink: use dynamic vertex buffer strides

this removes another case of needing to rehash/create a new pipeline

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

3 years agozink: make dynamic state usage in pipeline creation more explicit/flexible
Mike Blumenkrantz [Mon, 28 Sep 2020 18:21:52 +0000 (14:21 -0400)]
zink: make dynamic state usage in pipeline creation more explicit/flexible

we'll be expanding this, so we want to have it very easy to update and read

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

3 years agozink: setup CmdBindVertexBuffers2EXT member in screen for dynamic state
Mike Blumenkrantz [Mon, 28 Sep 2020 18:20:07 +0000 (14:20 -0400)]
zink: setup CmdBindVertexBuffers2EXT member in screen for dynamic state

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

3 years agonouveau_vieux: use align_calloc for the context to fix m32 crashes
Marek Olšák [Tue, 23 Feb 2021 15:44:36 +0000 (10:44 -0500)]
nouveau_vieux: use align_calloc for the context to fix m32 crashes

Fixes: 3175b63a0dfa290 "mesa: don't allocate matrices with malloc"

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9220>

3 years agoradeon,r200: use align_calloc for the context to fix m32 crashes
Marek Olšák [Tue, 23 Feb 2021 15:44:36 +0000 (10:44 -0500)]
radeon,r200: use align_calloc for the context to fix m32 crashes

Fixes: 3175b63a0dfa290 "mesa: don't allocate matrices with malloc"

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9220>

3 years agoi915: use align_calloc for the context to fix m32 crashes
Marek Olšák [Tue, 23 Feb 2021 15:44:36 +0000 (10:44 -0500)]
i915: use align_calloc for the context to fix m32 crashes

Fixes: 3175b63a0dfa290 "mesa: don't allocate matrices with malloc"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4295

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9220>

3 years agozink: set VK_IMAGE_LAYOUT_PRESENT_SRC_KHR on fb resources at eof flush
Mike Blumenkrantz [Thu, 8 Oct 2020 19:19:02 +0000 (15:19 -0400)]
zink: set VK_IMAGE_LAYOUT_PRESENT_SRC_KHR on fb resources at eof flush

this should maybe fix garbled images on amd?

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

3 years agozink: handle VK_IMAGE_LAYOUT_PRESENT_SRC_KHR barriers
Mike Blumenkrantz [Thu, 8 Oct 2020 19:18:31 +0000 (15:18 -0400)]
zink: handle VK_IMAGE_LAYOUT_PRESENT_SRC_KHR barriers

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

3 years agozink: handle PIPE_FLUSH_DEFERRED
Mike Blumenkrantz [Wed, 30 Sep 2020 13:51:55 +0000 (09:51 -0400)]
zink: handle PIPE_FLUSH_DEFERRED

these flushes queue the fence to be submitted on the next finish call, so
we have to store the context to the fence to be able to handle threaded calls

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

3 years agozink: add util function for returning previous batch
Mike Blumenkrantz [Wed, 30 Sep 2020 16:54:10 +0000 (12:54 -0400)]
zink: add util function for returning previous batch

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

3 years agozink: add a define for compute batch count
Mike Blumenkrantz [Fri, 2 Oct 2020 17:19:21 +0000 (13:19 -0400)]
zink: add a define for compute batch count

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

3 years agozink: only flush batches in pipe_context::flush if they actually have work
Mike Blumenkrantz [Tue, 29 Sep 2020 19:12:21 +0000 (15:12 -0400)]
zink: only flush batches in pipe_context::flush if they actually have work

no need to submit command buffers to the queue which have no commands, so we
can just proceed to give back an inactive fence object that always returns success

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

3 years agozink: fix destroy batch
Antonio Caggiano [Fri, 14 Aug 2020 06:10:06 +0000 (08:10 +0200)]
zink: fix destroy batch

Extract batch destruction in its own function, then make sure to
release objects.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9243>

3 years agozink: create a single fence per batch on startup and then reuse
Mike Blumenkrantz [Wed, 24 Feb 2021 02:40:51 +0000 (21:40 -0500)]
zink: create a single fence per batch on startup and then reuse

previously we would be creating a new fence per batch for every submit,
but we can just reset and reuse them if we're careful with it

based on original patch by Antonio Caggiano

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

3 years agozink: reorder zink_bind_vertex_buffers()
Mike Blumenkrantz [Mon, 28 Sep 2020 18:13:12 +0000 (14:13 -0400)]
zink: reorder zink_bind_vertex_buffers()

we should be making this a no-op if we have no bindings (somehow)

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

3 years agozink: move samplerview referencing around in update_descriptors()
Mike Blumenkrantz [Mon, 14 Sep 2020 17:37:05 +0000 (13:37 -0400)]
zink: move samplerview referencing around in update_descriptors()

no functional changes

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

3 years agozink: avoid memset during update_descriptors() for resources refs
Mike Blumenkrantz [Mon, 28 Sep 2020 17:35:25 +0000 (13:35 -0400)]
zink: avoid memset during update_descriptors() for resources refs

we can simplify this a bit to further reduce cpu usage here

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

3 years agolavapipe: fix depth texturing swizzle
Dave Airlie [Wed, 24 Feb 2021 19:10:22 +0000 (05:10 +1000)]
lavapipe: fix depth texturing swizzle

This is pretty much derived from what works and passes
both GL via zink and VK-GL-CTS test suites.

The zink multisample regressions tests rendered black, so
"passed" before, now they render more junk.

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

3 years agofreedreno/a5xx+: Drop the unused no_decode_srgb flag.
Eric Anholt [Wed, 24 Feb 2021 23:04:47 +0000 (15:04 -0800)]
freedreno/a5xx+: Drop the unused no_decode_srgb flag.

This was a flag used for a4xx GMEM draws.

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

3 years agofreedreno/a5xx+: Stop recompiling on texture samples changes.
Eric Anholt [Wed, 24 Feb 2021 22:51:42 +0000 (14:51 -0800)]
freedreno/a5xx+: Stop recompiling on texture samples changes.

The shader only looks at this bit of the key on a3xx, and a4xx already
didn't set it.  This will help give us precompile hits for MSAA texture
sampling.

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

3 years agofreedreno: Use the mesa/st frontend lowering of GL_CLAMP.
Eric Anholt [Sat, 20 Feb 2021 00:23:06 +0000 (16:23 -0800)]
freedreno: Use the mesa/st frontend lowering of GL_CLAMP.

350 lines of code for this stupid feature, and we weren't even doing it
right for CS/GS/tess.

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

3 years agozink: ci updates
Mike Blumenkrantz [Wed, 24 Feb 2021 23:13:43 +0000 (18:13 -0500)]
zink: ci updates

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

3 years agozink: handle point sprite
Mike Blumenkrantz [Wed, 17 Feb 2021 14:52:04 +0000 (09:52 -0500)]
zink: handle point sprite

this needs custom yinvert handling and also prim mode detection, which
gallium can't do on its own

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

3 years agozink: store prim mode to context during draw
Mike Blumenkrantz [Wed, 17 Feb 2021 14:51:43 +0000 (09:51 -0500)]
zink: store prim mode to context during draw

we need to be able to access this for shader rewrites

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

3 years agonir/texcoord_replace: add a yinvert param
Mike Blumenkrantz [Wed, 17 Feb 2021 14:48:34 +0000 (09:48 -0500)]
nir/texcoord_replace: add a yinvert param

vulkan needs to invert the y coord in order to handle PIPE_SPRITE_COORD_LOWER_LEFT

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

3 years agozink: no-op descriptor updating for draws without descriptors
Mike Blumenkrantz [Thu, 17 Sep 2020 11:32:13 +0000 (07:32 -0400)]
zink: no-op descriptor updating for draws without descriptors

this is a valid case that we can trivially shortcut to cut down on calls

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

3 years agofreedreno: Drop custom driver lowering of GL's color clamping.
Eric Anholt [Wed, 10 Feb 2021 18:28:23 +0000 (10:28 -0800)]
freedreno: Drop custom driver lowering of GL's color clamping.

The mesa/st frontend can do it for us now that we don't need to worry
about breaking precompiles.

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

3 years agofreedreno: Drop custom driver lowering of two-sided color.
Eric Anholt [Wed, 10 Feb 2021 18:22:22 +0000 (10:22 -0800)]
freedreno: Drop custom driver lowering of two-sided color.

The GL frontend can do it for us now, so just use their code instead of
our own shader variants.  In the past we had to do hide the GL shader
variants in the driver to get precompiles from st, but no longer as of
!8601.

I tested with drawoverhead -test 6 (shader program change, n=30) and -test
1 (no statechanges, n=43) and saw no change in driver overhead.

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

3 years agofreedreno: Remove uniform variables after finalizing NIR.
Eric Anholt [Thu, 18 Feb 2021 22:19:38 +0000 (14:19 -0800)]
freedreno: Remove uniform variables after finalizing NIR.

mesa/st optimizes the uniform storage if you have the finalize hook in
place, causing the uniforms declared to potentially not have storage in
the ParameterValues list any more.  If you leave your uniforms around in
the NIR, then a later finalization after variant creation will re-add the
uniforms to parameters, defeating the optimization and likely reallocating
the uniform storage (causing use-after-free).  So, we have to do this
before we can start using variants in mesa/st.

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

3 years agomesa: Always make sure uniform storage doesn't get reallocated.
Eric Anholt [Thu, 18 Feb 2021 21:53:31 +0000 (13:53 -0800)]
mesa: Always make sure uniform storage doesn't get reallocated.

Every caller of associate_uniform_storage was doing this to safety-check
that the uniform storage didn't get reallocated, except for
st_deserialise_ir_program().  This ended up leaving an opening for
use-after-free without hitting the assert in the hot-cache case (and I
found it on freedreno).  Having added it, it also reveals use-after-frees
in the drawpixels shader variant cases on llvmpipe and zink.

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

3 years agoandroid: mesa: Move the FXT1 compressor/decompressor to util/
Mauro Rossi [Wed, 24 Feb 2021 01:57:22 +0000 (02:57 +0100)]
android: mesa: Move the FXT1 compressor/decompressor to util/

After commit a46b73e in order to build mesa for Android
we need to generate $(intermediates)/util/format/u_format_pack.h
instead of $(intermediates)/format/u_format_pack.h

Fixes the following building error in Android build:

external/mesa/src/util/format/u_format_fxt1.c:28:10: fatal error: 'util/format/u_format_pack.h' file not found
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Fixes: a46b73e ("mesa: Move the FXT1 compressor/decompressor to util/")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9240>

3 years agoscons: Add u_format_pack.h include path.
Jose Fonseca [Wed, 24 Feb 2021 19:40:25 +0000 (19:40 +0000)]
scons: Add u_format_pack.h include path.

Fixes MSVC SCons build.

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

3 years agozink: use 0 as default for spec constants
Mike Blumenkrantz [Wed, 24 Feb 2021 18:38:20 +0000 (13:38 -0500)]
zink: use 0 as default for spec constants

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

3 years agoci/iris: Move the traces yml file to the driver-specific dir.
Eric Anholt [Tue, 23 Feb 2021 20:45:49 +0000 (12:45 -0800)]
ci/iris: Move the traces yml file to the driver-specific dir.

Since the job is manual, I missed it in the move and it got dropped from
the artifacts.

Fixes: 60d413b89455 ("ci: Move the piglit expectations lists to the per-driver CI dirs.")
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9226>

3 years agoci/piglit: Stop including the test counts at the end of expectations.
Eric Anholt [Tue, 23 Feb 2021 01:21:13 +0000 (17:21 -0800)]
ci/piglit: Stop including the test counts at the end of expectations.

It's just a ton of fuss for driver developers fixing piglit tests.  This
makes the trace expectation files pretty silly (empty expectation, but
you'll get a diff to a non-empty result when something fails)

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Acked-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9226>

3 years agolavapipe: fix descriptor set layout freeing.
Dave Airlie [Wed, 24 Feb 2021 07:02:51 +0000 (17:02 +1000)]
lavapipe: fix descriptor set layout freeing.

Have to store the used allocator otherwise ends up being free wrong.

Fix for
dEQP-VK.api.object_management.alloc_callback_fail.descriptor_set_layout*

Fixes: f94a5f30e0ebd ("lavapipe: add reference counting to descriptor set layout")

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

3 years agoiris: Pin surface state buffers after possibly updating the clear color
Kenneth Graunke [Mon, 1 Feb 2021 12:42:18 +0000 (04:42 -0800)]
iris: Pin surface state buffers after possibly updating the clear color

On Gen8, updating the clear color will end up allocating new
SURFACE_STATE entries.  These might end up living in a different BO
than the original copies, which means that we have to pin _after_
updating the clear color, not before.

Found by inspection.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9257>

3 years agov3d: Replace driver lowering of GL_CLAMP with mesa/st's.
Eric Anholt [Fri, 19 Feb 2021 19:38:33 +0000 (11:38 -0800)]
v3d: Replace driver lowering of GL_CLAMP with mesa/st's.

Mesa core can do this logic for us now.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9228>

3 years agov3d: Drop foreach_bit() macro
Rob Clark [Mon, 22 Feb 2021 15:57:49 +0000 (07:57 -0800)]
v3d: Drop foreach_bit() macro

Now that we have a global one.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>

3 years agoetnaviv: Drop foreach_bit() macro
Rob Clark [Mon, 22 Feb 2021 15:57:21 +0000 (07:57 -0800)]
etnaviv: Drop foreach_bit() macro

Now that we have a global one.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>

3 years agofreedreno: Drop foreach_bit() macro
Rob Clark [Mon, 22 Feb 2021 15:55:48 +0000 (07:55 -0800)]
freedreno: Drop foreach_bit() macro

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>

3 years agofreedreno/ir3: Drop foreach_bit() macro
Rob Clark [Mon, 22 Feb 2021 15:54:32 +0000 (07:54 -0800)]
freedreno/ir3: Drop foreach_bit() macro

Now that there is a global one in util/bitscan.h

Note this version had an extra assert which is not really suitable to a
generic foreach_bit().. just move the assert to the two usages of the
iterator macro.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>

3 years agoanv: for_each_bit -> foreach_bit
Mike Blumenkrantz [Mon, 22 Feb 2021 15:14:03 +0000 (10:14 -0500)]
anv: for_each_bit -> foreach_bit

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>

3 years agofreedreno/vulkan: for_each_bit -> foreach_bit
Mike Blumenkrantz [Mon, 22 Feb 2021 15:13:41 +0000 (10:13 -0500)]
freedreno/vulkan: for_each_bit -> foreach_bit

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>

3 years agoradv: for_each_bit -> foreach_bit
Mike Blumenkrantz [Mon, 22 Feb 2021 15:13:29 +0000 (10:13 -0500)]
radv: for_each_bit -> foreach_bit

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>

3 years agov3dv: remove for_each_bit() macro
Mike Blumenkrantz [Mon, 22 Feb 2021 15:13:16 +0000 (10:13 -0500)]
v3dv: remove for_each_bit() macro

this was unused

Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9191>