mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-09 22:00:05 +00:00
HLSL: Use emit_sampled_image_op instead.
This commit is contained in:
parent
686ac6812b
commit
947f7010c7
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user