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_surface_state.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_surface_state.c')
-rw-r--r-- | src/intel/isl/isl_surface_state.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 1a1a8191b88..0dfeeaf9044 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -243,6 +243,15 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state, assert(isl_format_supports_rendering(dev->info, info->view->format)); else if (info->view->usage & ISL_SURF_USAGE_TEXTURE_BIT) assert(isl_format_supports_sampling(dev->info, info->view->format)); + + /* From the Sky Lake PRM Vol. 2d, RENDER_SURFACE_STATE::SurfaceFormat + * + * This field cannot be a compressed (BC*, DXT*, FXT*, ETC*, EAC*) + * format if the Surface Type is SURFTYPE_1D + */ + if (info->surf->dim == ISL_SURF_DIM_1D) + assert(!isl_format_is_compressed(info->view->format)); + s.SurfaceFormat = info->view->format; #if GEN_IS_HASWELL |