mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
[transform] Add first index offset transform
Adding new transform to workaround D3D's vertex/instance_index always starting from 0 Bug: dawn:548 Change-Id: I048f39e76e236570f3ce337a77d804384ee659a4 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34600 Commit-Queue: Enrico Galli <enrico.galli@intel.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
6c85272d62
commit
3d449d2be5
@@ -75,6 +75,7 @@ const char kUsage[] = R"(Usage: tint [options] <input-file>
|
||||
Available transforms:
|
||||
bound_array_accessors
|
||||
emit_vertex_point_size
|
||||
first_index_offset
|
||||
--parse-only -- Stop after parsing the input
|
||||
--dump-ast -- Dump the generated AST to stdout
|
||||
--dawn-validation -- SPIRV outputs are validated with the same flags
|
||||
@@ -519,6 +520,9 @@ int main(int argc, const char** argv) {
|
||||
} else if (name == "emit_vertex_point_size") {
|
||||
transform_manager.append(
|
||||
std::make_unique<tint::transform::EmitVertexPointSize>());
|
||||
} else if (name == "first_index_offset") {
|
||||
transform_manager.append(
|
||||
std::make_unique<tint::transform::FirstIndexOffset>(0, 0));
|
||||
} else {
|
||||
std::cerr << "Unknown transform name: " << name << std::endl;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user