Avoid unintentional name conflict with HLSL backend.

This commit is contained in:
Hans-Kristian Arntzen 2019-01-17 12:21:16 +01:00
parent 76bf6d0c34
commit 73d9da7070
4 changed files with 6 additions and 6 deletions

View File

@ -6626,7 +6626,7 @@ void CompilerGLSL::handle_store_to_invariant_variable(uint32_t store_id, uint32_
disallow_forwarding_in_expression_chain(*expr);
}
void CompilerGLSL::emit_store(uint32_t lhs_expression, uint32_t rhs_expression)
void CompilerGLSL::emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression)
{
auto rhs = to_pointer_expression(rhs_expression);
@ -6791,7 +6791,7 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
}
else
{
emit_store(ops[0], ops[1]);
emit_store_statement(ops[0], ops[1]);
}
// Storing a pointer results in a variable pointer, so we must conservatively assume

View File

@ -634,7 +634,7 @@ protected:
void disallow_forwarding_in_expression_chain(const SPIRExpression &expr);
bool expression_is_constant_null(uint32_t id) const;
virtual void emit_store(uint32_t lhs_expression, uint32_t rhs_expression);
virtual void emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression);
private:
void init()

View File

@ -1657,12 +1657,12 @@ MSLStructMemberKey CompilerMSL::get_struct_member_key(uint32_t type_id, uint32_t
return k;
}
void CompilerMSL::emit_store(uint32_t lhs_expression, uint32_t rhs_expression)
void CompilerMSL::emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression)
{
if (!has_extended_decoration(lhs_expression, SPIRVCrossDecorationPacked) ||
get_extended_decoration(lhs_expression, SPIRVCrossDecorationPackedType) == 0)
{
CompilerGLSL::emit_store(lhs_expression, rhs_expression);
CompilerGLSL::emit_store_statement(lhs_expression, rhs_expression);
}
else
{

View File

@ -430,7 +430,7 @@ protected:
void bitcast_to_builtin_store(uint32_t target_id, std::string &expr, const SPIRType &expr_type) override;
void bitcast_from_builtin_load(uint32_t source_id, std::string &expr, const SPIRType &expr_type) override;
void emit_store(uint32_t lhs_expression, uint32_t rhs_expression) override;
void emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression) override;
void analyze_sampled_image_usage();