GCC: fix name clash cause of multiple BindingInfo definitions
BindingInfo is declared in BindingInfo.h. However, ShaderModule.h declares an alias BindingInfo in EntryPointMetadata. This confuses GCC. Rename the alias to BindingInfoArray. Bug: chromium:819294 Change-Id: Ia43c9eb8d793a3078faa6340980017236a6adbb3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39502 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
33a77c127a
commit
ec53444839
|
@ -176,7 +176,7 @@ namespace dawn_native {
|
|||
|
||||
// Loops over all the reflected BindGroupLayoutEntries from shaders.
|
||||
for (const StageAndDescriptor& stage : stages) {
|
||||
const EntryPointMetadata::BindingInfo& info =
|
||||
const EntryPointMetadata::BindingInfoArray& info =
|
||||
stage.second->module->GetEntryPoint(stage.second->entryPoint).bindings;
|
||||
|
||||
for (BindGroupIndex group(0); group < info.size(); ++group) {
|
||||
|
|
|
@ -478,7 +478,7 @@ namespace dawn_native {
|
|||
[](const DeviceBase* device,
|
||||
const spirv_cross::SmallVector<spirv_cross::Resource>& resources,
|
||||
const spirv_cross::Compiler& compiler, BindingInfoType bindingType,
|
||||
EntryPointMetadata::BindingInfo* metadataBindings,
|
||||
EntryPointMetadata::BindingInfoArray* metadataBindings,
|
||||
bool isStorageBuffer = false) -> MaybeError {
|
||||
for (const auto& resource : resources) {
|
||||
if (!compiler.get_decoration_bitset(resource.id).get(spv::DecorationBinding)) {
|
||||
|
|
|
@ -105,8 +105,8 @@ namespace dawn_native {
|
|||
// bindings[G][B] is the reflection data for the binding defined with
|
||||
// [[group=G, binding=B]] in WGSL / SPIRV.
|
||||
using BindingGroupInfoMap = std::map<BindingNumber, ShaderBindingInfo>;
|
||||
using BindingInfo = ityp::array<BindGroupIndex, BindingGroupInfoMap, kMaxBindGroups>;
|
||||
BindingInfo bindings;
|
||||
using BindingInfoArray = ityp::array<BindGroupIndex, BindingGroupInfoMap, kMaxBindGroups>;
|
||||
BindingInfoArray bindings;
|
||||
|
||||
// The set of vertex attributes this entryPoint uses.
|
||||
std::bitset<kMaxVertexAttributes> usedVertexAttributes;
|
||||
|
|
|
@ -285,7 +285,7 @@ namespace dawn_native { namespace d3d12 {
|
|||
compiler.set_hlsl_options(options_hlsl);
|
||||
compiler.set_entry_point(entryPointName, ShaderStageToExecutionModel(stage));
|
||||
|
||||
const EntryPointMetadata::BindingInfo& moduleBindingInfo =
|
||||
const EntryPointMetadata::BindingInfoArray& moduleBindingInfo =
|
||||
GetEntryPoint(entryPointName).bindings;
|
||||
|
||||
for (BindGroupIndex group : IterateBitSet(layout->GetBindGroupLayoutsMask())) {
|
||||
|
|
|
@ -170,7 +170,8 @@ namespace dawn_native { namespace opengl {
|
|||
compiler.set_name(combined.combined_id, info->GetName());
|
||||
}
|
||||
|
||||
const EntryPointMetadata::BindingInfo& bindingInfo = GetEntryPoint(entryPointName).bindings;
|
||||
const EntryPointMetadata::BindingInfoArray& bindingInfo =
|
||||
GetEntryPoint(entryPointName).bindings;
|
||||
|
||||
// Change binding names to be "dawn_binding_<group>_<binding>".
|
||||
// Also unsets the SPIRV "Binding" decoration as it outputs "layout(binding=)" which
|
||||
|
|
Loading…
Reference in New Issue