mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Move shader version helpers to hlsl.h.
This commit is contained in:
committed by
Alexandre Julliard
parent
e72c3bab71
commit
5fbd2708c0
Notes:
Alexandre Julliard
2024-04-09 15:45:34 -05: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/757
@@ -927,6 +927,16 @@ struct hlsl_ctx
|
||||
bool warn_implicit_truncation;
|
||||
};
|
||||
|
||||
static inline bool hlsl_version_ge(const struct hlsl_ctx *ctx, unsigned int major, unsigned int minor)
|
||||
{
|
||||
return ctx->profile->major_version > major || (ctx->profile->major_version == major && ctx->profile->minor_version >= minor);
|
||||
}
|
||||
|
||||
static inline bool hlsl_version_lt(const struct hlsl_ctx *ctx, unsigned int major, unsigned int minor)
|
||||
{
|
||||
return !hlsl_version_ge(ctx, major, minor);
|
||||
}
|
||||
|
||||
struct hlsl_resource_load_params
|
||||
{
|
||||
struct hlsl_type *format;
|
||||
|
||||
Reference in New Issue
Block a user