Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
+ struct vkd3d_string_buffer *string;
- if (!(load = hlsl_new_resource_load(ctx, &load_params, loc))) - return false; - list_add_tail(instrs, &load->node.entry); - return true; + if ((string = hlsl_type_to_string(ctx, object_type))) + hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE, + "Type '%s' does not have methods.", string->buffer); + hlsl_release_string_buffer(ctx, string); + return false; + } + + if (!strcmp(name, "Load") + && object_type->sampler_dim != HLSL_SAMPLER_DIM_CUBE + && object_type->sampler_dim != HLSL_SAMPLER_DIM_CUBEARRAY) Not necessarily for this MR since it's pre-existing, just a comment: here I'd prefer a positive logic for choosing which object types are allowed, much like `Gather`. Also I wouldn't dislike some more systematic organization like `intrinsic_functions`.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/172#note_30846