Skip to content
Snippets Groups Projects
Commit 70f5b24f authored by Józef Kucia's avatar Józef Kucia
Browse files

libs/vkd3d-shader: Avoid using GLSL.std450 NMin, NMax and NClamp opcodes.

These opcodes were implemented by Mesa just few days ago. In addition
using these opcodes in a shader leads to a crash on Nvidia.

In practice this change doesn't seem to make a difference. We still want
to use NMin, NMax and NClamp for correctness. This commit is meant to be
reverted when problems with these opcodes are resolved.
parent c9b271f3
No related branches found
No related tags found
No related merge requests found
......@@ -740,7 +740,7 @@ static uint32_t vkd3d_spirv_build_op_glsl_std450_nclamp(struct vkd3d_spirv_build
uint32_t glsl_std450_id = vkd3d_spirv_get_glsl_std450_instr_set(builder);
uint32_t operands[] = {x, min, max};
return vkd3d_spirv_build_op_ext_inst(builder, result_type, glsl_std450_id,
GLSLstd450NClamp, operands, ARRAY_SIZE(operands));
GLSLstd450FClamp, operands, ARRAY_SIZE(operands));
}
static uint32_t vkd3d_spirv_get_type_id(struct vkd3d_spirv_builder *builder,
......@@ -1899,8 +1899,8 @@ static enum GLSLstd450 vkd3d_dxbc_compiler_map_ext_glsl_instruction(
{VKD3DSIH_FIRSTBIT_LO, GLSLstd450FindILsb},
{VKD3DSIH_FIRSTBIT_SHI, GLSLstd450FindSMsb},
{VKD3DSIH_MAD, GLSLstd450Fma},
{VKD3DSIH_MAX, GLSLstd450NMax},
{VKD3DSIH_MIN, GLSLstd450NMin},
{VKD3DSIH_MAX, GLSLstd450FMax},
{VKD3DSIH_MIN, GLSLstd450FMin},
{VKD3DSIH_RSQ, GLSLstd450InverseSqrt},
{VKD3DSIH_SQRT, GLSLstd450Sqrt},
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment