summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_clear.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-08-03 16:18:09 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:08 -0800
commit7972599eab442f5692d0a0496a8ebb5ea4df0ddf (patch)
treefab099cff38e65cc522d6cbb6552405b0f87acee /src/gallium/drivers/iris/iris_clear.c
parent753646dd6bd83007494cc2fb1405b08dea92c36c (diff)
iris: actually emit stencil packets
Diffstat (limited to 'src/gallium/drivers/iris/iris_clear.c')
-rw-r--r--src/gallium/drivers/iris/iris_clear.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c
index 2ee70855bf8..d05e69df16b 100644
--- a/src/gallium/drivers/iris/iris_clear.c
+++ b/src/gallium/drivers/iris/iris_clear.c
@@ -35,24 +35,6 @@
#include "iris_screen.h"
#include "intel/compiler/brw_compiler.h"
-static void
-split_depth_stencil_resources(struct pipe_resource *res,
- struct pipe_resource **out_z,
- struct pipe_resource **out_s)
-{
- const struct util_format_description *desc =
- util_format_description(res->format);
-
- if (util_format_has_depth(desc)) {
- *out_z = res;
- *out_s = iris_resource_get_separate_stencil(res);
- } else {
- assert(util_format_has_stencil(desc));
- *out_z = NULL;
- *out_s = res;
- }
-}
-
/**
* The pipe->clear() driver hook.
*
@@ -78,22 +60,22 @@ iris_clear(struct pipe_context *ctx,
if (buffers & PIPE_CLEAR_DEPTHSTENCIL) {
struct pipe_surface *psurf = cso_fb->zsbuf;
- struct pipe_resource *z_res;
- struct pipe_resource *stencil_res;
+ struct iris_resource *z_res;
+ struct iris_resource *stencil_res;
struct blorp_surf z_surf;
struct blorp_surf stencil_surf;
const unsigned num_layers =
psurf->u.tex.last_layer - psurf->u.tex.first_layer + 1;
- split_depth_stencil_resources(psurf->texture, &z_res, &stencil_res);
+ iris_get_depth_stencil_resources(psurf->texture, &z_res, &stencil_res);
if (z_res) {
- iris_blorp_surf_for_resource(&z_surf, z_res,
+ iris_blorp_surf_for_resource(&z_surf, &z_res->base,
ISL_AUX_USAGE_NONE, true);
}
if (stencil_res) {
- iris_blorp_surf_for_resource(&stencil_surf, stencil_res,
+ iris_blorp_surf_for_resource(&stencil_surf, &stencil_res->base,
ISL_AUX_USAGE_NONE, true);
}