mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Use SubstituteOverride transform to implement overrides
Remove the old backend specific implementation for overrides. Use tint SubstituteOverride transform to replace overrides with const expressions and use the updated program at pipeline creation time. This CL also adds support for overrides used as workgroup size and related tests. Workgroup size validation now happens in backend code and at compute pipeline creation time. Bug: dawn:1504 Change-Id: I7df1fe9c3e358caa23235eacd6d13ba0b2998aec Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/99821 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Austin Eng <enga@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "tint/override_id.h"
|
||||
|
||||
#include "src/tint/reflection.h"
|
||||
#include "src/tint/transform/transform.h"
|
||||
|
||||
namespace tint::transform {
|
||||
@@ -63,6 +64,9 @@ class SubstituteOverride final : public Castable<SubstituteOverride, Transform>
|
||||
/// The value is always a double coming into the transform and will be
|
||||
/// converted to the correct type through and initializer.
|
||||
std::unordered_map<OverrideId, double> map;
|
||||
|
||||
/// Reflect the fields of this class so that it can be used by tint::ForeachField()
|
||||
TINT_REFLECT(map);
|
||||
};
|
||||
|
||||
/// Constructor
|
||||
|
||||
Reference in New Issue
Block a user