panfrost: Don't allocate space for empty varyings
PIPE_FORMAT_NONE has a block size of 1, oddly, but we don't actually need to allocate any space for it. This acts as a small optimization for a few shaders with the new varying linker. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19363>
This commit is contained in:
committed by
Marge Bot
parent
d0281fc16a
commit
93bf7104d0
@@ -2404,11 +2404,12 @@ pan_assign_varyings(const struct panfrost_device *dev,
|
||||
for (unsigned i = 0; i < producer_count; ++i) {
|
||||
signed loc = pan_find_vary(consumer_vars, consumer_count,
|
||||
producer_vars[i].location);
|
||||
enum pipe_format format = loc >= 0 ?
|
||||
consumer_vars[loc].format :
|
||||
PIPE_FORMAT_NONE;
|
||||
|
||||
if (loc >= 0) {
|
||||
if (format != PIPE_FORMAT_NONE) {
|
||||
offsets[i] = stride;
|
||||
|
||||
enum pipe_format format = consumer_vars[loc].format;
|
||||
stride += util_format_get_blocksize(format);
|
||||
} else {
|
||||
offsets[i] = -1;
|
||||
|
||||
Reference in New Issue
Block a user