Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/dxil.c:
return;
- is_texture = resource->u.handle.d->resource_type != VKD3D_SHADER_RESOURCE_BUFFER;
- resource_kind = resource->u.handle.d->kind;
- instruction_init_with_resource(ins, is_texture ? VKD3DSIH_RESINFO : VKD3DSIH_BUFINFO, resource, sm6);
- if (!(src_params = instruction_src_params_alloc(ins, 1 + is_texture, sm6)))
return;
- src_param_init_vector_from_reg(&src_params[is_texture], &resource->u.handle.reg);
- if (is_texture)
- {
/* DXIL does not have an instrinsic for sample info, and resinfo is expected to return
* the sample count in .w for MS textures. The result is always a struct of 4 x uint32. */
ins->flags = VKD3DSI_RESINFO_UINT;
src_param_init_from_value(&src_params[0], operands[1]);
If the resource is a buffer `operands[1]` is expected to be undefined? Should this be validated, consistently with what you do elsewhere?