HLSL: Use emit_sampled_image_op instead.

This commit is contained in:
Hans-Kristian Arntzen 2017-05-07 13:28:08 +02:00
parent 686ac6812b
commit 947f7010c7
2 changed files with 6 additions and 10 deletions

View File

@ -897,6 +897,11 @@ string CompilerHLSL::to_sampler_expression(uint32_t id)
return join("_", to_expression(id), "_sampler");
}
void CompilerHLSL::emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id)
{
set<SPIRCombinedImageSampler>(result_id, result_type, image_id, samp_id);
}
string CompilerHLSL::to_func_call_arg(uint32_t id)
{
string arg_str = CompilerGLSL::to_func_call_arg(id);
@ -1714,16 +1719,6 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction)
break;
}
case OpSampledImage:
{
uint32_t result_type = ops[0];
uint32_t id = ops[1];
uint32_t image = ops[2];
uint32_t sampler = ops[3];
set<SPIRCombinedImageSampler>(id, result_type, image, sampler);
break;
}
case OpDPdx:
UFOP(ddx);
break;

View File

@ -85,6 +85,7 @@ private:
std::string bitcast_glsl_op(const SPIRType &result_type, const SPIRType &argument_type) override;
std::string to_func_call_arg(uint32_t id) override;
std::string to_sampler_expression(uint32_t id);
void emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id) override;
const char *to_storage_qualifiers_glsl(const SPIRVariable &var) override;