diff options
author | Jason Ekstrand <[email protected]> | 2016-09-12 17:43:28 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-10-03 14:53:01 -0700 |
commit | baade41a5c0c0342ad9db4b5123714dcedc66937 (patch) | |
tree | e01d24e522bdca817f102c2a657746f42c00cf0c /src/intel/isl/isl.c | |
parent | f82166578f17306d8ae16fdbc753de3e00d2a97d (diff) |
intel/isl: Allow creation of 1-D compressed textures
Compressed 1-D textures are not well-defined thing in either GL or Vulkan.
However, auxiliary surfaces are treated as compressed textures in ISL and
we can do HiZ and CCS with 1-D so we need to be able to create them. In
order to prevent actually using them (the docs say no), we assert in the
state setup code.
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src/intel/isl/isl.c')
-rw-r--r-- | src/intel/isl/isl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 18e94d3a92a..26ee4c4452e 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -540,7 +540,6 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev, assert(info->height == 1); assert(info->depth == 1); assert(info->samples == 1); - assert(!isl_format_is_compressed(info->format)); switch (dim_layout) { case ISL_DIM_LAYOUT_GEN4_3D: @@ -549,8 +548,8 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev, case ISL_DIM_LAYOUT_GEN9_1D: case ISL_DIM_LAYOUT_GEN4_2D: *phys_level0_sa = (struct isl_extent4d) { - .w = info->width, - .h = 1, + .w = isl_align_npot(info->width, fmtl->bw), + .h = fmtl->bh, .d = 1, .a = info->array_len, }; |