platform/upstream/mesa.git
3 years agozink: optimize resource usage tracking
Mike Blumenkrantz [Tue, 6 Oct 2020 20:59:02 +0000 (16:59 -0400)]
zink: optimize resource usage tracking

we already have the batch usage info here for the resource, so if we know
the resource is already used on the batch then we don't need to also perform
a hash lookup to double check that it's really there

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

3 years agolavapipe: enable EXT_scalar_block_layout
Dave Airlie [Sun, 14 Mar 2021 22:01:50 +0000 (08:01 +1000)]
lavapipe: enable EXT_scalar_block_layout

The frontend should handle this.

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

3 years agolavapipe: enable KHR_uniform_buffer_standard_layout
Dave Airlie [Sun, 14 Mar 2021 21:53:24 +0000 (07:53 +1000)]
lavapipe: enable KHR_uniform_buffer_standard_layout

I think the frontend should handle all of this fine.

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

3 years agoiris: Fix typos.
Vinson Lee [Thu, 25 Feb 2021 06:11:12 +0000 (22:11 -0800)]
iris: Fix typos.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9382>

3 years agonv50/ir: Add constructor for NV50LegalizePostRA.
Vinson Lee [Mon, 1 Mar 2021 02:44:27 +0000 (18:44 -0800)]
nv50/ir: Add constructor for NV50LegalizePostRA.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
member_not_init_in_gen_ctor: The compiler-generated constructor
for this class does not initialize r63.

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

3 years agozink: ci updates
Mike Blumenkrantz [Sun, 14 Mar 2021 23:22:39 +0000 (19:22 -0400)]
zink: ci updates

disabling qbo piglit test for now due to lots of brokenness in zink which
makes them flaky, will be reenabled soon

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

3 years agozink: remove extraneous flush in transfer_map_region_flush
Mike Blumenkrantz [Thu, 8 Oct 2020 19:19:50 +0000 (15:19 -0400)]
zink: remove extraneous flush in transfer_map_region_flush

this was only needed to cover up some other bugs:
* missing barriers for buffer sampler/image descriptors
* weirdness with first frame handling

there's better ways of handling both cases, and now they're handled better

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

3 years agozink: move buffer<->image copying to pipe_context::resource_copy_region hook
Mike Blumenkrantz [Wed, 7 Oct 2020 19:55:16 +0000 (15:55 -0400)]
zink: move buffer<->image copying to pipe_context::resource_copy_region hook

that's a todo item off the list

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

3 years agodocs: update lavapipe features.txt
Dave Airlie [Sun, 14 Mar 2021 20:39:53 +0000 (06:39 +1000)]
docs: update lavapipe features.txt

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

3 years agolavapipe: add single ssbo variable pointer support.
Dave Airlie [Thu, 24 Dec 2020 01:33:18 +0000 (11:33 +1000)]
lavapipe: add single ssbo variable pointer support.

Multiple buffer seems to break with tess eval only,
something to investigate later.

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

3 years agolavapipe: move to common create render pass code
Dave Airlie [Fri, 12 Mar 2021 07:04:13 +0000 (17:04 +1000)]
lavapipe: move to common create render pass code

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

3 years agolavapipe: move to the common casting interfaces
Dave Airlie [Fri, 12 Mar 2021 07:03:07 +0000 (17:03 +1000)]
lavapipe: move to the common casting interfaces

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

3 years agolavapipe: move queue to base object
Dave Airlie [Fri, 12 Mar 2021 07:02:48 +0000 (17:02 +1000)]
lavapipe: move queue to base object

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

3 years agolavapipe: add support for VK_KHR_create_renderpass2
Dave Airlie [Thu, 24 Dec 2020 04:09:28 +0000 (14:09 +1000)]
lavapipe: add support for VK_KHR_create_renderpass2

Also move to the common code for create renderpass

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

3 years agolima/ppir: don't use list_length() in loop in regalloc and liveness analysis
Vasily Khoruzhick [Fri, 12 Mar 2021 03:36:00 +0000 (19:36 -0800)]
lima/ppir: don't use list_length() in loop in regalloc and liveness analysis

list_length() complexity is O(n), so it's better to store number of regs
separately and use it instead of list_length().

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

3 years agolima: add precompile debug flag
Vasily Khoruzhick [Sun, 14 Mar 2021 06:17:18 +0000 (22:17 -0800)]
lima: add precompile debug flag

This flag will be used by run from mesa-shader-db to trigger shader
compilation with default settings.

Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9583>

3 years agor600/sfn remove some leftover debug output
Gert Wollny [Sun, 14 Mar 2021 13:15:07 +0000 (14:15 +0100)]
r600/sfn remove some leftover debug output

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

3 years agor600/sfn: lower idiv, imod, etc in nir
Gert Wollny [Sat, 6 Mar 2021 17:14:04 +0000 (18:14 +0100)]
r600/sfn: lower idiv, imod, etc in nir

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

3 years agor600/sfn: lower bitfield_extract and bitfield_insert in NIR
Gert Wollny [Sat, 6 Mar 2021 15:21:09 +0000 (16:21 +0100)]
r600/sfn: lower bitfield_extract and bitfield_insert in NIR

v2: lower bitfield insert to bitfield_select (Rhys Perry

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

3 years agor600/sfn: Fix including/not including c++ parts of header
Gert Wollny [Sat, 6 Mar 2021 15:06:47 +0000 (16:06 +0100)]
r600/sfn: Fix including/not including c++ parts of header

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

3 years agor600/sfn: fix buffer offset for ssbo writes
Gert Wollny [Fri, 5 Mar 2021 18:46:24 +0000 (19:46 +0100)]
r600/sfn: fix buffer offset for ssbo writes

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

3 years agor600/sfn: remove unused code
Gert Wollny [Fri, 5 Mar 2021 18:45:50 +0000 (19:45 +0100)]
r600/sfn: remove unused code

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

3 years agor600/sfn: sort alu opcodes in switch statememt
Gert Wollny [Sat, 6 Mar 2021 15:05:55 +0000 (16:05 +0100)]
r600/sfn: sort alu opcodes in switch statememt

This makes it easier to figure out which ops are already handled.

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

3 years ago.mailmap: add an alias for Eleni Maria Stea
Andres Gomez [Fri, 5 Mar 2021 16:22:44 +0000 (18:22 +0200)]
.mailmap: add an alias for Eleni Maria Stea

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eleni Maria Stea <elene.mst@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9435>

3 years agoradeonsi: Limit the size of the in-memory shader cache
Axel Davy [Sat, 13 Mar 2021 10:48:45 +0000 (11:48 +0100)]
radeonsi: Limit the size of the in-memory shader cache

The in-memory shader cache can get significantly
huge in some rare cases.
Limit its size to 64MB on 32 bits, and 1GB else.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9578>

3 years agost/nine: detect worker threads syncs for systemmem
Axel Davy [Sat, 13 Mar 2021 10:23:26 +0000 (11:23 +0100)]
st/nine: detect worker threads syncs for systemmem

If we detect too many syncs, use the stream_uploader,
which avoid syncs.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Use stream_uploader for bad cases of systemmem
Axel Davy [Sat, 13 Mar 2021 10:06:43 +0000 (11:06 +0100)]
st/nine: Use stream_uploader for bad cases of systemmem

Using stream_uploader in case we cannot use unsynchronized
improves performance.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Always use DYNAMIC with SYSTEMMEM
Axel Davy [Fri, 12 Mar 2021 10:48:48 +0000 (11:48 +0100)]
st/nine: Always use DYNAMIC with SYSTEMMEM

The disadvantages of the DYNAMIC path over the
non-dynamic path are minor.
The advantages are many.

As we don't know if bad behaving apps use
non-dynamic SYSTEMMEM in a dynamic fashion,
let's be safe and always be dynamic.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Force DYNAMIC SYSTEMMEM for sw vertex processing
Axel Davy [Fri, 12 Mar 2021 10:29:24 +0000 (11:29 +0100)]
st/nine: Force DYNAMIC SYSTEMMEM for sw vertex processing

SW vertex processing buffers are supposed to be sorted in RAM
and to be immediately idle after use (thus you can write at the
same location again immediately).

DYNAMIC SYSTEMMEM is by far the best fit for now for these kind
of buffers, though it can be improved further. Indeed the use
pattern will cause a lot of syncs with csmt actived.
Thus disable csmt when full sw vertex processing is requested.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Optimize dynamic systemmem buffers
Axel Davy [Sat, 6 Mar 2021 17:27:42 +0000 (18:27 +0100)]
st/nine: Optimize dynamic systemmem buffers

Some apps use DYNAMIC SYSTEMMEM buffers and fill them in a
dynamic fashion with discard and nooverwrite locking flags.

To prevent uploading the whole buffer every draw call,
track the region needed for the draw call, and
upload only that region (or a bit more in order
to ease valid region tracking).

Try to aggressively upload with discard/unsynchronized.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Track pending MANAGED buffer uploads
Axel Davy [Fri, 5 Mar 2021 17:23:22 +0000 (18:23 +0100)]
st/nine: Track pending MANAGED buffer uploads

The tracking enables to avoid flushing the csmt thread
when locking repeatedly the same buffer, as long
as the locks are non-overlapping.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agogallium/util: Add new u_box helpers
Axel Davy [Sat, 6 Mar 2021 16:34:22 +0000 (17:34 +0100)]
gallium/util: Add new u_box helpers

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Use correct bind flag at buffer creation
Axel Davy [Sat, 6 Mar 2021 16:16:55 +0000 (17:16 +0100)]
st/nine: Use correct bind flag at buffer creation

The buffer bind creation flag was incorrect for index buffers

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Optimize DrawPrimitiveUp
Axel Davy [Sat, 6 Mar 2021 13:53:18 +0000 (14:53 +0100)]
st/nine: Optimize DrawPrimitiveUp

Try to keep the same vertex buffer state when
having several consecutive DrawPrimitiveUp.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Nicer DrawPrimUp opt patch

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

3 years agost/nine: Refactor DrawPrimitiveUp
Axel Davy [Sat, 6 Mar 2021 16:14:46 +0000 (17:14 +0100)]
st/nine: Refactor DrawPrimitiveUp

. Use the same fonction as DrawPrimitive
. Drop the user vbuf path
. Avoid setting NULL vertexbuffer to the context

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Implement SYSTEMMEM buffers same as MANAGED
Axel Davy [Tue, 2 Mar 2021 21:48:56 +0000 (22:48 +0100)]
st/nine: Implement SYSTEMMEM buffers same as MANAGED

Use the MANAGED path for SYSTEMMEM buffers.

Tests point out the locking behaviour of SYSTEMEMM
buffers is very close to MANAGED.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agost/nine: Optimize EndScene
Axel Davy [Fri, 5 Mar 2021 17:23:08 +0000 (18:23 +0100)]
st/nine: Optimize EndScene

So far we did nothing on EndScene, but the API
doc says it flushes the GPU command queue.
The doc implies one can optimize CPU usage
by calling EndScene long before Present() is called.

Implementing the flush behaviour gives me +15-20%
on the CPU limited Halo. On the other hand, do limit
the flush to only once per frame.
3DMark03/3Mark05 get a 2% perf hit with the patch,
but 5% if I allow more flushes.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

3 years agodocs: Mark VK_KHR_maintenance1 as done on turnip
Matt Turner [Sat, 13 Mar 2021 17:01:04 +0000 (12:01 -0500)]
docs: Mark VK_KHR_maintenance1 as done on turnip

I think I messed this up when splitting the turnip and lavapipe patches
apart.

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

3 years agolavapipe: set more resource bind flags using image/buffer usage bits
Mike Blumenkrantz [Fri, 12 Mar 2021 21:03:35 +0000 (16:03 -0500)]
lavapipe: set more resource bind flags using image/buffer usage bits

we have this info available, so we can be more precise about it

stop the printf spam!

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

3 years agomesa: only report INCOMPLETE_FORMATS for GLES1 / desktop
Ilia Mirkin [Fri, 12 Mar 2021 19:25:09 +0000 (14:25 -0500)]
mesa: only report INCOMPLETE_FORMATS for GLES1 / desktop

The enum is defined in EXT_framebuffer_object (available on desktop),
and was copied to OES_framebuffer_object (available in GLES1). The ES2
spec has no mention of such an enum. If the underlying implementation
does not support this, it will set a generic incomplete error (as is
done in st_cb_fbo.c if mixed_formats == false).

This should fix the following dEQP tests on ES2 drivers:

    dEQP-GLES2.functional.fbo.completeness.attachment_combinations.rbo_tex_none_none
    dEQP-GLES2.functional.fbo.completeness.attachment_combinations.tex_rbo_none_none

Fixes: fd017458bc84 (mesa: fix fbo attachment size check for RBs, make it trigger in ES2)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4444
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9572>

3 years agovirgl: Update GLES expectations.
Eric Anholt [Wed, 10 Mar 2021 22:58:41 +0000 (14:58 -0800)]
virgl: Update GLES expectations.

These are only used in manual runs, and I noticed in a recent run that
something on master had fixed them.

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

3 years agomesa/st: Fix precompile misses on compat GL VSes writing to color outputs.
Eric Anholt [Wed, 10 Mar 2021 22:46:16 +0000 (14:46 -0800)]
mesa/st: Fix precompile misses on compat GL VSes writing to color outputs.

In compat GL, the gl_FrontColor/BackColor gets clamped unless you
explicitly turn it off with ARB_color_buffer_float, and most apps doing
floating point color rendering are going to be using non-compat varyings
anyway instead of hoping that ARB_color_buffer_float exists.  Thus, guess
that the app will get clamping on the color outputs to reduce draw-time
recompiles.

Saves 60 VS recompiles on half-life-2.trace on freedreno (and similarly for
many other compat GL apps).

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

3 years agomesa/st: Add perf debug for draw-time variant compiles.
Eric Anholt [Wed, 10 Mar 2021 22:27:31 +0000 (14:27 -0800)]
mesa/st: Add perf debug for draw-time variant compiles.

This ARB_debug_output is particularly useful in that default apitrace will
log it, so we can find when we're doing draw-time recompiles we shouldn't be.

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

3 years agomesa/st: Unify st_get_vp_variant() and st_get_common_variant().
Eric Anholt [Wed, 10 Mar 2021 21:53:55 +0000 (13:53 -0800)]
mesa/st: Unify st_get_vp_variant() and st_get_common_variant().

Fixes the following issues I can see:

- Non-VS NIR shaders not gathering info after ucp lowering
- Non-VS NIR shaders not doing GL_CLAMP lowering
- Non-VS TGSI shaders not setting up stream output state.
- Non-VS TGSI shaders leaking lower_depth_clamp lowering across variant
  compiles.

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

3 years agolavapipe: fix push descriptor set indexing
Mike Blumenkrantz [Fri, 12 Mar 2021 13:53:21 +0000 (08:53 -0500)]
lavapipe: fix push descriptor set indexing

the push set index isn't always 0, so the offsets need to be updated
in order to avoid clobbering other sets

Fixes: 6be19765cf2 ("lavapipe: add support for VK_KHR_push_descriptor")

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

3 years agoanv: move L3 initialization to device init on Gen11+
Lionel Landwerlin [Fri, 12 Mar 2021 08:13:39 +0000 (10:13 +0200)]
anv: move L3 initialization to device init on Gen11+

On Gen11+ we tend to only use a single configuration, so just get rid
of the stalls in the command buffers by moving the config to device
initialization.

v2: drop NULL config check

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

3 years agoanv: move L3 config emission to genX_state.c
Lionel Landwerlin [Tue, 9 Mar 2021 14:58:59 +0000 (16:58 +0200)]
anv: move L3 config emission to genX_state.c

We're about to reuse this at device initialization.

v2: Handle NULL configs on Gen12+

v3: Handle NULL config in emission helper (Jason)

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

3 years agoturnip: set zmode to A6XX_EARLY_Z if FS forces early fragment test
Danylo Piliaiev [Fri, 12 Mar 2021 18:30:31 +0000 (20:30 +0200)]
turnip: set zmode to A6XX_EARLY_Z if FS forces early fragment test

Specifying "early_fragment_tests" in fragment shader takes precedence
over our internal conditions.

Fixes test:
 dEQP-VK.fragment_operations.early_fragment.early_fragment_tests_stencil

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

3 years agointel/dev: switch over to mesa log infrastructure
Lionel Landwerlin [Tue, 16 Feb 2021 07:53:14 +0000 (09:53 +0200)]
intel/dev: switch over to mesa log infrastructure

v2: Deal with line wrapping (Jordan)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052>

3 years agoanv: stop using get_param for things queried by gen_device_info
Lionel Landwerlin [Wed, 3 Feb 2021 09:46:18 +0000 (11:46 +0200)]
anv: stop using get_param for things queried by gen_device_info

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052>

3 years agoi965: stop using get_param for things queried by gen_device_info
Lionel Landwerlin [Wed, 3 Feb 2021 09:45:20 +0000 (11:45 +0200)]
i965: stop using get_param for things queried by gen_device_info

All this code exists in gen_device_info. It will print out the same
warning.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052>

3 years agoiris: use gen_device_info helper to get subslice total
Lionel Landwerlin [Wed, 3 Feb 2021 09:43:11 +0000 (11:43 +0200)]
iris: use gen_device_info helper to get subslice total

gen_device_info will try to use the most recent uAPI to get this
number and will fallback to this get_param. So just use what was
queries by gen_device_info_from_fd().

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052>

3 years agointel/dev: add warning on missing kernel uAPI for Gen8+
Lionel Landwerlin [Wed, 3 Feb 2021 09:41:58 +0000 (11:41 +0200)]
intel/dev: add warning on missing kernel uAPI for Gen8+

We carry those warnings in i965/anv. Let's have them here. Next commit
we remove some code from the drivers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052>

3 years agointel/dev: add helpers to compute subslice/eu total
Lionel Landwerlin [Wed, 3 Feb 2021 09:41:06 +0000 (11:41 +0200)]
intel/dev: add helpers to compute subslice/eu total

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052>

3 years agozink: remove debug printf
Mike Blumenkrantz [Fri, 12 Mar 2021 17:19:53 +0000 (12:19 -0500)]
zink: remove debug printf

accidentally left this in while bisecting

Fixes: 929a748401f ("zink: avoid hashing states without descriptors")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9564>

3 years agovulkan: fix CreateRenderPass prototype
Michel Zou [Fri, 12 Mar 2021 06:24:23 +0000 (07:24 +0100)]
vulkan: fix CreateRenderPass prototype

Fixes compilation on win32

Fixes: 2523c477 " turnip: Move the CreateRenderPass wrapper..."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9530>

3 years agozink: ci updates
Mike Blumenkrantz [Fri, 12 Mar 2021 17:12:33 +0000 (12:12 -0500)]
zink: ci updates

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

3 years agozink: implement an extremely dumb resource memory cache
Mike Blumenkrantz [Tue, 13 Oct 2020 13:42:07 +0000 (09:42 -0400)]
zink: implement an extremely dumb resource memory cache

this stores a number (currently 5) of backing allocations for resources
for later reuse when creating matching resources

because this is on the screen object it requires locking, but this is still
far faster than allocating new memory each time

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

3 years agost/nine: Fix compilation issue in nine_debug
Axel Davy [Fri, 12 Mar 2021 16:57:09 +0000 (17:57 +0100)]
st/nine: Fix compilation issue in nine_debug

Some compilers complain of the implicit conversion.
Make it explicit.

Reported by:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6121
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9250

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9563>

3 years agozink: optimize pipeline hashing
Mike Blumenkrantz [Tue, 6 Oct 2020 20:07:14 +0000 (16:07 -0400)]
zink: optimize pipeline hashing

we can reorder the pipeline state and avoid hashing the big arrays based
on context states that we already have available to us

also we can do incremental hashes for the shader modules to further reduce
hashing

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

3 years agozink: move vertex_buffers_enabled_mask to non-hashed part of pipeline state
Mike Blumenkrantz [Tue, 6 Oct 2020 20:06:43 +0000 (16:06 -0400)]
zink: move vertex_buffers_enabled_mask to non-hashed part of pipeline state

we can use this to optimize pipeline hashing

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

3 years agoradv: fix initialization of disable_compression when clearing color image
Samuel Pitoiset [Tue, 9 Mar 2021 12:22:58 +0000 (13:22 +0100)]
radv: fix initialization of disable_compression when clearing color image

Just make sure it's initialized properly.

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

3 years agozink: ci updates
Mike Blumenkrantz [Tue, 2 Mar 2021 23:44:31 +0000 (18:44 -0500)]
zink: ci updates

some flakes here that will be resolved in the very near future

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: fix arrays of texel buffer descriptors
Mike Blumenkrantz [Fri, 23 Oct 2020 21:02:49 +0000 (17:02 -0400)]
zink: fix arrays of texel buffer descriptors

these need to pass a constructed array of buffers, not a single buffer per
descriptor

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: avoid hashing states without descriptors
Mike Blumenkrantz [Fri, 12 Mar 2021 13:37:39 +0000 (08:37 -0500)]
zink: avoid hashing states without descriptors

this is unnecessary hashing which decreases the accuracy of the states

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: remove image layouts from descriptor states
Mike Blumenkrantz [Mon, 12 Oct 2020 17:22:02 +0000 (13:22 -0400)]
zink: remove image layouts from descriptor states

these are always the same value, so there's no need to track them

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: always use VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL for sampler bindings
Mike Blumenkrantz [Fri, 9 Oct 2020 13:37:47 +0000 (09:37 -0400)]
zink: always use VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL for sampler bindings

if a resource is used multiple times with different samplers then this can result
in conflicting layouts, so it's better to just use the general case here

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: don't create descriptor barrier hash tables for cached descriptor set
Mike Blumenkrantz [Mon, 12 Oct 2020 15:20:47 +0000 (11:20 -0400)]
zink: don't create descriptor barrier hash tables for cached descriptor set

this won't be used, so there's no point in allocating it

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: remove struct zink_descriptor_resource from descriptor updating
Mike Blumenkrantz [Mon, 12 Oct 2020 16:13:02 +0000 (12:13 -0400)]
zink: remove struct zink_descriptor_resource from descriptor updating

this can be inferred from a resource's barrier usage, and then by merging
the batch-tracking for resources into the barrier loop, this deduplicates
calls for resources which are bound for multiple stages as well as removing
another iteration during descriptor updating

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: directly use resource count from pool instead of accumulating every time
Mike Blumenkrantz [Wed, 7 Oct 2020 13:47:08 +0000 (09:47 -0400)]
zink: directly use resource count from pool instead of accumulating every time

this is a surprisingly impactful speedup

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: track resource count on descriptor pool object
Mike Blumenkrantz [Wed, 7 Oct 2020 13:39:21 +0000 (09:39 -0400)]
zink: track resource count on descriptor pool object

we can do this once here instead of accumulating the count all over later

also remove the debug value on the set which duplicated this

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: reuse descriptor barriers across draws
Mike Blumenkrantz [Wed, 7 Oct 2020 13:30:27 +0000 (09:30 -0400)]
zink: reuse descriptor barriers across draws

if we aren't invalidating the descriptor set then we can safely reuse its
barriers to avoid doing any sort of hashing during descriptor updating

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: move descriptor binding out of the update codepath
Mike Blumenkrantz [Tue, 6 Oct 2020 20:45:24 +0000 (16:45 -0400)]
zink: move descriptor binding out of the update codepath

we won't always need to update sets that we bind

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: pre-size descriptor transition hash table
Mike Blumenkrantz [Tue, 6 Oct 2020 20:31:59 +0000 (16:31 -0400)]
zink: pre-size descriptor transition hash table

this avoids costly rehashing

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: simplify check for knowing whether descriptor updating is needed
Mike Blumenkrantz [Tue, 6 Oct 2020 18:43:15 +0000 (14:43 -0400)]
zink: simplify check for knowing whether descriptor updating is needed

if a program has at least one pool object set then it will have descriptors

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: remove intermediate func for descriptor set getting
Mike Blumenkrantz [Tue, 6 Oct 2020 16:33:39 +0000 (12:33 -0400)]
zink: remove intermediate func for descriptor set getting

we can simplify this a bit by just getting the objects in the function

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: allow reuse of zink_descriptor_pools between programs
Mike Blumenkrantz [Tue, 6 Oct 2020 13:40:00 +0000 (09:40 -0400)]
zink: allow reuse of zink_descriptor_pools between programs

now that we've split these into their own objects, we can reuse them across
programs with matching binding layouts for a given type, giving even more value to
the descriptor set cache by increasing reuse

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: move descriptor type to pool object from set
Mike Blumenkrantz [Tue, 6 Oct 2020 13:34:41 +0000 (09:34 -0400)]
zink: move descriptor type to pool object from set

this is a little less memory usage

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: track number of sets currently allocated per descriptor pool
Mike Blumenkrantz [Wed, 7 Oct 2020 12:35:57 +0000 (08:35 -0400)]
zink: track number of sets currently allocated per descriptor pool

if we're going to be sharing pools across programs, it's no longer sufficient
to check the hash populations, so we need a separate counter to know when we have
to flush

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: change program pointer on struct zink_descriptor_set to pool pointer
Mike Blumenkrantz [Tue, 6 Oct 2020 12:30:06 +0000 (08:30 -0400)]
zink: change program pointer on struct zink_descriptor_set to pool pointer

the program using the set isn't very relevant now that there's the intermediate
pool struct which stores the sets

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: break out all the descriptor pool/layout stuff into a new struct
Mike Blumenkrantz [Tue, 6 Oct 2020 01:29:02 +0000 (21:29 -0400)]
zink: break out all the descriptor pool/layout stuff into a new struct

by pushing these into a separate struct, we can eventually reuse them between
programs to make the descriptor set caches even more valuable

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: break out descriptor stuff into new files
Mike Blumenkrantz [Mon, 5 Oct 2020 23:51:27 +0000 (19:51 -0400)]
zink: break out descriptor stuff into new files

this is getting to be enough code that it's getting to be a hassle to
keep with the program stuff

also rename a couple of the moved functions

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: deduplicate VkWriteDescriptorSet setup
Mike Blumenkrantz [Sun, 4 Oct 2020 18:58:48 +0000 (14:58 -0400)]
zink: deduplicate VkWriteDescriptorSet setup

no functional changes

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: break out image descriptor updating
Mike Blumenkrantz [Sun, 4 Oct 2020 16:59:44 +0000 (12:59 -0400)]
zink: break out image descriptor updating

all the descriptor updates are now broken out, so update_descriptors is now just
a dispatch for calling the other update functions

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: break out sampler descriptor updating
Mike Blumenkrantz [Sun, 4 Oct 2020 16:48:55 +0000 (12:48 -0400)]
zink: break out sampler descriptor updating

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: break out ssbo descriptor updating
Mike Blumenkrantz [Sun, 4 Oct 2020 16:17:44 +0000 (12:17 -0400)]
zink: break out ssbo descriptor updating

by the power of grayskull, this is now readable

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: split out ubo descriptor updating
Mike Blumenkrantz [Sun, 4 Oct 2020 16:10:17 +0000 (12:10 -0400)]
zink: split out ubo descriptor updating

now that we're doing incremental updates, we can refactor this to be much
more readable by having separate functions for each type of descriptor update

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: add VkPipelineLayout to zink_program meta struct
Mike Blumenkrantz [Sun, 4 Oct 2020 16:04:57 +0000 (12:04 -0400)]
zink: add VkPipelineLayout to zink_program meta struct

this lets us simplify a little more code

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: don't double iterate all the per-batch sets on reset
Mike Blumenkrantz [Sun, 4 Oct 2020 15:38:47 +0000 (11:38 -0400)]
zink: don't double iterate all the per-batch sets on reset

we're already iterating once here, so we can definitely skip iterating again
and just do the removals inlined

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: add flag for recycled descriptor sets
Mike Blumenkrantz [Sun, 4 Oct 2020 14:33:51 +0000 (10:33 -0400)]
zink: add flag for recycled descriptor sets

this lets us skip a hash lookup in the last_set fastpath

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: improve descriptor cache invalidation
Mike Blumenkrantz [Sun, 4 Oct 2020 14:07:29 +0000 (10:07 -0400)]
zink: improve descriptor cache invalidation

we can pass the offset of the 'invalid' flag directly to the resources
to let them run through and invalidate their sets in time for us to detect
it when we recycle the set during batch reset and throw it onto our allocation array

additionally, by adding refs for the actual objects used in a descriptor set, we can
ensure that our cache is as accurate as possible

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: only batch-reference the program in use once per descriptor update
Mike Blumenkrantz [Sun, 4 Oct 2020 14:55:25 +0000 (10:55 -0400)]
zink: only batch-reference the program in use once per descriptor update

now that we're guaranteed to know what our batch is earlier, we can move this
referencing around to reduce the number of hash lookups we'll perform here

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: move descriptor set allocation near the top of update_descriptors
Mike Blumenkrantz [Sun, 4 Oct 2020 14:53:14 +0000 (10:53 -0400)]
zink: move descriptor set allocation near the top of update_descriptors

no functional changes, but it moves the only point in the function where a
flush can occur out of the way which lets us get the batch we'll be using
immediately

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: add program pointer to desc set struct
Mike Blumenkrantz [Sun, 4 Oct 2020 15:04:22 +0000 (11:04 -0400)]
zink: add program pointer to desc set struct

we generally want to avoid this, but it lets us skip a lot of hash lookups,
which is a performance hit

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: actually flag all used resources as used during update_descriptors
Mike Blumenkrantz [Sat, 3 Oct 2020 14:31:22 +0000 (10:31 -0400)]
zink: actually flag all used resources as used during update_descriptors

num descriptors != num bound resources, so this needs to be a separate count/index

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: store last-used descriptor set for each type of set for quick reuse
Mike Blumenkrantz [Thu, 1 Oct 2020 20:29:09 +0000 (16:29 -0400)]
zink: store last-used descriptor set for each type of set for quick reuse

we can avoid some hash lookups this way, and we can also avoid putting the null
descriptor sets back into the array since we know they'll always be the last-used
set

this also helps our null set reuse be more explicit since we never have to put these sets
back into an array or anything

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: pre-hash sampler views and states
Mike Blumenkrantz [Wed, 7 Oct 2020 18:00:19 +0000 (14:00 -0400)]
zink: pre-hash sampler views and states

this greatly reduces the amount of on-demand hashing that we have to do,
as now in worst case we'll be hashing 2x uint32_t per sampler descriptor
vs 2x vulkan object pointer (sometimes a uint64_t) and a uint32_t

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: add a null sampler view descriptor hash to the screen
Mike Blumenkrantz [Wed, 7 Oct 2020 17:59:35 +0000 (13:59 -0400)]
zink: add a null sampler view descriptor hash to the screen

pre-hashing this saves us time later since we can just reuse it

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: introduce descriptor states
Mike Blumenkrantz [Thu, 1 Oct 2020 19:22:29 +0000 (15:22 -0400)]
zink: introduce descriptor states

this aims to track the states of descriptors so that we can do more incremental
updating

it also enables the descriptor cache to be more robust by providing the incremental
data as the key

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>

3 years agozink: use dynamic offsets for first ubo
Mike Blumenkrantz [Thu, 1 Oct 2020 20:51:49 +0000 (16:51 -0400)]
zink: use dynamic offsets for first ubo

this lets us avoid invalidating the ubo descriptor state, which reduces our
cache overhead

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>