[Mesa-dev] [PATCH 3/4] intel/blorp: Make the MOCS setting part of blorp_address
Kenneth Graunke
kenneth at whitecape.org
Mon Nov 13 23:27:35 UTC 2017
On Friday, November 3, 2017 4:17:33 PM PST Jason Ekstrand wrote:
> This makes our MOCS settings significantly more flexible.
> ---
> src/intel/blorp/blorp.h | 7 +------
> src/intel/blorp/blorp_genX_exec.h | 16 +++++++--------
> src/intel/vulkan/anv_blorp.c | 12 ++++++++---
> src/intel/vulkan/genX_blorp_exec.c | 1 +
> src/mesa/drivers/dri/i965/brw_blorp.c | 31 +++++++++++++++--------------
> src/mesa/drivers/dri/i965/genX_blorp_exec.c | 10 ++++++++++
> 6 files changed, 44 insertions(+), 33 deletions(-)
>
> diff --git a/src/intel/blorp/blorp.h b/src/intel/blorp/blorp.h
> index 9716c66..31eb1ec 100644
> --- a/src/intel/blorp/blorp.h
> +++ b/src/intel/blorp/blorp.h
> @@ -45,12 +45,6 @@ struct blorp_context {
>
> const struct brw_compiler *compiler;
>
> - struct {
> - uint32_t tex;
> - uint32_t rb;
> - uint32_t vb;
> - } mocs;
> -
> bool (*lookup_shader)(struct blorp_context *blorp,
> const void *key, uint32_t key_size,
> uint32_t *kernel_out, void *prog_data_out);
> @@ -94,6 +88,7 @@ struct blorp_address {
> void *buffer;
> unsigned reloc_flags;
> uint32_t offset;
> + uint32_t mocs;
> };
>
> struct blorp_surf
> diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h
> index ccbfe51..f11a1cc 100644
> --- a/src/intel/blorp/blorp_genX_exec.h
> +++ b/src/intel/blorp/blorp_genX_exec.h
> @@ -269,7 +269,7 @@ blorp_emit_vertex_buffers(struct blorp_batch *batch,
> vb[0].VertexBufferIndex = 0;
> vb[0].BufferPitch = 3 * sizeof(float);
> #if GEN_GEN >= 6
> - vb[0].VertexBufferMOCS = batch->blorp->mocs.vb;
> + vb[0].VertexBufferMOCS = vb[0].BufferStartingAddress.mocs;
> #endif
> #if GEN_GEN >= 7
> vb[0].AddressModifyEnable = true;
> @@ -290,7 +290,7 @@ blorp_emit_vertex_buffers(struct blorp_batch *batch,
> vb[1].VertexBufferIndex = 1;
> vb[1].BufferPitch = 0;
> #if GEN_GEN >= 6
> - vb[1].VertexBufferMOCS = batch->blorp->mocs.vb;
> + vb[0].VertexBufferMOCS = vb[1].BufferStartingAddress.mocs;
I think you mean vb[1] here!
With that fixes, patches 1-3 are
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171113/df534097/attachment.sig>
More information about the mesa-dev
mailing list