From 8b3f47c1d2b9dc46f55b3998b9eb5f898ed745df Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 20 Nov 2024 09:58:55 +1100 Subject: [PATCH] Rebase against 044527c671d87b917e01f39fcf33b596cc2e7878. --- ...tting-to-workaround-0-inf-problem-in.patch | 32 +++++++++---------- staging/upstream-commit | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/patches/wined3d-zero-inf-shaders/0001-wined3d-Add-a-setting-to-workaround-0-inf-problem-in.patch b/patches/wined3d-zero-inf-shaders/0001-wined3d-Add-a-setting-to-workaround-0-inf-problem-in.patch index cb5e336d..bb4a42d2 100644 --- a/patches/wined3d-zero-inf-shaders/0001-wined3d-Add-a-setting-to-workaround-0-inf-problem-in.patch +++ b/patches/wined3d-zero-inf-shaders/0001-wined3d-Add-a-setting-to-workaround-0-inf-problem-in.patch @@ -1,4 +1,4 @@ -From fe189703f5fd934e96f986dce72af6a84c4303ce Mon Sep 17 00:00:00 2001 +From b4aeefdb8869f683f5085b8d64bc591855df138a Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 9 Sep 2019 18:48:43 +0300 Subject: [PATCH] wined3d: Add a setting to workaround 0 * inf problem in @@ -15,10 +15,10 @@ Signed-off-by: Paul Gofman 3 files changed, 135 insertions(+), 24 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index f7f09d73538..75a88aac6ef 100644 +index df2ad761d8f..fccb45233db 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c -@@ -2407,6 +2407,19 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c +@@ -2382,6 +2382,19 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c if (wined3d_settings.strict_shader_math) shader_addline(buffer, "#pragma optionNV(fastmath off)\n"); @@ -38,7 +38,7 @@ index f7f09d73538..75a88aac6ef 100644 prefix = shader_glsl_get_prefix(version->type); /* Prototype the subroutines */ -@@ -3997,7 +4010,12 @@ static void shader_glsl_binop(const struct wined3d_shader_instruction *ins) +@@ -3920,7 +3933,12 @@ static void shader_glsl_binop(const struct wined3d_shader_instruction *ins) write_mask = shader_glsl_append_dst(buffer, ins); shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src0_param); shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param); @@ -52,7 +52,7 @@ index f7f09d73538..75a88aac6ef 100644 } static void shader_glsl_relop(const struct wined3d_shader_instruction *ins) -@@ -4210,26 +4228,45 @@ static void shader_glsl_dot(const struct wined3d_shader_instruction *ins) +@@ -4133,26 +4151,45 @@ static void shader_glsl_dot(const struct wined3d_shader_instruction *ins) struct glsl_src_param src0_param; struct glsl_src_param src1_param; DWORD dst_write_mask, src_write_mask; @@ -104,7 +104,7 @@ index f7f09d73538..75a88aac6ef 100644 } } -@@ -4265,10 +4302,15 @@ static void shader_glsl_cut(const struct wined3d_shader_instruction *ins) +@@ -4188,10 +4225,15 @@ static void shader_glsl_cut(const struct wined3d_shader_instruction *ins) static void shader_glsl_pow(const struct wined3d_shader_instruction *ins) { struct wined3d_string_buffer *buffer = ins->ctx->buffer; @@ -120,7 +120,7 @@ index f7f09d73538..75a88aac6ef 100644 dst_write_mask = shader_glsl_append_dst(buffer, ins); dst_size = shader_glsl_get_write_mask_size(dst_write_mask); -@@ -4278,13 +4320,33 @@ static void shader_glsl_pow(const struct wined3d_shader_instruction *ins) +@@ -4201,13 +4243,33 @@ static void shader_glsl_pow(const struct wined3d_shader_instruction *ins) if (dst_size > 1) { @@ -158,7 +158,7 @@ index f7f09d73538..75a88aac6ef 100644 } } -@@ -4462,11 +4524,15 @@ static void shader_glsl_scalar_op(const struct wined3d_shader_instruction *ins) +@@ -4382,11 +4444,15 @@ static void shader_glsl_scalar_op(const struct wined3d_shader_instruction *ins) { DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major, ins->ctx->reg_maps->shader_version.minor); @@ -175,7 +175,7 @@ index f7f09d73538..75a88aac6ef 100644 dst_write_mask = shader_glsl_append_dst(buffer, ins); dst_size = shader_glsl_get_write_mask_size(dst_write_mask); -@@ -4476,41 +4542,78 @@ static void shader_glsl_scalar_op(const struct wined3d_shader_instruction *ins) +@@ -4396,41 +4462,78 @@ static void shader_glsl_scalar_op(const struct wined3d_shader_instruction *ins) shader_glsl_add_src_param(ins, &ins->src[0], dst_write_mask, &src0_param); @@ -264,7 +264,7 @@ index f7f09d73538..75a88aac6ef 100644 } /** Process the WINED3DSIO_EXPP instruction in GLSL: -@@ -4827,8 +4930,13 @@ static void shader_glsl_mad(const struct wined3d_shader_instruction *ins) +@@ -4775,8 +4878,13 @@ static void shader_glsl_mad(const struct wined3d_shader_instruction *ins) shader_glsl_add_src_param(ins, &ins->src[0], write_mask, &src0_param); shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param); shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param); @@ -281,10 +281,10 @@ index f7f09d73538..75a88aac6ef 100644 /* Handles transforming all WINED3DSIO_M?x? opcodes for diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c -index 524dc7508f9..1168b0ccb8d 100644 +index 3b436919559..abf8153cff0 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c -@@ -421,6 +421,8 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) +@@ -430,6 +430,8 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) ERR_(winediag)("Setting strict shader math to %#x.\n", wined3d_settings.strict_shader_math); if (!get_config_key_dword(hkey, appkey, env, "MaxShaderModelVS", &wined3d_settings.max_sm_vs)) TRACE("Limiting VS shader model to %u.\n", wined3d_settings.max_sm_vs); @@ -294,17 +294,17 @@ index 524dc7508f9..1168b0ccb8d 100644 TRACE("Limiting HS shader model to %u.\n", wined3d_settings.max_sm_hs); if (!get_config_key_dword(hkey, appkey, env, "MaxShaderModelDS", &wined3d_settings.max_sm_ds)) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 2b84a6070fb..c031e6fe8b6 100644 +index 2e0a541cea5..8af55a88eaf 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -469,6 +469,7 @@ struct wined3d_settings +@@ -477,6 +477,7 @@ struct wined3d_settings + unsigned int multisample_textures; unsigned int sample_count; - BOOL check_float_constants; unsigned int strict_shader_math; + unsigned int multiply_special; unsigned int max_sm_vs; unsigned int max_sm_hs; unsigned int max_sm_ds; -- -2.35.1 +2.45.2 diff --git a/staging/upstream-commit b/staging/upstream-commit index cd9c1fb9..d013dbdc 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -67c1c3c2559cc3b934cae5ae26156dcc6fbd484b +044527c671d87b917e01f39fcf33b596cc2e7878