summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/isl/gen_format_layout.py5
-rw-r--r--src/intel/isl/isl.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/intel/isl/gen_format_layout.py b/src/intel/isl/gen_format_layout.py
index d7f39000b26..803967ec490 100644
--- a/src/intel/isl/gen_format_layout.py
+++ b/src/intel/isl/gen_format_layout.py
@@ -67,7 +67,8 @@ TEMPLATE = template.Template(
[ISL_FORMAT_${format.name}] = {
.format = ISL_FORMAT_${format.name},
.name = "ISL_FORMAT_${format.name}",
- .bs = ${format.bs},
+ .bpb = ${format.bpb},
+ .bs = ${format.bpb // 8},
.bw = ${format.bw},
.bh = ${format.bh},
.bd = ${format.bd},
@@ -137,7 +138,7 @@ class Format(object):
self.name = line[0].strip()
# Future division makes this work in python 2.
- self.bs = int(line[1]) // 8
+ self.bpb = int(line[1])
self.bw = line[2].strip()
self.bh = line[3].strip()
self.bd = line[4].strip()
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index f169fefd16e..f74c071705d 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -639,6 +639,7 @@ struct isl_format_layout {
enum isl_format format;
const char *name;
+ uint16_t bpb; /**< Bits per block */
uint8_t bs; /**< Block size, in bytes, rounded towards 0 */
uint8_t bw; /**< Block width, in pixels */
uint8_t bh; /**< Block height, in pixels */