summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/mesa/src/amd/common/amd_kernel_code_t.h2
-rw-r--r--lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.h1
-rw-r--r--lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h5
-rw-r--r--lib/mesa/src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected3
-rw-r--r--lib/mesa/src/gbm/Makefile.sources1
-rw-r--r--lib/mesa/src/glx/windows/Makefile.am3
-rw-r--r--lib/mesa/src/intel/genxml/genX_pack.h2
-rw-r--r--lib/mesa/src/intel/genxml/gen_macros.h3
-rw-r--r--lib/mesa/src/intel/isl/gen_format_layout.py161
-rw-r--r--lib/mesa/src/intel/isl/isl_format_layout.c389
-rw-r--r--lib/mesa/src/intel/isl/isl_format_layout.csv14
-rw-r--r--lib/mesa/src/intel/isl/isl_gen4.c51
-rw-r--r--lib/mesa/src/intel/isl/isl_gen4.h5
-rw-r--r--lib/mesa/src/intel/isl/isl_gen6.c30
-rw-r--r--lib/mesa/src/intel/isl/tests/isl_surf_get_image_offset_test.c1
15 files changed, 101 insertions, 570 deletions
diff --git a/lib/mesa/src/amd/common/amd_kernel_code_t.h b/lib/mesa/src/amd/common/amd_kernel_code_t.h
index f8e950851..d0d7809da 100644
--- a/lib/mesa/src/amd/common/amd_kernel_code_t.h
+++ b/lib/mesa/src/amd/common/amd_kernel_code_t.h
@@ -36,7 +36,7 @@
// Gets bits for specified mask from specified src packed instance.
#define AMD_HSA_BITS_GET(src, mask) \
- ((src & mask) >> mask ## _SHIFT)
+ ((src & mask) >> mask ## _SHIFT) \
/* Every amd_*_code_t has the following properties, which are composed of
* a number of bit fields. Every bit field has a mask (AMD_CODE_PROPERTY_*),
diff --git a/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.h b/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.h
index a5652a325..cdc8c81e4 100644
--- a/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.h
+++ b/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.h
@@ -28,5 +28,6 @@
#include <amdgpu.h>
void radv_amdgpu_surface_init_functions(struct radv_amdgpu_winsys *ws);
+ADDR_HANDLE radv_amdgpu_addr_create(struct amdgpu_gpu_info *amdinfo, int family, int rev_id, enum chip_class chip_class);
#endif /* RADV_AMDGPU_SURFACE_H */
diff --git a/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h b/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
index 426cf692e..abb238b35 100644
--- a/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+++ b/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
@@ -29,7 +29,6 @@
#define RADV_AMDGPU_WINSYS_H
#include "radv_radeon_winsys.h"
-#include "ac_gpu_info.h"
#include "addrlib/addrinterface.h"
#include <amdgpu.h>
#include "util/list.h"
@@ -42,8 +41,10 @@ struct radv_amdgpu_winsys {
struct amdgpu_gpu_info amdinfo;
ADDR_HANDLE addrlib;
+ uint32_t rev_id;
+ unsigned family;
+
bool debug_all_bos;
- bool batchchain;
pthread_mutex_t global_bo_list_lock;
struct list_head global_bo_list;
unsigned num_buffers;
diff --git a/lib/mesa/src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected b/lib/mesa/src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected
index f5517da3d..cd0071ff4 100644
--- a/lib/mesa/src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected
+++ b/lib/mesa/src/compiler/glsl/glcpp/tests/147-undef-builtin-allowed.c.expected
@@ -1,6 +1,3 @@
-0:2(1): preprocessor warning: names containing consecutive underscores are reserved.
-0:3(1): preprocessor warning: names containing consecutive underscores are reserved.
-0:4(1): preprocessor warning: names containing consecutive underscores are reserved.
#version 110
diff --git a/lib/mesa/src/gbm/Makefile.sources b/lib/mesa/src/gbm/Makefile.sources
index 461025c1a..7a2d6a435 100644
--- a/lib/mesa/src/gbm/Makefile.sources
+++ b/lib/mesa/src/gbm/Makefile.sources
@@ -1,6 +1,7 @@
gbm_core_FILES = \
main/backend.c \
main/backend.h \
+ main/common_drm.h \
main/gbm.c \
main/gbm.h \
main/gbmint.h
diff --git a/lib/mesa/src/glx/windows/Makefile.am b/lib/mesa/src/glx/windows/Makefile.am
index f84288b93..980698823 100644
--- a/lib/mesa/src/glx/windows/Makefile.am
+++ b/lib/mesa/src/glx/windows/Makefile.am
@@ -24,8 +24,9 @@ libwindowsglx_la_CFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/glx \
-I$(top_srcdir)/src/mapi \
- -I$(top_builddir)/src/mapi/glapi \
-I$(top_srcdir)/src/mapi/glapi \
+ -I$(top_builddir)/src/mapi/glapi \
$(VISIBILITY_CFLAGS) \
+ $(SHARED_GLAPI_CFLAGS) \
$(DEFINES) \
$(X11_INCLUDES)
diff --git a/lib/mesa/src/intel/genxml/genX_pack.h b/lib/mesa/src/intel/genxml/genX_pack.h
index 187e75c59..2ec222696 100644
--- a/lib/mesa/src/intel/genxml/genX_pack.h
+++ b/lib/mesa/src/intel/genxml/genX_pack.h
@@ -44,8 +44,6 @@
# include "genxml/gen8_pack.h"
#elif (GEN_VERSIONx10 == 90)
# include "genxml/gen9_pack.h"
-#elif (GEN_VERSIONx10 == 100)
-# include "genxml/gen10_pack.h"
#else
# error "Need to add a pack header include for this gen"
#endif
diff --git a/lib/mesa/src/intel/genxml/gen_macros.h b/lib/mesa/src/intel/genxml/gen_macros.h
index a85c08250..b4941b971 100644
--- a/lib/mesa/src/intel/genxml/gen_macros.h
+++ b/lib/mesa/src/intel/genxml/gen_macros.h
@@ -85,9 +85,6 @@
#elif (GEN_VERSIONx10 == 90)
# define GENX(X) GEN9_##X
# define genX(x) gen9_##x
-#elif (GEN_VERSIONx10 == 100)
-# define GENX(X) GEN10_##X
-# define genX(x) gen10_##x
#else
# error "Need to add prefixing macros for this gen"
#endif
diff --git a/lib/mesa/src/intel/isl/gen_format_layout.py b/lib/mesa/src/intel/isl/gen_format_layout.py
index 0ca42dbab..f52e45499 100644
--- a/lib/mesa/src/intel/isl/gen_format_layout.py
+++ b/lib/mesa/src/intel/isl/gen_format_layout.py
@@ -32,76 +32,64 @@ from mako import template
# Load the template, ensure that __future__.division is imported, and set the
# bytes encoding to be utf-8. This last bit is important to getting simple
# consistent behavior for python 3 when we get there.
-TEMPLATE = template.Template(future_imports=['division'],
- output_encoding='utf-8',
- text="""\
-/* This file is autogenerated by gen_format_layout.py. DO NOT EDIT! */
-
-/*
- * Copyright 2015 Intel Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include "isl/isl.h"
-
-const struct isl_format_layout
-isl_format_layouts[] = {
-% for format in formats:
- [ISL_FORMAT_${format.name}] = {
- .format = ISL_FORMAT_${format.name},
- .name = "ISL_FORMAT_${format.name}",
- .bpb = ${format.bpb},
- .bw = ${format.bw},
- .bh = ${format.bh},
- .bd = ${format.bd},
- .channels = {
- % for mask in ['r', 'g', 'b', 'a', 'l', 'i', 'p']:
- <% channel = getattr(format, mask, None) %>\\
- % if channel.type is not None:
- .${mask} = { ISL_${channel.type}, ${channel.size} },
- % else:
- .${mask} = {},
- % endif
- % endfor
- },
- .colorspace = ISL_COLORSPACE_${format.colorspace},
- .txc = ISL_TXC_${format.txc},
- },
-
-% endfor
-};
-
-enum isl_format
-isl_format_srgb_to_linear(enum isl_format format)
-{
- switch (format) {
-% for srgb, rgb in srgb_to_linear_map:
- case ISL_FORMAT_${srgb}:
- return ISL_FORMAT_${rgb};
-%endfor
- default:
- return format;
- }
-}
-""")
+TEMPLATE = template.Template(
+ text=textwrap.dedent("""\
+ /* This file is autogenerated by gen_format_layout.py. DO NOT EDIT! */
+
+ /*
+ * Copyright 2015 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+ #include "isl/isl.h"
+
+ const struct isl_format_layout
+ isl_format_layouts[] = {
+ % for format in formats:
+ [ISL_FORMAT_${format.name}] = {
+ .format = ISL_FORMAT_${format.name},
+ .name = "ISL_FORMAT_${format.name}",
+ .bpb = ${format.bpb},
+ .bw = ${format.bw},
+ .bh = ${format.bh},
+ .bd = ${format.bd},
+ .channels = {
+ % for mask in ['r', 'g', 'b', 'a', 'l', 'i', 'p']:
+ <% channel = getattr(format, mask, None) %>\\
+ % if channel.type is not None:
+ .${mask} = { ISL_${channel.type}, ${channel.size} },
+ % else:
+ .${mask} = {},
+ % endif
+ % endfor
+ },
+ .colorspace = ISL_COLORSPACE_${format.colorspace},
+ .txc = ISL_TXC_${format.txc},
+ },
+
+ % endfor
+ };
+ """),
+ future_imports=['division'],
+ output_encoding='utf-8')
class Channel(object):
@@ -180,34 +168,6 @@ def reader(csvfile):
if line and not line[0].startswith('#'):
yield line
-def get_srgb_to_linear_map(formats):
- """Compute a map from sRGB to linear formats.
-
- This function uses some probably somewhat fragile string munging to do
- the conversion. However, we do assert that, if it's SRGB, the munging
- succeeded so that gives some safety.
- """
- names = {f.name for f in formats}
- for fmt in formats:
- if fmt.colorspace != 'SRGB':
- continue
-
- replacements = [
- ('_SRGB', ''),
- ('SRGB', 'RGB'),
- ('U8SRGB', 'FLT16'),
- ]
-
- found = False;
- for rep in replacements:
- rgb_name = fmt.name.replace(rep[0], rep[1])
- if rgb_name in names:
- found = True
- yield fmt.name, rgb_name
- break;
-
- # We should have found a format name
- assert found
def main():
"""Main function."""
@@ -224,14 +184,11 @@ def main():
# problem: Unicode can be rendered even if the shell calling this script
# doesn't.
with open(args.out, 'wb') as f:
- formats = [Format(l) for l in reader(args.csv)]
try:
# This basically does lazy evaluation and initialization, which
# saves on memory and startup overhead.
f.write(TEMPLATE.render(
- formats = formats,
- srgb_to_linear_map = list(get_srgb_to_linear_map(formats)),
- ))
+ formats=(Format(l) for l in reader(args.csv))))
except Exception:
# In the even there's an error this imports some helpers from mako
# to print a useful stack trace and prints it, then exits with
diff --git a/lib/mesa/src/intel/isl/isl_format_layout.c b/lib/mesa/src/intel/isl/isl_format_layout.c
index 36ce54874..c05152163 100644
--- a/lib/mesa/src/intel/isl/isl_format_layout.c
+++ b/lib/mesa/src/intel/isl/isl_format_layout.c
@@ -3,24 +3,24 @@
/*
* Copyright 2015 Intel Corporation
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
*
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
*
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
*/
#include "isl/isl.h"
@@ -5027,286 +5027,6 @@ isl_format_layouts[] = {
.txc = ISL_TXC_ASTC,
},
- [ISL_FORMAT_ASTC_HDR_2D_4X4_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_4X4_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_4X4_FLT16",
- .bpb = 128,
- .bw = 4,
- .bh = 4,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_5X4_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_5X4_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_5X4_FLT16",
- .bpb = 128,
- .bw = 5,
- .bh = 4,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_5X5_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_5X5_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_5X5_FLT16",
- .bpb = 128,
- .bw = 5,
- .bh = 5,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_6X5_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_6X5_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_6X5_FLT16",
- .bpb = 128,
- .bw = 6,
- .bh = 5,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_6X6_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_6X6_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_6X6_FLT16",
- .bpb = 128,
- .bw = 6,
- .bh = 6,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_8X5_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_8X5_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_8X5_FLT16",
- .bpb = 128,
- .bw = 8,
- .bh = 5,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_8X6_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_8X6_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_8X6_FLT16",
- .bpb = 128,
- .bw = 8,
- .bh = 6,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_8X8_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_8X8_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_8X8_FLT16",
- .bpb = 128,
- .bw = 8,
- .bh = 8,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_10X5_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_10X5_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_10X5_FLT16",
- .bpb = 128,
- .bw = 10,
- .bh = 5,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_10X6_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_10X6_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_10X6_FLT16",
- .bpb = 128,
- .bw = 10,
- .bh = 6,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_10X8_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_10X8_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_10X8_FLT16",
- .bpb = 128,
- .bw = 10,
- .bh = 8,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_10X10_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_10X10_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_10X10_FLT16",
- .bpb = 128,
- .bw = 10,
- .bh = 10,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_12X10_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_12X10_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_12X10_FLT16",
- .bpb = 128,
- .bw = 12,
- .bh = 10,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
- [ISL_FORMAT_ASTC_HDR_2D_12X12_FLT16] = {
- .format = ISL_FORMAT_ASTC_HDR_2D_12X12_FLT16,
- .name = "ISL_FORMAT_ASTC_HDR_2D_12X12_FLT16",
- .bpb = 128,
- .bw = 12,
- .bh = 12,
- .bd = 1,
- .channels = {
- .r = { ISL_SFLOAT, 16 },
- .g = { ISL_SFLOAT, 16 },
- .b = { ISL_SFLOAT, 16 },
- .a = { ISL_SFLOAT, 16 },
- .l = {},
- .i = {},
- .p = {},
- },
- .colorspace = ISL_COLORSPACE_LINEAR,
- .txc = ISL_TXC_ASTC,
- },
-
[ISL_FORMAT_HIZ] = {
.format = ISL_FORMAT_HIZ,
.name = "ISL_FORMAT_HIZ",
@@ -5588,80 +5308,3 @@ isl_format_layouts[] = {
},
};
-
-enum isl_format
-isl_format_srgb_to_linear(enum isl_format format)
-{
- switch (format) {
- case ISL_FORMAT_B8G8R8A8_UNORM_SRGB:
- return ISL_FORMAT_B8G8R8A8_UNORM;
- case ISL_FORMAT_R10G10B10A2_UNORM_SRGB:
- return ISL_FORMAT_R10G10B10A2_UNORM;
- case ISL_FORMAT_R8G8B8A8_UNORM_SRGB:
- return ISL_FORMAT_R8G8B8A8_UNORM;
- case ISL_FORMAT_B10G10R10A2_UNORM_SRGB:
- return ISL_FORMAT_B10G10R10A2_UNORM;
- case ISL_FORMAT_B8G8R8X8_UNORM_SRGB:
- return ISL_FORMAT_B8G8R8X8_UNORM;
- case ISL_FORMAT_R8G8B8X8_UNORM_SRGB:
- return ISL_FORMAT_R8G8B8X8_UNORM;
- case ISL_FORMAT_B5G6R5_UNORM_SRGB:
- return ISL_FORMAT_B5G6R5_UNORM;
- case ISL_FORMAT_B5G5R5A1_UNORM_SRGB:
- return ISL_FORMAT_B5G5R5A1_UNORM;
- case ISL_FORMAT_B4G4R4A4_UNORM_SRGB:
- return ISL_FORMAT_B4G4R4A4_UNORM;
- case ISL_FORMAT_L8A8_UNORM_SRGB:
- return ISL_FORMAT_L8A8_UNORM;
- case ISL_FORMAT_B5G5R5X1_UNORM_SRGB:
- return ISL_FORMAT_B5G5R5X1_UNORM;
- case ISL_FORMAT_DXT1_RGB_SRGB:
- return ISL_FORMAT_DXT1_RGB;
- case ISL_FORMAT_BC1_UNORM_SRGB:
- return ISL_FORMAT_BC1_UNORM;
- case ISL_FORMAT_BC2_UNORM_SRGB:
- return ISL_FORMAT_BC2_UNORM;
- case ISL_FORMAT_BC3_UNORM_SRGB:
- return ISL_FORMAT_BC3_UNORM;
- case ISL_FORMAT_BC7_UNORM_SRGB:
- return ISL_FORMAT_BC7_UNORM;
- case ISL_FORMAT_R8G8B8_UNORM_SRGB:
- return ISL_FORMAT_R8G8B8_UNORM;
- case ISL_FORMAT_ETC2_SRGB8:
- return ISL_FORMAT_ETC2_RGB8;
- case ISL_FORMAT_ETC2_SRGB8_PTA:
- return ISL_FORMAT_ETC2_RGB8_PTA;
- case ISL_FORMAT_ETC2_EAC_SRGB8_A8:
- return ISL_FORMAT_ETC2_EAC_SRGB8_A8;
- case ISL_FORMAT_ASTC_LDR_2D_4X4_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_4X4_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_5X4_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_5X4_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_5X5_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_5X5_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_6X5_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_6X5_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_6X6_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_6X6_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_8X5_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_8X5_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_8X6_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_8X6_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_8X8_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_8X8_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_10X5_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_10X5_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_10X6_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_10X6_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_10X8_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_10X8_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_10X10_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_10X10_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_12X10_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_12X10_U8SRGB;
- case ISL_FORMAT_ASTC_LDR_2D_12X12_U8SRGB:
- return ISL_FORMAT_ASTC_LDR_2D_12X12_U8SRGB;
- default:
- return format;
- }
-}
diff --git a/lib/mesa/src/intel/isl/isl_format_layout.csv b/lib/mesa/src/intel/isl/isl_format_layout.csv
index f340e30a1..f0f31c72f 100644
--- a/lib/mesa/src/intel/isl/isl_format_layout.csv
+++ b/lib/mesa/src/intel/isl/isl_format_layout.csv
@@ -314,20 +314,6 @@ ASTC_LDR_2D_10X8_FLT16 , 128, 10, 8, 1, sf16, sf16, sf16, sf16, ,
ASTC_LDR_2D_10X10_FLT16 , 128, 10, 10, 1, sf16, sf16, sf16, sf16, , , , linear, astc
ASTC_LDR_2D_12X10_FLT16 , 128, 12, 10, 1, sf16, sf16, sf16, sf16, , , , linear, astc
ASTC_LDR_2D_12X12_FLT16 , 128, 12, 12, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_4X4_FLT16 , 128, 4, 4, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_5X4_FLT16 , 128, 5, 4, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_5X5_FLT16 , 128, 5, 5, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_6X5_FLT16 , 128, 6, 5, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_6X6_FLT16 , 128, 6, 6, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_8X5_FLT16 , 128, 8, 5, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_8X6_FLT16 , 128, 8, 6, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_8X8_FLT16 , 128, 8, 8, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_10X5_FLT16 , 128, 10, 5, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_10X6_FLT16 , 128, 10, 6, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_10X8_FLT16 , 128, 10, 8, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_10X10_FLT16 , 128, 10, 10, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_12X10_FLT16 , 128, 12, 10, 1, sf16, sf16, sf16, sf16, , , , linear, astc
-ASTC_HDR_2D_12X12_FLT16 , 128, 12, 12, 1, sf16, sf16, sf16, sf16, , , , linear, astc
HIZ , 128, 8, 4, 1, , , , , , , , , hiz
MCS_2X , 8, 1, 1, 1, , , , , , , , , mcs
MCS_4X , 8, 1, 1, 1, , , , , , , , , mcs
diff --git a/lib/mesa/src/intel/isl/isl_gen4.c b/lib/mesa/src/intel/isl/isl_gen4.c
index 14706c895..9fed45410 100644
--- a/lib/mesa/src/intel/isl/isl_gen4.c
+++ b/lib/mesa/src/intel/isl/isl_gen4.c
@@ -38,57 +38,6 @@ isl_gen4_choose_msaa_layout(const struct isl_device *dev,
}
void
-isl_gen4_filter_tiling(const struct isl_device *dev,
- const struct isl_surf_init_info *restrict info,
- isl_tiling_flags_t *flags)
-{
- /* Gen4-5 only support linear, X, and Y-tiling. */
- *flags &= (ISL_TILING_LINEAR_BIT | ISL_TILING_X_BIT | ISL_TILING_Y0_BIT);
-
- if (isl_surf_usage_is_depth_or_stencil(info->usage)) {
- assert(!ISL_DEV_USE_SEPARATE_STENCIL(dev));
-
- /* From the g35 PRM Vol. 2, 3DSTATE_DEPTH_BUFFER::Tile Walk:
- *
- * "The Depth Buffer, if tiled, must use Y-Major tiling"
- */
- *flags &= (ISL_TILING_LINEAR_BIT | ISL_TILING_Y0_BIT);
- }
-
- if (info->usage & (ISL_SURF_USAGE_DISPLAY_ROTATE_90_BIT |
- ISL_SURF_USAGE_DISPLAY_ROTATE_180_BIT |
- ISL_SURF_USAGE_DISPLAY_ROTATE_270_BIT)) {
- assert(*flags & ISL_SURF_USAGE_DISPLAY_BIT);
- isl_finishme("%s:%s: handle rotated display surfaces",
- __FILE__, __func__);
- }
-
- if (info->usage & (ISL_SURF_USAGE_DISPLAY_FLIP_X_BIT |
- ISL_SURF_USAGE_DISPLAY_FLIP_Y_BIT)) {
- assert(*flags & ISL_SURF_USAGE_DISPLAY_BIT);
- isl_finishme("%s:%s: handle flipped display surfaces",
- __FILE__, __func__);
- }
-
- if (info->usage & ISL_SURF_USAGE_DISPLAY_BIT) {
- /* Before Skylake, the display engine does not accept Y */
- *flags &= (ISL_TILING_LINEAR_BIT | ISL_TILING_X_BIT);
- }
-
- assert(info->samples == 1);
-
- /* From the g35 PRM, Volume 1, 11.5.5, "Per-Stream Tile Format Support":
- *
- * "NOTE: 128BPE Format Color buffer ( render target ) MUST be either
- * TileX or Linear."
- *
- * This is required all the way up to Sandy Bridge.
- */
- if (isl_format_get_layout(info->format)->bpb >= 128)
- *flags &= ~ISL_TILING_Y0_BIT;
-}
-
-void
isl_gen4_choose_image_alignment_el(const struct isl_device *dev,
const struct isl_surf_init_info *restrict info,
enum isl_tiling tiling,
diff --git a/lib/mesa/src/intel/isl/isl_gen4.h b/lib/mesa/src/intel/isl/isl_gen4.h
index c04f7fbf8..dc6102bdf 100644
--- a/lib/mesa/src/intel/isl/isl_gen4.h
+++ b/lib/mesa/src/intel/isl/isl_gen4.h
@@ -37,11 +37,6 @@ isl_gen4_choose_msaa_layout(const struct isl_device *dev,
enum isl_msaa_layout *msaa_layout);
void
-isl_gen4_filter_tiling(const struct isl_device *dev,
- const struct isl_surf_init_info *restrict info,
- isl_tiling_flags_t *flags);
-
-void
isl_gen4_choose_image_alignment_el(const struct isl_device *dev,
const struct isl_surf_init_info *restrict info,
enum isl_tiling tiling,
diff --git a/lib/mesa/src/intel/isl/isl_gen6.c b/lib/mesa/src/intel/isl/isl_gen6.c
index 51f2100ac..b74690319 100644
--- a/lib/mesa/src/intel/isl/isl_gen6.c
+++ b/lib/mesa/src/intel/isl/isl_gen6.c
@@ -88,8 +88,6 @@ isl_gen6_choose_image_alignment_el(const struct isl_device *dev,
* | format | halign | valign |
* +------------------------+--------+--------+
* | YUV 4:2:2 formats | 4 | * |
- * | BC1-5 | 4 | 4 |
- * | FXT1 | 8 | 4 |
* | uncompressed formats | 4 | * |
* +------------------------+--------+--------+
*
@@ -112,32 +110,38 @@ isl_gen6_choose_image_alignment_el(const struct isl_device *dev,
*/
if (isl_format_is_compressed(info->format)) {
- /* Compressed formats have an alignment equal to their block size */
*image_align_el = isl_extent3d(1, 1, 1);
return;
}
- /* Separate stencil requires 4x2 alignment */
- if (isl_surf_usage_is_stencil(info->usage) &&
- info->format == ISL_FORMAT_R8_UINT) {
+ if (isl_format_is_yuv(info->format)) {
*image_align_el = isl_extent3d(4, 2, 1);
return;
}
- /* Depth or combined depth stencil surfaces require 4x4 alignment */
- if (isl_surf_usage_is_depth_or_stencil(info->usage)) {
+ if (info->samples > 1) {
*image_align_el = isl_extent3d(4, 4, 1);
return;
}
- if (info->samples > 1) {
+ if (isl_surf_usage_is_depth_or_stencil(info->usage) &&
+ !ISL_DEV_USE_SEPARATE_STENCIL(dev)) {
+ /* interleaved depthstencil buffer */
*image_align_el = isl_extent3d(4, 4, 1);
return;
}
- /* For everything else, 4x2 is always a valid alignment. Since this is
- * also the smallest alignment we can specify, we use 4x2 for everything
- * else because it uses the least memory.
- */
+ if (isl_surf_usage_is_depth(info->usage)) {
+ /* separate depth buffer */
+ *image_align_el = isl_extent3d(4, 4, 1);
+ return;
+ }
+
+ if (isl_surf_usage_is_stencil(info->usage)) {
+ /* separate stencil buffer */
+ *image_align_el = isl_extent3d(4, 2, 1);
+ return;
+ }
+
*image_align_el = isl_extent3d(4, 2, 1);
}
diff --git a/lib/mesa/src/intel/isl/tests/isl_surf_get_image_offset_test.c b/lib/mesa/src/intel/isl/tests/isl_surf_get_image_offset_test.c
index 05fd79f3a..1b3dc58b0 100644
--- a/lib/mesa/src/intel/isl/tests/isl_surf_get_image_offset_test.c
+++ b/lib/mesa/src/intel/isl/tests/isl_surf_get_image_offset_test.c
@@ -256,6 +256,7 @@ test_bdw_3d_r8g8b8a8_unorm_256x256x256_levels09_tiley0(void)
t_assert_image_alignment_el(&surf, 4, 4, 1);
t_assert_image_alignment_sa(&surf, 4, 4, 1);
+ t_assert(isl_surf_get_array_pitch_el_rows(&surf) == 74916);
t_assert(isl_surf_get_array_pitch_sa_rows(&surf) ==
isl_surf_get_array_pitch_el_rows(&surf));