anv/cmd_buffer: Take a command buffer instead of a batch in two helpers
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
@@ -1872,10 +1872,10 @@ void genX(CmdEndRenderPass)(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
emit_ps_depth_count(struct anv_batch *batch,
|
emit_ps_depth_count(struct anv_cmd_buffer *cmd_buffer,
|
||||||
struct anv_bo *bo, uint32_t offset)
|
struct anv_bo *bo, uint32_t offset)
|
||||||
{
|
{
|
||||||
anv_batch_emit(batch, GENX(PIPE_CONTROL), pc) {
|
anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) {
|
||||||
pc.DestinationAddressType = DAT_PPGTT;
|
pc.DestinationAddressType = DAT_PPGTT;
|
||||||
pc.PostSyncOperation = WritePSDepthCount;
|
pc.PostSyncOperation = WritePSDepthCount;
|
||||||
pc.DepthStallEnable = true;
|
pc.DepthStallEnable = true;
|
||||||
@@ -1884,10 +1884,10 @@ emit_ps_depth_count(struct anv_batch *batch,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
emit_query_availability(struct anv_batch *batch,
|
emit_query_availability(struct anv_cmd_buffer *cmd_buffer,
|
||||||
struct anv_bo *bo, uint32_t offset)
|
struct anv_bo *bo, uint32_t offset)
|
||||||
{
|
{
|
||||||
anv_batch_emit(batch, GENX(PIPE_CONTROL), pc) {
|
anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) {
|
||||||
pc.DestinationAddressType = DAT_PPGTT;
|
pc.DestinationAddressType = DAT_PPGTT;
|
||||||
pc.PostSyncOperation = WriteImmediateData;
|
pc.PostSyncOperation = WriteImmediateData;
|
||||||
pc.Address = (struct anv_address) { bo, offset };
|
pc.Address = (struct anv_address) { bo, offset };
|
||||||
@@ -1920,7 +1920,7 @@ void genX(CmdBeginQuery)(
|
|||||||
|
|
||||||
switch (pool->type) {
|
switch (pool->type) {
|
||||||
case VK_QUERY_TYPE_OCCLUSION:
|
case VK_QUERY_TYPE_OCCLUSION:
|
||||||
emit_ps_depth_count(&cmd_buffer->batch, &pool->bo,
|
emit_ps_depth_count(cmd_buffer, &pool->bo,
|
||||||
query * sizeof(struct anv_query_pool_slot));
|
query * sizeof(struct anv_query_pool_slot));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1940,10 +1940,10 @@ void genX(CmdEndQuery)(
|
|||||||
|
|
||||||
switch (pool->type) {
|
switch (pool->type) {
|
||||||
case VK_QUERY_TYPE_OCCLUSION:
|
case VK_QUERY_TYPE_OCCLUSION:
|
||||||
emit_ps_depth_count(&cmd_buffer->batch, &pool->bo,
|
emit_ps_depth_count(cmd_buffer, &pool->bo,
|
||||||
query * sizeof(struct anv_query_pool_slot) + 8);
|
query * sizeof(struct anv_query_pool_slot) + 8);
|
||||||
|
|
||||||
emit_query_availability(&cmd_buffer->batch, &pool->bo,
|
emit_query_availability(cmd_buffer, &pool->bo,
|
||||||
query * sizeof(struct anv_query_pool_slot) + 16);
|
query * sizeof(struct anv_query_pool_slot) + 16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1989,7 +1989,7 @@ void genX(CmdWriteTimestamp)(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
emit_query_availability(&cmd_buffer->batch, &pool->bo, query + 16);
|
emit_query_availability(cmd_buffer, &pool->bo, query + 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GEN_GEN > 7 || GEN_IS_HASWELL
|
#if GEN_GEN > 7 || GEN_IS_HASWELL
|
||||||
|
Reference in New Issue
Block a user