mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
isl: Bring back isl_format_layout::bpb
A while ago we got rid of the bits-per-block because we thought we didn't need it. We're about to introduce some very useful 1 and 2-bit formats so we really should be able to handle them again. Reviewed-by: Chad Versace <chad.versace@intel.com>
This commit is contained in:
parent
0bd3a7e931
commit
cf9ff082b4
2 changed files with 4 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue