summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-09-25 14:46:33 +0800
committerChia-I Wu <[email protected]>2014-09-26 21:15:55 +0800
commit2df2f60e8db7e2fe4d59377c8c849d6e8eb6234e (patch)
treece3f38bac114933bbdd00e2df6fcc5835098df49 /src
parenta7f2ab668c98226c3bbc370f8e48ca0f02b05009 (diff)
ilo: rename state buffer to dynamic buffer
Both dynamic buffer and surface buffer are state buffers. We should not use state buffer to refer to the former. Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/ilo/ilo_builder.h28
-rw-r--r--src/gallium/drivers/ilo/ilo_builder_3d_bottom.h16
-rw-r--r--src/gallium/drivers/ilo/ilo_builder_3d_top.h6
-rw-r--r--src/gallium/drivers/ilo/ilo_builder_decode.c2
4 files changed, 26 insertions, 26 deletions
diff --git a/src/gallium/drivers/ilo/ilo_builder.h b/src/gallium/drivers/ilo/ilo_builder.h
index ab1ee11dce6..8203f669806 100644
--- a/src/gallium/drivers/ilo/ilo_builder.h
+++ b/src/gallium/drivers/ilo/ilo_builder.h
@@ -39,7 +39,7 @@ enum ilo_builder_writer_type {
};
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,
@@ -264,17 +264,17 @@ ilo_builder_writer_reloc(struct ilo_builder *builder,
}
/**
- * 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;
@@ -295,17 +295,17 @@ ilo_builder_state_pointer(struct ilo_builder *builder,
}
/**
- * 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;
@@ -326,7 +326,7 @@ ilo_builder_surface_write(struct ilo_builder *builder,
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);
}
/**
diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h b/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h
index 27279b332d1..83b266e0329 100644
--- a/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h
+++ b/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h
@@ -984,7 +984,7 @@ gen6_CLIP_VIEWPORT(struct ilo_builder *builder,
*/
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++) {
@@ -1021,7 +1021,7 @@ gen6_SF_VIEWPORT(struct ilo_builder *builder,
*/
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++) {
@@ -1066,7 +1066,7 @@ gen7_SF_CLIP_VIEWPORT(struct ilo_builder *builder,
*/
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++) {
@@ -1114,7 +1114,7 @@ gen6_CC_VIEWPORT(struct ilo_builder *builder,
*/
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++) {
@@ -1148,7 +1148,7 @@ gen6_SCISSOR_RECT(struct ilo_builder *builder,
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);
}
@@ -1164,7 +1164,7 @@ gen6_COLOR_CALC_STATE(struct ilo_builder *builder,
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 |
@@ -1190,7 +1190,7 @@ gen6_DEPTH_STENCIL_STATE(struct ilo_builder *builder,
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);
}
@@ -1224,7 +1224,7 @@ gen6_BLEND_STATE(struct ilo_builder *builder,
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++) {
diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_top.h b/src/gallium/drivers/ilo/ilo_builder_3d_top.h
index 4b08b829141..fb7b92740f3 100644
--- a/src/gallium/drivers/ilo/ilo_builder_3d_top.h
+++ b/src/gallium/drivers/ilo/ilo_builder_3d_top.h
@@ -1490,7 +1490,7 @@ gen6_SAMPLER_STATE(struct ilo_builder *builder,
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++) {
@@ -1587,7 +1587,7 @@ gen6_SAMPLER_BORDER_COLOR_STATE(struct ilo_builder *builder,
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]);
}
@@ -1606,7 +1606,7 @@ gen6_push_constant_buffer(struct ilo_builder *builder,
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 */
diff --git a/src/gallium/drivers/ilo/ilo_builder_decode.c b/src/gallium/drivers/ilo/ilo_builder_decode.c
index d4370bf4200..470c1ae0989 100644
--- a/src/gallium/drivers/ilo/ilo_builder_decode.c
+++ b/src/gallium/drivers/ilo/ilo_builder_decode.c
@@ -545,7 +545,7 @@ ilo_builder_writer_decode(struct ilo_builder *builder,
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;