MSVC 2013: Work around another compiler bug with array init.
This commit is contained in:
parent
53ab2144b9
commit
909040e2eb
@ -776,6 +776,10 @@ string CompilerMSL::compile()
|
|||||||
capture_output_to_buffer = msl_options.capture_output_to_buffer;
|
capture_output_to_buffer = msl_options.capture_output_to_buffer;
|
||||||
is_rasterization_disabled = msl_options.disable_rasterization || capture_output_to_buffer;
|
is_rasterization_disabled = msl_options.disable_rasterization || capture_output_to_buffer;
|
||||||
|
|
||||||
|
// Initialize array here rather than constructor, MSVC 2013 workaround.
|
||||||
|
for (auto &id : next_metal_resource_ids)
|
||||||
|
id = 0;
|
||||||
|
|
||||||
fixup_type_alias();
|
fixup_type_alias();
|
||||||
replace_illegal_names();
|
replace_illegal_names();
|
||||||
|
|
||||||
|
@ -593,10 +593,12 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::unordered_map<StageSetBinding, std::pair<MSLResourceBinding, bool>, InternalHasher> resource_bindings;
|
std::unordered_map<StageSetBinding, std::pair<MSLResourceBinding, bool>, InternalHasher> resource_bindings;
|
||||||
|
|
||||||
uint32_t next_metal_resource_index_buffer = 0;
|
uint32_t next_metal_resource_index_buffer = 0;
|
||||||
uint32_t next_metal_resource_index_texture = 0;
|
uint32_t next_metal_resource_index_texture = 0;
|
||||||
uint32_t next_metal_resource_index_sampler = 0;
|
uint32_t next_metal_resource_index_sampler = 0;
|
||||||
uint32_t next_metal_resource_ids[kMaxArgumentBuffers] = {};
|
// Intentionally uninitialized, works around MSVC 2013 bug.
|
||||||
|
uint32_t next_metal_resource_ids[kMaxArgumentBuffers];
|
||||||
|
|
||||||
uint32_t stage_in_var_id = 0;
|
uint32_t stage_in_var_id = 0;
|
||||||
uint32_t stage_out_var_id = 0;
|
uint32_t stage_out_var_id = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user