mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader: Embed the parsing location in vkd3d_shader_instruction.
So that it can be used for printing meaningful error locations by downstream processors.
This commit is contained in:
committed by
Alexandre Julliard
parent
531c41306d
commit
cf871d2cb2
Notes:
Alexandre Julliard
2023-09-22 22:46:19 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/317
@@ -968,8 +968,15 @@ struct vkd3d_shader_primitive_type
|
||||
unsigned int patch_vertex_count;
|
||||
};
|
||||
|
||||
struct vkd3d_shader_location
|
||||
{
|
||||
const char *source_name;
|
||||
unsigned int line, column;
|
||||
};
|
||||
|
||||
struct vkd3d_shader_instruction
|
||||
{
|
||||
struct vkd3d_shader_location location;
|
||||
enum vkd3d_shader_opcode handler_idx;
|
||||
DWORD flags;
|
||||
unsigned int dst_count;
|
||||
@@ -1008,7 +1015,8 @@ struct vkd3d_shader_instruction
|
||||
} declaration;
|
||||
};
|
||||
|
||||
void vsir_instruction_init(struct vkd3d_shader_instruction *ins, enum vkd3d_shader_opcode handler_idx);
|
||||
void vsir_instruction_init(struct vkd3d_shader_instruction *ins, const struct vkd3d_shader_location *location,
|
||||
enum vkd3d_shader_opcode handler_idx);
|
||||
|
||||
static inline bool vkd3d_shader_instruction_has_texel_offset(const struct vkd3d_shader_instruction *ins)
|
||||
{
|
||||
@@ -1035,12 +1043,6 @@ static inline bool register_is_constant(const struct vkd3d_shader_register *reg)
|
||||
return (reg->type == VKD3DSPR_IMMCONST || reg->type == VKD3DSPR_IMMCONST64);
|
||||
}
|
||||
|
||||
struct vkd3d_shader_location
|
||||
{
|
||||
const char *source_name;
|
||||
unsigned int line, column;
|
||||
};
|
||||
|
||||
struct vkd3d_shader_param_node
|
||||
{
|
||||
struct vkd3d_shader_param_node *next;
|
||||
|
Reference in New Issue
Block a user