mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 17:10:11 +01:00
iris: Simplify iris_get_depth_stencil_resources
We can safely assume that the given resource is depth, depth/stencil, or stencil already. The stencil-only case is easily detectable with a single format check, and all other cases are handled identically. This saves some CPU overhead.
This commit is contained in:
parent
07ec1f0b25
commit
1b5c342f33
1 changed files with 1 additions and 5 deletions
|
|
@ -187,14 +187,10 @@ iris_get_depth_stencil_resources(struct pipe_resource *res,
|
|||
return;
|
||||
}
|
||||
|
||||
const struct util_format_description *desc =
|
||||
util_format_description(res->format);
|
||||
|
||||
if (util_format_has_depth(desc)) {
|
||||
if (res->format != PIPE_FORMAT_S8_UINT) {
|
||||
*out_z = (void *) res;
|
||||
*out_s = (void *) iris_resource_get_separate_stencil(res);
|
||||
} else {
|
||||
assert(util_format_has_stencil(desc));
|
||||
*out_z = NULL;
|
||||
*out_s = (void *) res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue