summaryrefslogtreecommitdiffstats
path: root/src/intel/blorp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-10-06 22:03:12 -0700
committerJason Ekstrand <[email protected]>2016-10-14 15:39:41 -0700
commit5dacd3caee9ff41055bd974ae1e4ba40cb2f5984 (patch)
tree890ae5176cd083b6a4f1020b04244f1cfb627a5f /src/intel/blorp
parent7cb197c3a8ca44fc359ce69ff72ef68d85f7b181 (diff)
intel/blorp: Make the Z component of the primitive adjustable
We want to be able to start doing slow depth clears with blorp. This allows us to adjust the depth we're clearing to. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel/blorp')
-rw-r--r--src/intel/blorp/blorp_genX_exec.h12
-rw-r--r--src/intel/blorp/blorp_priv.h1
2 files changed, 7 insertions, 6 deletions
diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h
index 88171bea53e..b1af064ad01 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -174,9 +174,9 @@ blorp_emit_vertex_data(struct blorp_batch *batch,
uint32_t *size)
{
const float vertices[] = {
- /* v0 */ (float)params->x1, (float)params->y1,
- /* v1 */ (float)params->x0, (float)params->y1,
- /* v2 */ (float)params->x0, (float)params->y0,
+ /* v0 */ (float)params->x1, (float)params->y1, params->z,
+ /* v1 */ (float)params->x0, (float)params->y1, params->z,
+ /* v2 */ (float)params->x0, (float)params->y0, params->z,
};
void *data = blorp_alloc_vertex_buffer(batch, sizeof(vertices), addr);
@@ -228,7 +228,7 @@ blorp_emit_vertex_buffers(struct blorp_batch *batch,
uint32_t size;
blorp_emit_vertex_data(batch, params, &vb[0].BufferStartingAddress, &size);
vb[0].VertexBufferIndex = 0;
- vb[0].BufferPitch = 2 * sizeof(float);
+ vb[0].BufferPitch = 3 * sizeof(float);
vb[0].VertexBufferMOCS = batch->blorp->mocs.vb;
#if GEN_GEN >= 7
vb[0].AddressModifyEnable = true;
@@ -347,11 +347,11 @@ blorp_emit_vertex_elements(struct blorp_batch *batch,
ve[1].VertexBufferIndex = 0;
ve[1].Valid = true;
- ve[1].SourceElementFormat = ISL_FORMAT_R32G32_FLOAT;
+ ve[1].SourceElementFormat = ISL_FORMAT_R32G32B32_FLOAT;
ve[1].SourceElementOffset = 0;
ve[1].Component0Control = VFCOMP_STORE_SRC;
ve[1].Component1Control = VFCOMP_STORE_SRC;
- ve[1].Component2Control = VFCOMP_STORE_0;
+ ve[1].Component2Control = VFCOMP_STORE_SRC;
ve[1].Component3Control = VFCOMP_STORE_1_FP;
for (unsigned i = 0; i < num_varyings; ++i) {
diff --git a/src/intel/blorp/blorp_priv.h b/src/intel/blorp/blorp_priv.h
index ba4c94c5ac7..c7989d9974c 100644
--- a/src/intel/blorp/blorp_priv.h
+++ b/src/intel/blorp/blorp_priv.h
@@ -180,6 +180,7 @@ struct blorp_params
uint32_t y0;
uint32_t x1;
uint32_t y1;
+ float z;
struct brw_blorp_surface_info depth;
uint32_t depth_format;
struct brw_blorp_surface_info src;