mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
anv/cmd_buffer: Add a helper for getting the surface state base address
This commit is contained in:
parent
e1a7c721d3
commit
bc17f9c9d7
4 changed files with 13 additions and 2 deletions
|
|
@ -395,6 +395,15 @@ anv_cmd_buffer_current_surface_relocs(struct anv_cmd_buffer *cmd_buffer)
|
||||||
return &anv_cmd_buffer_current_surface_bbo(cmd_buffer)->relocs;
|
return &anv_cmd_buffer_current_surface_bbo(cmd_buffer)->relocs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct anv_address
|
||||||
|
anv_cmd_buffer_surface_base_address(struct anv_cmd_buffer *cmd_buffer)
|
||||||
|
{
|
||||||
|
return (struct anv_address) {
|
||||||
|
.bo = anv_cmd_buffer_current_surface_bo(cmd_buffer),
|
||||||
|
.offset = 0,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
emit_batch_buffer_start(struct anv_batch *batch, struct anv_bo *bo, uint32_t offset)
|
emit_batch_buffer_start(struct anv_batch *batch, struct anv_bo *bo, uint32_t offset)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -897,6 +897,8 @@ struct anv_bo *
|
||||||
anv_cmd_buffer_current_surface_bo(struct anv_cmd_buffer *cmd_buffer);
|
anv_cmd_buffer_current_surface_bo(struct anv_cmd_buffer *cmd_buffer);
|
||||||
struct anv_reloc_list *
|
struct anv_reloc_list *
|
||||||
anv_cmd_buffer_current_surface_relocs(struct anv_cmd_buffer *cmd_buffer);
|
anv_cmd_buffer_current_surface_relocs(struct anv_cmd_buffer *cmd_buffer);
|
||||||
|
struct anv_address
|
||||||
|
anv_cmd_buffer_surface_base_address(struct anv_cmd_buffer *cmd_buffer);
|
||||||
struct anv_state
|
struct anv_state
|
||||||
anv_cmd_buffer_alloc_surface_state(struct anv_cmd_buffer *cmd_buffer,
|
anv_cmd_buffer_alloc_surface_state(struct anv_cmd_buffer *cmd_buffer,
|
||||||
uint32_t size, uint32_t alignment);
|
uint32_t size, uint32_t alignment);
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ gen7_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer)
|
||||||
.GeneralStateAccessUpperBound = { scratch_bo, scratch_bo->size },
|
.GeneralStateAccessUpperBound = { scratch_bo, scratch_bo->size },
|
||||||
.GeneralStateAccessUpperBoundModifyEnable = true,
|
.GeneralStateAccessUpperBoundModifyEnable = true,
|
||||||
|
|
||||||
.SurfaceStateBaseAddress = { anv_cmd_buffer_current_surface_bo(cmd_buffer), 0 },
|
.SurfaceStateBaseAddress = anv_cmd_buffer_surface_base_address(cmd_buffer),
|
||||||
.SurfaceStateMemoryObjectControlState = GEN7_MOCS,
|
.SurfaceStateMemoryObjectControlState = GEN7_MOCS,
|
||||||
.SurfaceStateBaseAddressModifyEnable = true,
|
.SurfaceStateBaseAddressModifyEnable = true,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -824,7 +824,7 @@ gen8_cmd_buffer_emit_state_base_address(struct anv_cmd_buffer *cmd_buffer)
|
||||||
.GeneralStateBufferSize = 0xfffff,
|
.GeneralStateBufferSize = 0xfffff,
|
||||||
.GeneralStateBufferSizeModifyEnable = true,
|
.GeneralStateBufferSizeModifyEnable = true,
|
||||||
|
|
||||||
.SurfaceStateBaseAddress = { anv_cmd_buffer_current_surface_bo(cmd_buffer), 0 },
|
.SurfaceStateBaseAddress = anv_cmd_buffer_surface_base_address(cmd_buffer),
|
||||||
.SurfaceStateMemoryObjectControlState = GEN8_MOCS,
|
.SurfaceStateMemoryObjectControlState = GEN8_MOCS,
|
||||||
.SurfaceStateBaseAddressModifyEnable = true,
|
.SurfaceStateBaseAddressModifyEnable = true,
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue