* map it as 8-bit BGRA.
*/
format = ISL_FORMAT_B8G8R8A8_UNORM;
- } else if (surf->surf->usage & ISL_SURF_USAGE_STENCIL_BIT) {
- assert(surf->surf->format == ISL_FORMAT_R8_UINT);
- /* Prior to Broadwell, we can't render to R8_UINT */
- if (blorp->isl_dev->info->gen < 8)
- format = ISL_FORMAT_R8_UNORM;
}
info->surf = *surf->surf;
struct blorp_params params;
blorp_params_init(¶ms);
+ if (dst_surf->surf->usage & ISL_SURF_USAGE_STENCIL_BIT) {
+ assert(src_surf->surf->usage & ISL_SURF_USAGE_STENCIL_BIT);
+ /* Prior to Broadwell, we can't render to R8_UINT */
+ if (batch->blorp->isl_dev->info->gen < 8) {
+ src_format = ISL_FORMAT_R8_UNORM;
+ dst_format = ISL_FORMAT_R8_UNORM;
+ }
+ }
+
brw_blorp_surface_info_init(batch->blorp, ¶ms.src, src_surf, src_level,
src_layer, src_format, false);
brw_blorp_surface_info_init(batch->blorp, ¶ms.dst, dst_surf, dst_level,