Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
}
+static bool add_sample_bias_method_call(struct hlsl_ctx *ctx, struct list *instrs, struct hlsl_ir_node *object,
const char *name, const struct parse_initializer *params, const struct vkd3d_shader_location *loc)
+{
- const struct hlsl_type *object_type = object->data_type;
- struct hlsl_resource_load_params load_params = {.type = HLSL_RESOURCE_SAMPLE_LOD_BIAS};
- const unsigned int sampler_dim = hlsl_sampler_dim_count(object_type->sampler_dim);
- const unsigned int offset_dim = hlsl_offset_dim_count(object_type->sampler_dim);
- const struct hlsl_type *sampler_type;
- struct hlsl_ir_resource_load *load;
- if (params->args_count < 3 || params->args_count > 4 + !!offset_dim)
- {
hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
"Wrong number of arguments to method 'SampleLevel': expected from 3 to %u, but got %u.",
`SampleBias`. Also below.