memcpy(tmp_data.map, pData, copy_size);
- anv_state_flush(cmd_buffer->device, tmp_data);
-
struct blorp_address src = {
.buffer = cmd_buffer->device->dynamic_state_pool.block_pool.bo,
.offset = tmp_data.offset,
state = anv_cmd_buffer_alloc_dynamic_state(cmd_buffer, size, alignment);
memcpy(state.map, data, size);
- anv_state_flush(cmd_buffer->device, state);
-
VG(VALGRIND_CHECK_MEM_IS_DEFINED(state.map, size));
return state;
for (uint32_t i = 0; i < dwords; i++)
p[i] = a[i] | b[i];
- anv_state_flush(cmd_buffer->device, state);
-
VG(VALGRIND_CHECK_MEM_IS_DEFINED(p, dwords * 4));
return state;
for (unsigned i = 0; i < prog_data->nr_params; i++)
u32_map[i] = anv_push_constant_value(data, prog_data->param[i]);
- anv_state_flush(cmd_buffer->device, state);
-
return state;
}
}
}
- anv_state_flush(cmd_buffer->device, state);
-
return state;
}
state = anv_state_pool_alloc(pool, size, align);
memcpy(state.map, p, size);
- anv_state_flush(pool->block_pool.device, state);
-
return state;
}
.size_B = range,
.format = format,
.stride_B = stride);
-
- anv_state_flush(device, state);
}
void anv_DestroySampler(
}
}
- anv_state_flush(device, state_inout->state);
-
if (image_param_out) {
assert(view_usage == ISL_SURF_USAGE_STORAGE_BIT);
isl_surf_fill_image_param(&device->isl_dev, image_param_out,
return device->default_mocs;
}
-static void inline
-anv_state_flush(struct anv_device *device, struct anv_state state)
-{
- if (device->info.has_llc)
- return;
-
- gen_flush_range(state.map, state.alloc_size);
-}
-
void anv_device_init_blorp(struct anv_device *device);
void anv_device_finish_blorp(struct anv_device *device);
GEN7_3DSTATE_SCISSOR_STATE_POINTERS, ssp) {
ssp.ScissorRectPointer = scissor_state.offset;
}
-
- anv_state_flush(cmd_buffer->device, scissor_state);
}
#endif
.BackfaceStencilReferenceValue = d->stencil_reference.back & 0xff,
};
GENX(COLOR_CALC_STATE_pack)(NULL, cc_state.map, &cc);
- anv_state_flush(cmd_buffer->device, cc_state);
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CC_STATE_POINTERS), ccp) {
ccp.ColorCalcStatePointer = cc_state.offset;
&sf_clip_viewport);
}
- anv_state_flush(cmd_buffer->device, sf_clip_state);
-
anv_batch_emit(&cmd_buffer->batch,
GENX(3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP), clip) {
clip.SFClipViewportPointer = sf_clip_state.offset;
GENX(CC_VIEWPORT_pack)(NULL, cc_state.map + i * 8, &cc_viewport);
}
- anv_state_flush(cmd_buffer->device, cc_state);
-
anv_batch_emit(&cmd_buffer->batch,
GENX(3DSTATE_VIEWPORT_STATE_POINTERS_CC), cc) {
cc.CCViewportPointer = cc_state.offset;
};
GENX(COLOR_CALC_STATE_pack)(NULL, cc_state.map, &cc);
- anv_state_flush(cmd_buffer->device, cc_state);
-
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CC_STATE_POINTERS), ccp) {
ccp.ColorCalcStatePointer = cc_state.offset;
ccp.ColorCalcStatePointerValid = true;
};
GENX(COLOR_CALC_STATE_pack)(NULL, cc_state.map, &cc);
- anv_state_flush(cmd_buffer->device, cc_state);
-
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CC_STATE_POINTERS), ccp) {
ccp.ColorCalcStatePointer = cc_state.offset;
ccp.ColorCalcStatePointerValid = true;
surface_offsets[i] = surface_state.offset;
surface_maps[i] = surface_state.map;
}
-
- anv_state_flush(cmd_buffer->device, bt_state);
}
static void *
static void
blorp_flush_range(struct blorp_batch *batch, void *start, size_t size)
{
- struct anv_device *device = batch->blorp->driver_ctx;
- if (!device->info.has_llc)
- gen_flush_range(start, size);
+ /* We don't need to flush states anymore, since everything will be snooped.
+ */
}
static void
assert(image == map->image_count);
out:
- anv_state_flush(cmd_buffer->device, *bt_state);
-
#if GEN_GEN >= 11
/* The PIPE_CONTROL command description says:
*
sampler->state[binding->plane], sizeof(sampler->state[0]));
}
- anv_state_flush(cmd_buffer->device, *state);
-
return VK_SUCCESS;
}
((uint32_t *)id_state.map)[0] = base_vertex;
((uint32_t *)id_state.map)[1] = base_instance;
- anv_state_flush(cmd_buffer->device, id_state);
-
struct anv_address addr = {
.bo = cmd_buffer->device->dynamic_state_pool.block_pool.bo,
.offset = id_state.offset,
((uint32_t *)state.map)[0] = draw_index;
- anv_state_flush(cmd_buffer->device, state);
-
struct anv_address addr = {
.bo = cmd_buffer->device->dynamic_state_pool.block_pool.bo,
.offset = state.offset,
sizes[0] = groupCountX;
sizes[1] = groupCountY;
sizes[2] = groupCountZ;
- anv_state_flush(cmd_buffer->device, state);
cmd_buffer->state.compute.num_workgroups = (struct anv_address) {
.bo = cmd_buffer->device->dynamic_state_pool.block_pool.bo,
.offset = state.offset,
#endif
GENX(BLEND_STATE_pack)(NULL, pipeline->blend_state.map, &blend_state);
- anv_state_flush(device, pipeline->blend_state);
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_BLEND_STATE_POINTERS), bsp) {
bsp.BlendStatePointer = pipeline->blend_state.offset;