mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Make HLSL_TYPE_PASS into a separate class.
This commit is contained in:
parent
24d3a352a6
commit
3c8c7426df
Notes:
Alexandre Julliard
2024-04-23 22:58:08 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/811
@ -1518,6 +1518,7 @@ D3DXPARAMETER_CLASS hlsl_sm1_class(const struct hlsl_type *type)
|
||||
case HLSL_CLASS_TEXTURE:
|
||||
return D3DXPC_OBJECT;
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_UAV:
|
||||
case HLSL_CLASS_VOID:
|
||||
break;
|
||||
@ -1616,6 +1617,7 @@ D3DXPARAMETER_TYPE hlsl_sm1_base_type(const struct hlsl_type *type)
|
||||
return D3DXPT_STRING;
|
||||
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_UAV:
|
||||
case HLSL_CLASS_VOID:
|
||||
break;
|
||||
|
@ -438,6 +438,7 @@ static uint32_t write_fx_4_type(const struct hlsl_type *type, struct fx_write_co
|
||||
|
||||
case HLSL_CLASS_ARRAY:
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_PASS:
|
||||
vkd3d_unreachable();
|
||||
|
||||
case HLSL_CLASS_SAMPLER:
|
||||
@ -837,6 +838,7 @@ static bool is_type_supported_fx_2(struct hlsl_ctx *ctx, const struct hlsl_type
|
||||
return false;
|
||||
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_PASS:
|
||||
/* This cannot appear as an extern variable. */
|
||||
break;
|
||||
}
|
||||
|
@ -365,6 +365,7 @@ static void hlsl_type_calculate_reg_size(struct hlsl_ctx *ctx, struct hlsl_type
|
||||
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_OBJECT:
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_STRING:
|
||||
case HLSL_CLASS_VOID:
|
||||
break;
|
||||
@ -441,6 +442,7 @@ static bool type_is_single_component(const struct hlsl_type *type)
|
||||
return false;
|
||||
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_VOID:
|
||||
break;
|
||||
}
|
||||
@ -572,6 +574,7 @@ unsigned int hlsl_type_get_component_offset(struct hlsl_ctx *ctx, struct hlsl_ty
|
||||
break;
|
||||
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_VOID:
|
||||
vkd3d_unreachable();
|
||||
}
|
||||
@ -945,6 +948,7 @@ unsigned int hlsl_type_component_count(const struct hlsl_type *type)
|
||||
return 1;
|
||||
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_VOID:
|
||||
break;
|
||||
}
|
||||
@ -2361,6 +2365,7 @@ struct vkd3d_string_buffer *hlsl_type_to_string(struct hlsl_ctx *ctx, const stru
|
||||
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_OBJECT:
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_SAMPLER:
|
||||
case HLSL_CLASS_STRING:
|
||||
case HLSL_CLASS_VOID:
|
||||
@ -3538,7 +3543,6 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
|
||||
{"dword", HLSL_CLASS_SCALAR, HLSL_TYPE_UINT, 1, 1},
|
||||
{"vector", HLSL_CLASS_VECTOR, HLSL_TYPE_FLOAT, 4, 1},
|
||||
{"matrix", HLSL_CLASS_MATRIX, HLSL_TYPE_FLOAT, 4, 4},
|
||||
{"pass", HLSL_CLASS_OBJECT, HLSL_TYPE_PASS, 1, 1},
|
||||
{"pixelshader", HLSL_CLASS_OBJECT, HLSL_TYPE_PIXELSHADER, 1, 1},
|
||||
{"vertexshader", HLSL_CLASS_OBJECT, HLSL_TYPE_VERTEXSHADER, 1, 1},
|
||||
{"RenderTargetView",HLSL_CLASS_OBJECT, HLSL_TYPE_RENDERTARGETVIEW, 1, 1},
|
||||
@ -3655,6 +3659,7 @@ static void declare_predefined_types(struct hlsl_ctx *ctx)
|
||||
|
||||
ctx->builtin_types.Void = hlsl_new_simple_type(ctx, "void", HLSL_CLASS_VOID);
|
||||
hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "fxgroup", HLSL_CLASS_EFFECT_GROUP));
|
||||
hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "pass", HLSL_CLASS_PASS));
|
||||
hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "STRING", HLSL_CLASS_STRING));
|
||||
hlsl_scope_add_type(ctx->globals, hlsl_new_simple_type(ctx, "texture", HLSL_CLASS_TEXTURE));
|
||||
|
||||
|
@ -80,6 +80,7 @@ enum hlsl_type_class
|
||||
HLSL_CLASS_ARRAY,
|
||||
HLSL_CLASS_OBJECT,
|
||||
HLSL_CLASS_EFFECT_GROUP,
|
||||
HLSL_CLASS_PASS,
|
||||
HLSL_CLASS_SAMPLER,
|
||||
HLSL_CLASS_STRING,
|
||||
HLSL_CLASS_TEXTURE,
|
||||
@ -98,7 +99,6 @@ enum hlsl_base_type
|
||||
HLSL_TYPE_LAST_SCALAR = HLSL_TYPE_BOOL,
|
||||
HLSL_TYPE_PIXELSHADER,
|
||||
HLSL_TYPE_VERTEXSHADER,
|
||||
HLSL_TYPE_PASS,
|
||||
HLSL_TYPE_RENDERTARGETVIEW,
|
||||
HLSL_TYPE_DEPTHSTENCILVIEW,
|
||||
HLSL_TYPE_TECHNIQUE,
|
||||
|
@ -1639,6 +1639,7 @@ static bool copy_propagation_transform_load(struct hlsl_ctx *ctx,
|
||||
return false;
|
||||
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_STRING:
|
||||
case HLSL_CLASS_VOID:
|
||||
vkd3d_unreachable();
|
||||
|
@ -3009,6 +3009,7 @@ static D3D_SHADER_VARIABLE_CLASS sm4_class(const struct hlsl_type *type)
|
||||
case HLSL_CLASS_EFFECT_GROUP:
|
||||
case HLSL_CLASS_STRUCT:
|
||||
case HLSL_CLASS_OBJECT:
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_SAMPLER:
|
||||
case HLSL_CLASS_STRING:
|
||||
case HLSL_CLASS_TEXTURE:
|
||||
|
Loading…
Reference in New Issue
Block a user