HLSL: Use emit_sampled_image_op instead.
This commit is contained in:
Родитель
686ac6812b
Коммит
947f7010c7
|
@ -897,6 +897,11 @@ string CompilerHLSL::to_sampler_expression(uint32_t id)
|
||||||
return join("_", to_expression(id), "_sampler");
|
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 CompilerHLSL::to_func_call_arg(uint32_t id)
|
||||||
{
|
{
|
||||||
string arg_str = CompilerGLSL::to_func_call_arg(id);
|
string arg_str = CompilerGLSL::to_func_call_arg(id);
|
||||||
|
@ -1714,16 +1719,6 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction)
|
||||||
break;
|
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:
|
case OpDPdx:
|
||||||
UFOP(ddx);
|
UFOP(ddx);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -85,6 +85,7 @@ private:
|
||||||
std::string bitcast_glsl_op(const SPIRType &result_type, const SPIRType &argument_type) override;
|
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_func_call_arg(uint32_t id) override;
|
||||||
std::string to_sampler_expression(uint32_t id);
|
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;
|
const char *to_storage_qualifiers_glsl(const SPIRVariable &var) override;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче