diff options
Diffstat (limited to 'src/intel/isl')
-rw-r--r-- | src/intel/isl/isl.c | 19 | ||||
-rw-r--r-- | src/intel/isl/isl.h | 11 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 32463b12982..658650ba6f3 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -46,6 +46,20 @@ __isl_finishme(const char *file, int line, const char *fmt, ...) fprintf(stderr, "%s:%d: FINISHME: %s\n", file, line, buf); } +static const struct { + uint8_t size; + uint8_t align; + uint8_t addr_offset; + uint8_t aux_addr_offset; +} ss_infos[] = { + [4] = {24, 32, 4}, + [5] = {24, 32, 4}, + [6] = {24, 32, 4}, + [7] = {32, 32, 4, 24}, + [8] = {52, 64, 32, 40}, + [9] = {64, 64, 32, 40}, +}; + void isl_device_init(struct isl_device *dev, const struct gen_device_info *info, @@ -67,6 +81,11 @@ isl_device_init(struct isl_device *dev, assert(info->has_hiz_and_separate_stencil); if (info->must_use_separate_stencil) assert(ISL_DEV_USE_SEPARATE_STENCIL(dev)); + + dev->ss.size = ss_infos[ISL_DEV_GEN(dev)].size; + dev->ss.align = ss_infos[ISL_DEV_GEN(dev)].align; + dev->ss.addr_offset = ss_infos[ISL_DEV_GEN(dev)].addr_offset; + dev->ss.aux_addr_offset = ss_infos[ISL_DEV_GEN(dev)].aux_addr_offset; } /** diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index 11ad8919e64..07368f9bcf5 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -671,6 +671,17 @@ struct isl_device { const struct gen_device_info *info; bool use_separate_stencil; bool has_bit6_swizzling; + + /** + * Describes the layout of a RENDER_SURFACE_STATE structure for the + * current gen. + */ + struct { + uint8_t size; + uint8_t align; + uint8_t addr_offset; + uint8_t aux_addr_offset; + } ss; }; struct isl_extent2d { |