};
enum ilo_builder_item_type {
- /* for state buffer */
+ /* for dynamic buffer */
ILO_BUILDER_ITEM_BLOB,
ILO_BUILDER_ITEM_CLIP_VIEWPORT,
ILO_BUILDER_ITEM_SF_VIEWPORT,
}
/**
- * Reserve a region from the state buffer. Both the offset, in bytes, and the
- * pointer to the reserved region are returned. The pointer is only valid
+ * Reserve a region from the dynamic buffer. Both the offset, in bytes, and
+ * the pointer to the reserved region are returned. The pointer is only valid
* until the next reserve call.
*
* Note that \p alignment is in bytes and \p len is in DWords.
*/
static inline uint32_t
-ilo_builder_state_pointer(struct ilo_builder *builder,
- enum ilo_builder_item_type item,
- unsigned alignment, unsigned len,
- uint32_t **dw)
+ilo_builder_dynamic_pointer(struct ilo_builder *builder,
+ enum ilo_builder_item_type item,
+ unsigned alignment, unsigned len,
+ uint32_t **dw)
{
const enum ilo_builder_writer_type which = ILO_BUILDER_WRITER_BATCH;
const unsigned size = len << 2;
}
/**
- * Write a dynamic state to the state buffer.
+ * Write a dynamic state to the dynamic buffer.
*/
static inline uint32_t
-ilo_builder_state_write(struct ilo_builder *builder,
- enum ilo_builder_item_type item,
- unsigned alignment, unsigned len,
- const uint32_t *dw)
+ilo_builder_dynamic_write(struct ilo_builder *builder,
+ enum ilo_builder_item_type item,
+ unsigned alignment, unsigned len,
+ const uint32_t *dw)
{
uint32_t offset, *dst;
- offset = ilo_builder_state_pointer(builder, item, alignment, len, &dst);
+ offset = ilo_builder_dynamic_pointer(builder, item, alignment, len, &dst);
memcpy(dst, dw, len << 2);
return offset;
assert(item == ILO_BUILDER_ITEM_SURFACE ||
item == ILO_BUILDER_ITEM_BINDING_TABLE);
- return ilo_builder_state_write(builder, item, alignment, len, dw);
+ return ilo_builder_dynamic_write(builder, item, alignment, len, dw);
}
/**
*/
assert(num_viewports && num_viewports <= 16);
- state_offset = ilo_builder_state_pointer(builder,
+ state_offset = ilo_builder_dynamic_pointer(builder,
ILO_BUILDER_ITEM_CLIP_VIEWPORT, state_align, state_len, &dw);
for (i = 0; i < num_viewports; i++) {
*/
assert(num_viewports && num_viewports <= 16);
- state_offset = ilo_builder_state_pointer(builder,
+ state_offset = ilo_builder_dynamic_pointer(builder,
ILO_BUILDER_ITEM_SF_VIEWPORT, state_align, state_len, &dw);
for (i = 0; i < num_viewports; i++) {
*/
assert(num_viewports && num_viewports <= 16);
- state_offset = ilo_builder_state_pointer(builder,
+ state_offset = ilo_builder_dynamic_pointer(builder,
ILO_BUILDER_ITEM_SF_VIEWPORT, state_align, state_len, &dw);
for (i = 0; i < num_viewports; i++) {
*/
assert(num_viewports && num_viewports <= 16);
- state_offset = ilo_builder_state_pointer(builder,
+ state_offset = ilo_builder_dynamic_pointer(builder,
ILO_BUILDER_ITEM_CC_VIEWPORT, state_align, state_len, &dw);
for (i = 0; i < num_viewports; i++) {
assert(num_viewports && num_viewports <= 16);
assert(Elements(scissor->payload) >= state_len);
- return ilo_builder_state_write(builder, ILO_BUILDER_ITEM_SCISSOR_RECT,
+ return ilo_builder_dynamic_write(builder, ILO_BUILDER_ITEM_SCISSOR_RECT,
state_align, state_len, scissor->payload);
}
ILO_DEV_ASSERT(builder->dev, 6, 7.5);
- state_offset = ilo_builder_state_pointer(builder,
+ state_offset = ilo_builder_dynamic_pointer(builder,
ILO_BUILDER_ITEM_COLOR_CALC, state_align, state_len, &dw);
dw[0] = stencil_ref->ref_value[0] << 24 |
STATIC_ASSERT(Elements(dsa->payload) >= state_len);
- return ilo_builder_state_write(builder, ILO_BUILDER_ITEM_DEPTH_STENCIL,
+ return ilo_builder_dynamic_write(builder, ILO_BUILDER_ITEM_DEPTH_STENCIL,
state_align, state_len, dsa->payload);
}
state_len = 2 * num_targets;
- state_offset = ilo_builder_state_pointer(builder,
+ state_offset = ilo_builder_dynamic_pointer(builder,
ILO_BUILDER_ITEM_BLEND, state_align, state_len, &dw);
for (i = 0; i < num_targets; i++) {
if (!num_samplers)
return 0;
- state_offset = ilo_builder_state_pointer(builder,
+ state_offset = ilo_builder_dynamic_pointer(builder,
ILO_BUILDER_ITEM_SAMPLER, state_align, state_len, &dw);
for (i = 0; i < num_samplers; i++) {
assert(Elements(sampler->payload) >= 3 + state_len);
/* see ilo_gpe_init_sampler_cso() */
- return ilo_builder_state_write(builder, ILO_BUILDER_ITEM_BLOB,
+ return ilo_builder_dynamic_write(builder, ILO_BUILDER_ITEM_BLOB,
state_align, state_len, &sampler->payload[3]);
}
ILO_DEV_ASSERT(builder->dev, 6, 7.5);
- state_offset = ilo_builder_state_pointer(builder,
+ state_offset = ilo_builder_dynamic_pointer(builder,
ILO_BUILDER_ITEM_BLOB, state_align, state_len, (uint32_t **) &buf);
/* zero out the unused range */
if (writer->used)
intel_winsys_decode_bo(builder->winsys, writer->bo, writer->used);
- ilo_printf("decoding state buffer: %d states\n",
+ ilo_printf("decoding dynamic/surface buffer: %d states\n",
writer->item_used);
ilo_builder_writer_decode_items(builder, which);
break;