summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/zink
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2021-09-09 09:46:47 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2021-09-09 09:46:47 +0000
commit17251c8fe97e6c8f1f6e21767313ce4bfa80a547 (patch)
tree89369bcb8fa98db8d7510cb0b94f7dfcc39e2eac /lib/mesa/src/gallium/drivers/zink
parentac84aa63606be1381cde78da15d054e26a4e1ab3 (diff)
Import Mesa 21.1.8
Diffstat (limited to 'lib/mesa/src/gallium/drivers/zink')
-rw-r--r--lib/mesa/src/gallium/drivers/zink/zink_compiler.c2
-rw-r--r--lib/mesa/src/gallium/drivers/zink/zink_extensions.py32
-rw-r--r--lib/mesa/src/gallium/drivers/zink/zink_format.c1
3 files changed, 17 insertions, 18 deletions
diff --git a/lib/mesa/src/gallium/drivers/zink/zink_compiler.c b/lib/mesa/src/gallium/drivers/zink/zink_compiler.c
index cff1f6d67..c91d97dc7 100644
--- a/lib/mesa/src/gallium/drivers/zink/zink_compiler.c
+++ b/lib/mesa/src/gallium/drivers/zink/zink_compiler.c
@@ -746,7 +746,7 @@ unbreak_bos(nir_shader *shader)
const struct glsl_type *type = glsl_without_array(var->type);
if (type_is_counter(type))
continue;
- unsigned size = glsl_count_attribute_slots(type, false);
+ unsigned size = glsl_count_attribute_slots(glsl_type_is_array(var->type) ? var->type : type, false);
if (var->data.mode == nir_var_mem_ubo)
max_ubo_size = MAX2(max_ubo_size, size);
else
diff --git a/lib/mesa/src/gallium/drivers/zink/zink_extensions.py b/lib/mesa/src/gallium/drivers/zink/zink_extensions.py
index 656cfdf17..e55bb8415 100644
--- a/lib/mesa/src/gallium/drivers/zink/zink_extensions.py
+++ b/lib/mesa/src/gallium/drivers/zink/zink_extensions.py
@@ -25,8 +25,8 @@ from xml.etree import ElementTree
from typing import List,Tuple
class Version:
- device_version : Tuple[int, int, int] = (1,0,0)
- struct_version : Tuple[int, int] = (1,0)
+ device_version = (1,0,0)
+ struct_version = (1,0)
def __init__(self, version, struct=()):
self.device_version = version
@@ -59,16 +59,16 @@ class Version:
+ '_' + struct)
class Extension:
- name : str = None
- alias : str = None
- is_required : bool = False
- is_nonstandard : bool = False
- enable_conds : List[str] = None
+ name = None
+ alias = None
+ is_required = False
+ is_nonstandard = False
+ enable_conds = None
# these are specific to zink_device_info.py:
- has_properties : bool = False
- has_features : bool = False
- guard : bool = False
+ has_properties = False
+ has_features = False
+ guard = False
# these are specific to zink_instance.py:
core_since : Version = None
@@ -147,14 +147,14 @@ Layer = Extension
class ExtensionRegistryEntry:
# type of extension - right now it's either "instance" or "device"
- ext_type : str = ""
+ ext_type = ""
# the version in which the extension is promoted to core VK
- promoted_in : Version = None
+ promoted_in = None
# functions added by the extension are referred to as "commands" in the registry
- commands : List[str] = None
- constants : List[str] = None
- features_struct : str = None
- properties_struct : str = None
+ commands = None
+ constants = None
+ features_struct = None
+ properties_struct = None
class ExtensionRegistry:
# key = extension name, value = registry entry
diff --git a/lib/mesa/src/gallium/drivers/zink/zink_format.c b/lib/mesa/src/gallium/drivers/zink/zink_format.c
index 18b6d4ef6..1578bd479 100644
--- a/lib/mesa/src/gallium/drivers/zink/zink_format.c
+++ b/lib/mesa/src/gallium/drivers/zink/zink_format.c
@@ -77,7 +77,6 @@ static const VkFormat formats[PIPE_FORMAT_COUNT] = {
MAP_FORMAT_NORM(R8G8B8A8)
MAP_FORMAT_SCALED(R8G8B8A8)
MAP_FORMAT_INT(R8G8B8A8)
- MAP_FORMAT_SRGB(R8G8B8A8)
MAP_FORMAT_NORM(B8G8R8A8)
MAP_FORMAT_SCALED(B8G8R8A8)
MAP_FORMAT_INT(B8G8R8A8)