Remove InputStepMode (it was deprecated in favor of VertexStepMode)
Bug: dawn:1023 Change-Id: Ie5bb84f34f62143f92b59a816c7976f358b5c102 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59665 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
fd35aa8e47
commit
c6cbe3fda6
|
@ -63,8 +63,8 @@ transform::VertexBufferLayoutDescriptor ExtractVertexBufferLayoutDescriptor(
|
|||
Reader* r) {
|
||||
transform::VertexBufferLayoutDescriptor desc;
|
||||
desc.array_stride = r->read<uint32_t>();
|
||||
desc.step_mode = r->enum_class<transform::InputStepMode>(
|
||||
static_cast<uint8_t>(transform::InputStepMode::kLastEntry) + 1);
|
||||
desc.step_mode = r->enum_class<transform::VertexStepMode>(
|
||||
static_cast<uint8_t>(transform::VertexStepMode::kLastEntry) + 1);
|
||||
desc.attributes = r->vector(ExtractVertexAttributeDescriptor);
|
||||
return desc;
|
||||
}
|
||||
|
|
|
@ -298,7 +298,7 @@ struct State {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
auto* index_expr = buffer_layout.step_mode == InputStepMode::kVertex
|
||||
auto* index_expr = buffer_layout.step_mode == VertexStepMode::kVertex
|
||||
? vertex_index_expr()
|
||||
: instance_index_expr();
|
||||
|
||||
|
@ -860,7 +860,7 @@ struct State {
|
|||
// Insert new parameters for vertex_index and instance_index if needed.
|
||||
if (!vertex_index_expr) {
|
||||
for (const VertexBufferLayoutDescriptor& layout : cfg.vertex_state) {
|
||||
if (layout.step_mode == InputStepMode::kVertex) {
|
||||
if (layout.step_mode == VertexStepMode::kVertex) {
|
||||
auto name = ctx.dst->Symbols().New("tint_pulling_vertex_index");
|
||||
new_function_parameters.push_back(
|
||||
ctx.dst->Param(name, ctx.dst->ty.u32(),
|
||||
|
@ -872,7 +872,7 @@ struct State {
|
|||
}
|
||||
if (!instance_index_expr) {
|
||||
for (const VertexBufferLayoutDescriptor& layout : cfg.vertex_state) {
|
||||
if (layout.step_mode == InputStepMode::kInstance) {
|
||||
if (layout.step_mode == VertexStepMode::kInstance) {
|
||||
auto name = ctx.dst->Symbols().New("tint_pulling_instance_index");
|
||||
new_function_parameters.push_back(
|
||||
ctx.dst->Param(name, ctx.dst->ty.u32(),
|
||||
|
@ -945,7 +945,7 @@ VertexBufferLayoutDescriptor::VertexBufferLayoutDescriptor() = default;
|
|||
|
||||
VertexBufferLayoutDescriptor::VertexBufferLayoutDescriptor(
|
||||
uint32_t in_array_stride,
|
||||
InputStepMode in_step_mode,
|
||||
VertexStepMode in_step_mode,
|
||||
std::vector<VertexAttributeDescriptor> in_attributes)
|
||||
: array_stride(in_array_stride),
|
||||
step_mode(in_step_mode),
|
||||
|
|
|
@ -65,9 +65,6 @@ enum class VertexFormat {
|
|||
/// index
|
||||
enum class VertexStepMode { kVertex, kInstance, kLastEntry = kInstance };
|
||||
|
||||
/// Deprecated
|
||||
using InputStepMode = VertexStepMode;
|
||||
|
||||
/// Describes a vertex attribute within a buffer
|
||||
struct VertexAttributeDescriptor {
|
||||
/// The format of the attribute
|
||||
|
@ -88,7 +85,7 @@ struct VertexBufferLayoutDescriptor {
|
|||
/// @param in_attributes the in attributes
|
||||
VertexBufferLayoutDescriptor(
|
||||
uint32_t in_array_stride,
|
||||
InputStepMode in_step_mode,
|
||||
VertexStepMode in_step_mode,
|
||||
std::vector<VertexAttributeDescriptor> in_attributes);
|
||||
/// Copy constructor
|
||||
/// @param other the struct to copy
|
||||
|
@ -105,7 +102,7 @@ struct VertexBufferLayoutDescriptor {
|
|||
/// The array stride used in the in buffer
|
||||
uint32_t array_stride = 0u;
|
||||
/// The input step mode used
|
||||
InputStepMode step_mode = InputStepMode::kVertex;
|
||||
VertexStepMode step_mode = VertexStepMode::kVertex;
|
||||
/// The vertex attributes
|
||||
std::vector<VertexAttributeDescriptor> attributes;
|
||||
};
|
||||
|
|
|
@ -88,7 +88,7 @@ fn main([[location(0)]] var_a : f32) -> [[builtin(position)]] vec4<f32> {
|
|||
|
||||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {
|
||||
{{15, InputStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
{{15, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
cfg.entry_point_name = "main";
|
||||
|
||||
DataMap data;
|
||||
|
@ -157,7 +157,7 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(
|
|||
|
||||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {
|
||||
{{4, InputStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
{{4, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
cfg.entry_point_name = "main";
|
||||
|
||||
DataMap data;
|
||||
|
@ -196,7 +196,7 @@ fn main([[builtin(instance_index)]] tint_pulling_instance_index : u32) -> [[buil
|
|||
|
||||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {
|
||||
{{4, InputStepMode::kInstance, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
{{4, VertexStepMode::kInstance, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
cfg.entry_point_name = "main";
|
||||
|
||||
DataMap data;
|
||||
|
@ -235,7 +235,7 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(
|
|||
|
||||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {
|
||||
{{4, InputStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
{{4, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
cfg.pulling_group = 5;
|
||||
cfg.entry_point_name = "main";
|
||||
|
||||
|
@ -284,7 +284,7 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(
|
|||
|
||||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {
|
||||
{{4, InputStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
{{4, VertexStepMode::kVertex, {{VertexFormat::kFloat32, 0, 0}}}}};
|
||||
cfg.entry_point_name = "main";
|
||||
|
||||
DataMap data;
|
||||
|
@ -335,12 +335,12 @@ fn main([[builtin(vertex_index)]] custom_vertex_index : u32, [[builtin(instance_
|
|||
cfg.vertex_state = {{
|
||||
{
|
||||
4,
|
||||
InputStepMode::kVertex,
|
||||
VertexStepMode::kVertex,
|
||||
{{VertexFormat::kFloat32, 0, 0}},
|
||||
},
|
||||
{
|
||||
4,
|
||||
InputStepMode::kInstance,
|
||||
VertexStepMode::kInstance,
|
||||
{{VertexFormat::kFloat32, 0, 1}},
|
||||
},
|
||||
}};
|
||||
|
@ -415,12 +415,12 @@ fn main(tint_symbol_1 : tint_symbol) -> [[builtin(position)]] vec4<f32> {
|
|||
cfg.vertex_state = {{
|
||||
{
|
||||
4,
|
||||
InputStepMode::kVertex,
|
||||
VertexStepMode::kVertex,
|
||||
{{VertexFormat::kFloat32, 0, 0}},
|
||||
},
|
||||
{
|
||||
4,
|
||||
InputStepMode::kInstance,
|
||||
VertexStepMode::kInstance,
|
||||
{{VertexFormat::kFloat32, 0, 1}},
|
||||
},
|
||||
}};
|
||||
|
@ -492,12 +492,12 @@ fn main(indices : Indices) -> [[builtin(position)]] vec4<f32> {
|
|||
cfg.vertex_state = {{
|
||||
{
|
||||
4,
|
||||
InputStepMode::kVertex,
|
||||
VertexStepMode::kVertex,
|
||||
{{VertexFormat::kFloat32, 0, 0}},
|
||||
},
|
||||
{
|
||||
4,
|
||||
InputStepMode::kInstance,
|
||||
VertexStepMode::kInstance,
|
||||
{{VertexFormat::kFloat32, 0, 1}},
|
||||
},
|
||||
}};
|
||||
|
@ -543,7 +543,7 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(
|
|||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {
|
||||
{{16,
|
||||
InputStepMode::kVertex,
|
||||
VertexStepMode::kVertex,
|
||||
{{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kFloat32x4, 0, 1}}}}};
|
||||
cfg.entry_point_name = "main";
|
||||
|
||||
|
@ -596,9 +596,9 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(
|
|||
|
||||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {{
|
||||
{8, InputStepMode::kVertex, {{VertexFormat::kFloat32x2, 0, 0}}},
|
||||
{12, InputStepMode::kVertex, {{VertexFormat::kFloat32x3, 0, 1}}},
|
||||
{16, InputStepMode::kVertex, {{VertexFormat::kFloat32x4, 0, 2}}},
|
||||
{8, VertexStepMode::kVertex, {{VertexFormat::kFloat32x2, 0, 0}}},
|
||||
{12, VertexStepMode::kVertex, {{VertexFormat::kFloat32x3, 0, 1}}},
|
||||
{16, VertexStepMode::kVertex, {{VertexFormat::kFloat32x4, 0, 2}}},
|
||||
}};
|
||||
cfg.entry_point_name = "main";
|
||||
|
||||
|
@ -650,7 +650,7 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index_1 : u32) -> [[builti
|
|||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {
|
||||
{{16,
|
||||
InputStepMode::kVertex,
|
||||
VertexStepMode::kVertex,
|
||||
{{VertexFormat::kFloat32, 0, 0}, {VertexFormat::kFloat32x4, 0, 1}}}}};
|
||||
cfg.entry_point_name = "main";
|
||||
|
||||
|
@ -779,7 +779,7 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(
|
|||
|
||||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {{{256,
|
||||
InputStepMode::kVertex,
|
||||
VertexStepMode::kVertex,
|
||||
{
|
||||
{VertexFormat::kUint8x2, 64, 0},
|
||||
{VertexFormat::kUint8x4, 64, 1},
|
||||
|
@ -940,7 +940,7 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(
|
|||
|
||||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {{{256,
|
||||
InputStepMode::kVertex,
|
||||
VertexStepMode::kVertex,
|
||||
{
|
||||
{VertexFormat::kUint8x2, 63, 0},
|
||||
{VertexFormat::kUint8x4, 63, 1},
|
||||
|
@ -1100,7 +1100,7 @@ fn main([[builtin(vertex_index)]] tint_pulling_vertex_index : u32) -> [[builtin(
|
|||
|
||||
VertexPulling::Config cfg;
|
||||
cfg.vertex_state = {{{256,
|
||||
InputStepMode::kVertex,
|
||||
VertexStepMode::kVertex,
|
||||
{
|
||||
{VertexFormat::kUint8x2, 64, 0},
|
||||
{VertexFormat::kUint8x4, 64, 1},
|
||||
|
|
Loading…
Reference in New Issue