platform/upstream/mesa.git
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>

3 years agozink: split descriptor sets based on usage
Mike Blumenkrantz [Thu, 1 Oct 2020 19:22:45 +0000 (15:22 -0400)]
zink: split descriptor sets based on usage

this uses multiple descriptor sets so that we can perform more incremental
updating and increase the value that we get from our cache by only invalidating
one state at a time

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

3 years agozink: move surface refs to the end of descriptor updating
Mike Blumenkrantz [Fri, 26 Feb 2021 13:07:34 +0000 (08:07 -0500)]
zink: move surface refs to the end of descriptor updating

keeping descriptor stuff with descriptor stuff

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

3 years agozink: reorder descriptor barrier applying during updating
Mike Blumenkrantz [Fri, 26 Feb 2021 13:05:14 +0000 (08:05 -0500)]
zink: reorder descriptor barrier applying during updating

just putting this with the rest of the non-descriptor stuff

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

3 years agozink: move streamout to draw_vbo
Mike Blumenkrantz [Fri, 26 Feb 2021 04:22:53 +0000 (23:22 -0500)]
zink: move streamout to draw_vbo

this isn't part of descriptor updating

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

3 years agozink: add second level cache for descriptor sets
Mike Blumenkrantz [Sun, 4 Oct 2020 14:38:19 +0000 (10:38 -0400)]
zink: add second level cache for descriptor sets

this lets us store sets that are valid but not currently used so that we
can either prolongue a cache entry's lifetime or cannibalize a valid entry
if necessary to avoid needing to allocate more sets

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

3 years agozink: add caching for descriptor sets
Mike Blumenkrantz [Fri, 2 Oct 2020 17:40:40 +0000 (13:40 -0400)]
zink: add caching for descriptor sets

this is a lot of churn that more or less amounts to hashing the descriptor
state during draw and then performing lookups with this to determine whether
we can reuse an existing descriptor set instead of allocating one

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

3 years agozink: add scaling factor for descriptor set bucket allocations
Mike Blumenkrantz [Thu, 24 Sep 2020 15:51:12 +0000 (11:51 -0400)]
zink: add scaling factor for descriptor set bucket allocations

now descriptor sets allocate in increasingly large batches based on how many
sets a program has allocated, multiplying by 10 any time the sets hit a power of
10, e.g., if 100 sets are allocated, we now allocate in batches of 100

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

3 years agozink: add bucket allocating for descriptor sets
Mike Blumenkrantz [Thu, 24 Sep 2020 15:05:57 +0000 (11:05 -0400)]
zink: add bucket allocating for descriptor sets

now instead of allocating a single descriptorset at a time, we allocate
a defined count of descriptorsets (currently 10) at once and keep a separate
array of allocated-and-unused sets that we can pop sets off of

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

3 years agozink: remove flushes for batch descriptor use
Mike Blumenkrantz [Fri, 18 Sep 2020 14:26:02 +0000 (10:26 -0400)]
zink: remove flushes for batch descriptor use

now that we do all our tracking and flushing per-program, we can throw
out the batch-based flushing and let our descriptors free-range

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

3 years agozink: even better handling for descriptor oom
Mike Blumenkrantz [Wed, 16 Sep 2020 19:38:38 +0000 (15:38 -0400)]
zink: even better handling for descriptor oom

in addition to ensuring that all our batches stay under the max size by cycling
them whenever we get too many active descriptors going, we now do per-program
descriptor pools, so we can do some limiting there as well to ensure that we
aren't letting any one program hog all the resources

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

3 years agozink: add helper function for cycling a batch
Mike Blumenkrantz [Fri, 18 Sep 2020 14:01:14 +0000 (10:01 -0400)]
zink: add helper function for cycling a batch

this saves a bit of typing here and there

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

3 years agozink: use more precise sizing for descriptor pools
Mike Blumenkrantz [Fri, 27 Nov 2020 15:48:49 +0000 (10:48 -0500)]
zink: use more precise sizing for descriptor pools

now that these are on the program structs, we can size the pools optimally
based on the set layouts

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

3 years agozink: move descriptor set alloc function to zink_program.c
Mike Blumenkrantz [Fri, 27 Nov 2020 15:57:57 +0000 (10:57 -0500)]
zink: move descriptor set alloc function to zink_program.c

try to keep things organized...

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

3 years agozink: store and reuse descriptorsets after batch completion
Mike Blumenkrantz [Fri, 27 Nov 2020 16:22:07 +0000 (11:22 -0500)]
zink: store and reuse descriptorsets after batch completion

since we know that the layout is going to match, we can store descriptorsets
in the program and then overwrite them instead of needing to free sets or reset
the pool

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

3 years agozink: move descriptor sets/pools from batches to programs
Mike Blumenkrantz [Fri, 2 Oct 2020 17:22:41 +0000 (13:22 -0400)]
zink: move descriptor sets/pools from batches to programs

this lets us much more accurately create descriptor sets using the exact
size required by a given program instead of creating gigantic monolithic sets

it does (temporarily) incur a perf hit since sets are now freed after each use rather
than being reset

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

3 years agozink: simplify some update_descriptor code
Mike Blumenkrantz [Fri, 27 Nov 2020 17:16:47 +0000 (12:16 -0500)]
zink: simplify some update_descriptor code

by using the generic zink_program here we can shorten the code a little

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

3 years agoradv: fix potential clears with non renderable images on GFX9+
Samuel Pitoiset [Tue, 9 Mar 2021 13:05:28 +0000 (14:05 +0100)]
radv: fix potential clears with non renderable images on GFX9+

Found by inspection.

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

3 years agoradv: fix meta save/restore state with non renderable images
Samuel Pitoiset [Tue, 9 Mar 2021 13:02:11 +0000 (14:02 +0100)]
radv: fix meta save/restore state with non renderable images

For non renderable images, the driver performs some transfer operations
with compute shaders on the gfx queue, but it was saving the gfx state
instead of the compute state.

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

3 years agoradv: disable sampling with VK_FORMAT_R64_SFLOAT
Samuel Pitoiset [Thu, 11 Mar 2021 12:28:49 +0000 (13:28 +0100)]
radv: disable sampling with VK_FORMAT_R64_SFLOAT

It's not supported.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4433
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/9519>

3 years agovirgl: Support the ETC1_RGB8 format as virglrenderer supports it
Rohan Garg [Wed, 10 Mar 2021 15:42:08 +0000 (16:42 +0100)]
virgl: Support the ETC1_RGB8 format as virglrenderer supports it

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9497>

3 years agolima: run nir dce after nir_lower_vec_to_movs
Erico Nunes [Wed, 10 Mar 2021 21:22:01 +0000 (22:22 +0100)]
lima: run nir dce after nir_lower_vec_to_movs

Some of the 'vec*' nir instructions may hold references to dead code
until the nir_lower_vec_to_movs pass runs.
After nir_lower_vec_to_movs, that code can finally be cleaned by dce,
so add an additional dce pass.
This not only potentially further removes unneeded code from the nir
representation but also prevents bugs with the compiler from special
case unused code that is not expected (e.g. root undef type nodes).

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

3 years agoci/broadcom: allow custom kernels
Juan A. Suarez Romero [Thu, 11 Mar 2021 16:42:06 +0000 (17:42 +0100)]
ci/broadcom: allow custom kernels

So far, testing VC4 and V3D/V3DV requires the CI runners having access
to a Raspberry Pi 3/4 kernel, and the correspondent modules and
bootloader files. If a different kernel must be used, it means touching
the runners to provide them.

This commit adds the option to define an URL pointing to a (compressed)
tarball containing such files, without requiring dealing with the
runners. This link is provided through the `BM_BOOTFS` job variable.

The tarball must contain two directories in the root: a `/boot`
directory (containing the kernel, DTBs and bootloader files), and a
`/lib/modules` (or `/usr/lib/modules`) with the kernel modules.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9527>

3 years agoturnip: fill VkMemoryDedicatedRequirements
Danylo Piliaiev [Tue, 16 Feb 2021 15:04:35 +0000 (17:04 +0200)]
turnip: fill VkMemoryDedicatedRequirements

We support VK_KHR_dedicated_allocation so we must fill
VkMemoryDedicatedRequirements.

Vulkan spec states:

 "[...] requiresDedicatedAllocation may be VK_TRUE under one of the
 following conditions:

 The pNext chain of VkImageCreateInfo for the call to vkCreateImage used
 to create the image being queried included a VkExternalMemoryImageCreateInfo
 structure, and any of the handle types specified in
 VkExternalMemoryImageCreateInfo::handleTypes requires dedicated allocation,
 as reported by vkGetPhysicalDeviceImageFormatProperties2 in
 VkExternalImageFormatProperties::externalMemoryProperties.externalMemoryFeatures,
 the requiresDedicatedAllocation field will be set to VK_TRUE."

All handle types require dedicated allocation at the moment.

Fixes:
 dEQP-VK.api.external.memory.opaque_fd.dedicated.image.info
 dEQP-VK.memory.requirements.dedicated_allocation.buffer.regular
 dEQP-VK.memory.requirements.dedicated_allocation.image.transient_tiling_optimal

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

3 years agoanv: fix compilation due to missing vk_format_from_android
Tapani Pälli [Fri, 12 Mar 2021 06:28:55 +0000 (08:28 +0200)]
anv: fix compilation due to missing vk_format_from_android

Fixes: 4fb6c051c9e ("anv: Move vk_format helpers to common code")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4428
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9549>

3 years agoanv/android: fix compilation failure
Tapani Pälli [Fri, 12 Mar 2021 06:33:23 +0000 (08:33 +0200)]
anv/android: fix compilation failure

Fixes: 3e6d3bca1d7 ("anv/android: Fix size check for imported gralloc bo")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9549>

3 years agolavapipe: add EXT_sampler_filter_minmax support
Dave Airlie [Fri, 5 Mar 2021 06:09:12 +0000 (16:09 +1000)]
lavapipe: add EXT_sampler_filter_minmax support

Hook up the extension

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9423>

3 years agollvmpipe: add reduction mode support
Dave Airlie [Fri, 5 Mar 2021 06:08:22 +0000 (16:08 +1000)]
llvmpipe: add reduction mode support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9423>

3 years agolavapipe: enable KHR_multiview
Dave Airlie [Thu, 4 Mar 2021 17:53:10 +0000 (03:53 +1000)]
lavapipe: enable KHR_multiview

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agolavapipe: add render pass support for multiview
Dave Airlie [Thu, 4 Mar 2021 04:01:36 +0000 (14:01 +1000)]
lavapipe: add render pass support for multiview

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agolavapipe: add input attachment support for multiview
Dave Airlie [Thu, 4 Mar 2021 04:01:06 +0000 (14:01 +1000)]
lavapipe: add input attachment support for multiview

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agolavapipe: add draw support for multiview
Dave Airlie [Thu, 4 Mar 2021 04:00:49 +0000 (14:00 +1000)]
lavapipe: add draw support for multiview

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agolavapipe: add clear support for multiview
Dave Airlie [Thu, 4 Mar 2021 04:00:23 +0000 (14:00 +1000)]
lavapipe: add clear support for multiview

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agollvmpipe: add view index support to rasterizer
Dave Airlie [Thu, 4 Mar 2021 03:59:28 +0000 (13:59 +1000)]
llvmpipe: add view index support to rasterizer

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agollvmpipe: add the view index callback from draw
Dave Airlie [Thu, 4 Mar 2021 03:58:39 +0000 (13:58 +1000)]
llvmpipe: add the view index callback from draw

This just stores the view index into setup

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agodraw: add tess/gs support for multiview index
Dave Airlie [Thu, 4 Mar 2021 05:03:40 +0000 (15:03 +1000)]
draw: add tess/gs support for multiview index

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agodraw/vs: pass the view index to the vertex shader
Dave Airlie [Thu, 4 Mar 2021 03:57:40 +0000 (13:57 +1000)]
draw/vs: pass the view index to the vertex shader

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agodraw: pass the view index to the render driver
Dave Airlie [Thu, 4 Mar 2021 03:57:13 +0000 (13:57 +1000)]
draw: pass the view index to the render driver

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agodraw: add view_mask rendering support
Dave Airlie [Thu, 4 Mar 2021 03:56:52 +0000 (13:56 +1000)]
draw: add view_mask rendering support

This loops the draws per-view above the instance rendering

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agodraw: refactor out the instances drawing code
Dave Airlie [Fri, 5 Mar 2021 00:08:31 +0000 (10:08 +1000)]
draw: refactor out the instances drawing code

This can be reused nice for multiview if refactored out

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agodraw: add interface to notify renderer of the current view index
Dave Airlie [Thu, 4 Mar 2021 03:56:22 +0000 (13:56 +1000)]
draw: add interface to notify renderer of the current view index

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agogallivm: add support for load_view_index intrinsic
Dave Airlie [Thu, 4 Mar 2021 03:54:24 +0000 (13:54 +1000)]
gallivm: add support for load_view_index intrinsic

This just adds the system value

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agogallivm: mark subpass input attachments as 2d arrays
Dave Airlie [Thu, 4 Mar 2021 03:53:41 +0000 (13:53 +1000)]
gallivm: mark subpass input attachments as 2d arrays

This matters when multiview is enabled.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agogallium: add a view mask to the draw command
Dave Airlie [Thu, 4 Mar 2021 03:52:55 +0000 (13:52 +1000)]
gallium: add a view mask to the draw command

This allows the caller to specify the view mask for this draw
in a multiview draw environment

This has been packed into the upper nibble and 2 bits of the
index size to retain the struct size as small as possible
for tc.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399>

3 years agoglsl: fix declarations of gl_MaxVaryingFloats
Timothy Arceri [Thu, 11 Mar 2021 03:45:14 +0000 (14:45 +1100)]
glsl: fix declarations of gl_MaxVaryingFloats

gl_MaxVaryingFloats was not removed from core until 4.20 and is still
available in compat shaders. Found while writing some new CTS to test
the correct declarations of this constant.

Fixes: 0ebf4257a385i ("glsl: define some GLES3 constants in GLSL 4.1")

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

3 years agoiris: Add an iris_write_reg macro
Jason Ekstrand [Fri, 12 Mar 2021 02:50:49 +0000 (20:50 -0600)]
iris: Add an iris_write_reg macro

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9537>

3 years agoanv: Add an anv_batch_write_reg macro
Jason Ekstrand [Fri, 12 Mar 2021 00:14:40 +0000 (18:14 -0600)]
anv: Add an anv_batch_write_reg macro

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9537>

3 years agoanv,genxml: Handle L3SQCREG1_SQGHPCI in GenXML
Jason Ekstrand [Thu, 11 Mar 2021 23:48:03 +0000 (17:48 -0600)]
anv,genxml: Handle L3SQCREG1_SQGHPCI in GenXML

Technically, this is only one field on IVB but it's two on BYT and so it
makes things easier if we split it for all Gen7.

While we're here, make some of the other fields in L3SQCREG1 Booleans.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9537>

3 years agodocs: Add calendar entries for 21.0 release.
Dylan Baker [Fri, 12 Mar 2021 00:42:14 +0000 (16:42 -0800)]
docs: Add calendar entries for 21.0 release.

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

3 years agodocs: update calendar and link releases notes for 21.0.0
Dylan Baker [Fri, 12 Mar 2021 00:40:46 +0000 (16:40 -0800)]
docs: update calendar and link releases notes for 21.0.0

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

3 years agodocs: add release notes for 21.0.0
Dylan Baker [Fri, 12 Mar 2021 00:02:36 +0000 (16:02 -0800)]
docs: add release notes for 21.0.0

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

3 years agodocs: add notes about nvc0 support of ARB/EXT_texture_filter_minmax
Ilia Mirkin [Thu, 11 Mar 2021 23:51:08 +0000 (18:51 -0500)]
docs: add notes about nvc0 support of ARB/EXT_texture_filter_minmax

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487>

3 years agonvc0: enable minmax reductions on gm200+
Ilia Mirkin [Tue, 9 Mar 2021 21:11:29 +0000 (16:11 -0500)]
nvc0: enable minmax reductions on gm200+

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

3 years agost/mesa: add EXT_texture_filter_minmax support
Ilia Mirkin [Tue, 9 Mar 2021 20:53:18 +0000 (15:53 -0500)]
st/mesa: add EXT_texture_filter_minmax support

This also trivially adds ARB_texture_filter_minmax, since the EXT
variant is a strict superset.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487>

3 years agomesa: add tracking of reduction mode
Ilia Mirkin [Tue, 9 Mar 2021 20:34:22 +0000 (15:34 -0500)]
mesa: add tracking of reduction mode

This is used to expose ARB/EXT_texture_filter_minmax. Note that only the
EXT_* enable is provided since the ARB one would require proper handling
of some formats not being supported. For now this is force-enabled for
everything.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487>

3 years agogallium: add a sampler reduction cap + settings
Dave Airlie [Fri, 5 Mar 2021 05:23:57 +0000 (15:23 +1000)]
gallium: add a sampler reduction cap + settings

This is to allow for
  VK_EXT_sampler_filter_minmax
  GL_EXT_texture_filter_minmax
support

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9487>

3 years agomicrosoft/spirv_to_dxil: Fix spirv2dxil I/O to use binary mode
Michael Tang [Thu, 11 Mar 2021 18:27:11 +0000 (10:27 -0800)]
microsoft/spirv_to_dxil: Fix spirv2dxil I/O to use binary mode

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

3 years agoutil: Make os_read_file use O_BINARY on Windows
Michael Tang [Thu, 11 Mar 2021 21:29:07 +0000 (13:29 -0800)]
util: Make os_read_file use O_BINARY on Windows

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9513>

3 years agou_format: Mark the generated pack/unpack src/dst args as restrict.
Eric Anholt [Wed, 10 Mar 2021 18:35:59 +0000 (10:35 -0800)]
u_format: Mark the generated pack/unpack src/dst args as restrict.

Calling code to pack/unpack with overlap would be already be undefined.

Cuts 50k of text on x86_64 release builds from the compiler having more
freedom in the src/dst loads knowing that they don't interfere with each
other.

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

3 years agointel/isl: Drop intel_ prefix in function names
Anuj Phogat [Fri, 5 Mar 2021 00:25:12 +0000 (16:25 -0800)]
intel/isl: Drop intel_ prefix in function names

This change is in line with naming convention used in isl.
We want to keep intel_ prefix reserved for common code.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9532>

3 years agolavapipe: update features.txt
Michel Zou [Wed, 20 Jan 2021 17:24:52 +0000 (18:24 +0100)]
lavapipe: update features.txt

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