intel/blorp: Add a flag to make blorp not re-emit dept/stencil buffers

In Vulkan, we want to be able to use blorp to perform clears inside of a
render pass.  If blorp stomps the depth/stencil buffers packets then we'll
have to re-emit them.  This gets tricky when secondary command buffers get
involved.  Instead, we'll simply guarantee that the depth and stencil
buffers we pass to blorp (if any) match those already set in the hardware.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
Jason Ekstrand
2016-10-07 17:20:00 -07:00
parent 0cabf93b80
commit d80c0307ea
5 changed files with 32 additions and 18 deletions

View File

@@ -67,13 +67,24 @@ void blorp_init(struct blorp_context *blorp, void *driver_ctx,
struct isl_device *isl_dev);
void blorp_finish(struct blorp_context *blorp);
enum blorp_batch_flags {
/**
* This flag indicates that blorp should *not* re-emit the depth and
* stencil buffer packets. Instead, the driver guarantees that all depth
* and stencil images passed in will match what is currently set in the
* hardware.
*/
BLORP_BATCH_NO_EMIT_DEPTH_STENCIL = (1 << 0),
};
struct blorp_batch {
struct blorp_context *blorp;
void *driver_batch;
enum blorp_batch_flags flags;
};
void blorp_batch_init(struct blorp_context *blorp, struct blorp_batch *batch,
void *driver_batch);
void *driver_batch, enum blorp_batch_flags flags);
void blorp_batch_finish(struct blorp_batch *batch);
struct blorp_address {