Merge pull request #1065 from KhronosGroup/msvc-2013-workaround
MSVC 2013: Work around another compiler bug with array init.
This commit is contained in:
Коммит
8aa6731925
|
@ -776,6 +776,10 @@ string CompilerMSL::compile()
|
|||
capture_output_to_buffer = msl_options.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();
|
||||
replace_illegal_names();
|
||||
|
||||
|
|
|
@ -593,10 +593,12 @@ protected:
|
|||
};
|
||||
|
||||
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_texture = 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_out_var_id = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче