radeonsi: add new si_decompress_color_texture() helper
For bindless. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
6646212de0
commit
fbcc8664fd
|
@ -468,6 +468,19 @@ static void si_blit_decompress_color(struct pipe_context *ctx,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
si_decompress_color_texture(struct si_context *sctx, struct r600_texture *tex,
|
||||||
|
unsigned first_level, unsigned last_level)
|
||||||
|
{
|
||||||
|
/* CMASK or DCC can be discarded and we can still end up here. */
|
||||||
|
if (!tex->cmask.size && !tex->fmask.size && !tex->dcc_offset)
|
||||||
|
return;
|
||||||
|
|
||||||
|
si_blit_decompress_color(&sctx->b.b, tex, first_level, last_level, 0,
|
||||||
|
util_max_layer(&tex->resource.b.b, first_level),
|
||||||
|
false);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
si_decompress_sampler_color_textures(struct si_context *sctx,
|
si_decompress_sampler_color_textures(struct si_context *sctx,
|
||||||
struct si_textures_info *textures)
|
struct si_textures_info *textures)
|
||||||
|
@ -485,14 +498,9 @@ si_decompress_sampler_color_textures(struct si_context *sctx,
|
||||||
assert(view);
|
assert(view);
|
||||||
|
|
||||||
tex = (struct r600_texture *)view->texture;
|
tex = (struct r600_texture *)view->texture;
|
||||||
/* CMASK or DCC can be discarded and we can still end up here. */
|
|
||||||
if (!tex->cmask.size && !tex->fmask.size && !tex->dcc_offset)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
si_blit_decompress_color(&sctx->b.b, tex,
|
si_decompress_color_texture(sctx, tex, view->u.tex.first_level,
|
||||||
view->u.tex.first_level, view->u.tex.last_level,
|
view->u.tex.last_level);
|
||||||
0, util_max_layer(&tex->resource.b.b, view->u.tex.first_level),
|
|
||||||
false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -513,13 +521,9 @@ si_decompress_image_color_textures(struct si_context *sctx,
|
||||||
assert(view->resource->target != PIPE_BUFFER);
|
assert(view->resource->target != PIPE_BUFFER);
|
||||||
|
|
||||||
tex = (struct r600_texture *)view->resource;
|
tex = (struct r600_texture *)view->resource;
|
||||||
if (!tex->cmask.size && !tex->fmask.size && !tex->dcc_offset)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
si_blit_decompress_color(&sctx->b.b, tex,
|
si_decompress_color_texture(sctx, tex, view->u.tex.level,
|
||||||
view->u.tex.level, view->u.tex.level,
|
view->u.tex.level);
|
||||||
0, util_max_layer(&tex->resource.b.b, view->u.tex.level),
|
|
||||||
false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue