[Mesa-dev] [PATCH 01/22] intel/blorp: Make the Z component of the primitive adjustable
Jason Ekstrand
jason at jlekstrand.net
Sat Oct 8 04:40:59 UTC 2016
We want to be able to start slow depth clears. This allows us to adjust
the depth we're clearing to.
Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/blorp/blorp_genX_exec.h | 12 ++++++------
src/intel/blorp/blorp_priv.h | 1 +
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 62f16a3..f24b495 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -171,9 +171,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);
@@ -225,7 +225,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;
@@ -344,11 +344,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 a88d0f8..a6ea0ff 100644
--- a/src/intel/blorp/blorp_priv.h
+++ b/src/intel/blorp/blorp_priv.h
@@ -179,6 +179,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;
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list