mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/d3dbc: Move TEXLD lowering to d3dbc_parse().
This commit is contained in:
committed by
Henri Verbeet
parent
2201c32e6d
commit
a4f69d4ae6
Notes:
Henri Verbeet
2025-08-07 20:51:20 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1670
@@ -9945,6 +9945,11 @@ static void sm1_generate_vsir(struct hlsl_ctx *ctx, const struct vkd3d_shader_co
|
||||
sm1_generate_vsir_block(ctx, body, program);
|
||||
|
||||
program->ssa_count = ctx->ssa_count;
|
||||
|
||||
if (ctx->result)
|
||||
return;
|
||||
if (program->normalisation_level >= VSIR_NORMALISED_SM4)
|
||||
ctx->result = vsir_program_lower_d3dbc(program, config_flags, compile_info, ctx->message_context);
|
||||
}
|
||||
|
||||
D3DXPARAMETER_CLASS hlsl_sm1_class(const struct hlsl_type *type)
|
||||
@@ -14271,6 +14276,7 @@ int hlsl_emit_vsir(struct hlsl_ctx *ctx, const struct vkd3d_shader_compile_info
|
||||
struct hlsl_block global_uniform_block, body, patch_body;
|
||||
uint32_t config_flags = vkd3d_shader_init_config_flags();
|
||||
const struct hlsl_profile_info *profile = ctx->profile;
|
||||
enum vsir_normalisation_level normalisation_level;
|
||||
struct list semantic_vars, patch_semantic_vars;
|
||||
struct vkd3d_shader_version version = {0};
|
||||
struct hlsl_ir_var *var;
|
||||
@@ -14352,7 +14358,11 @@ int hlsl_emit_vsir(struct hlsl_ctx *ctx, const struct vkd3d_shader_compile_info
|
||||
version.major = ctx->profile->major_version;
|
||||
version.minor = ctx->profile->minor_version;
|
||||
version.type = ctx->profile->type;
|
||||
if (!vsir_program_init(program, compile_info, &version, 0, VSIR_CF_STRUCTURED, VSIR_NORMALISED_SM4))
|
||||
normalisation_level = VSIR_NORMALISED_SM4;
|
||||
if (version.major < 4 && (compile_info->target_type == VKD3D_SHADER_TARGET_D3D_ASM
|
||||
|| compile_info->target_type == VKD3D_SHADER_TARGET_D3D_BYTECODE))
|
||||
normalisation_level = VSIR_NORMALISED_SM1;
|
||||
if (!vsir_program_init(program, compile_info, &version, 0, VSIR_CF_STRUCTURED, normalisation_level))
|
||||
{
|
||||
ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
return ctx->result;
|
||||
|
Reference in New Issue
Block a user