summarylogtreecommitdiffstats
path: root/patch_temp_constants.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch_temp_constants.patch')
-rw-r--r--patch_temp_constants.patch115
1 files changed, 32 insertions, 83 deletions
diff --git a/patch_temp_constants.patch b/patch_temp_constants.patch
index 62fde61a54b3..904d2cf73711 100644
--- a/patch_temp_constants.patch
+++ b/patch_temp_constants.patch
@@ -1,5 +1,17 @@
+From ccf2b6aa11966ec2a95fdbdb310ddd63cbe704da Mon Sep 17 00:00:00 2001
+From: swswine <swswine@gmail.com>
+Date: Thu, 19 Nov 2015 13:41:29 +0300
+Subject: [PATCH] Maximum shader constants increase (temp fix)
+
+Signed-off-by: Paul Gofman <gofmanp@gmail.com>
+---
+ dlls/d3d9/d3d9_private.h | 2 +-
+ dlls/wined3d/shader.c | 6 +++---
+ dlls/wined3d/wined3d_private.h | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
-index 6e84faf..e90b43a 100644
+index b618ff4..e8d64d7 100644
--- a/dlls/d3d9/d3d9_private.h
+++ b/dlls/d3d9/d3d9_private.h
@@ -315,7 +315,7 @@ HRESULT vertexshader_init(struct d3d9_vertexshader *shader,
@@ -12,10 +24,10 @@ index 6e84faf..e90b43a 100644
struct d3d9_pixelshader
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
-index 7e85988..cdc25a2 100644
+index ef2f70b..47e5618 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
-@@ -427,14 +427,14 @@ static void shader_set_limits(struct wined3d_shader *shader)
+@@ -527,14 +527,14 @@ static void shader_set_limits(struct wined3d_shader *shader)
vs_limits[] =
{
/* min_version, max_version, sampler, constant_int, constant_float, constant_bool, packed_output, packed_input */
@@ -31,84 +43,21 @@ index 7e85988..cdc25a2 100644
- {WINED3D_SHADER_VERSION(3, 0), WINED3D_SHADER_VERSION(3, 0), { 4, 16, 256, 16, 12, 0}},
+ {WINED3D_SHADER_VERSION(3, 0), WINED3D_SHADER_VERSION(3, 0), { 4, 16, /*256*/1024, 16, 12, 0}},
{WINED3D_SHADER_VERSION(4, 0), WINED3D_SHADER_VERSION(4, 0), {16, 0, 0, 0, 16, 0}},
+ {WINED3D_SHADER_VERSION(4, 1), WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 32, 0}},
{0}
- },
-@@ -743,8 +743,10 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
- break;
- }
- if (shader_version.type == WINED3D_SHADER_TYPE_PIXEL && shader_version.major == 3
-- && semantic->usage == WINED3D_DECL_USAGE_POSITION && !semantic->usage_idx)
-+ && semantic->usage == WINED3D_DECL_USAGE_POSITION && !semantic->usage_idx) {
-+ WARN("shader_version.type == WINED3D_SHADER_TYPE_PIXEL && shader_version.major == 3 ...\n");
- return WINED3DERR_INVALIDCALL;
-+ }
- reg_maps->input_registers |= 1u << reg_idx;
- shader_signature_from_semantic(&input_signature_elements[reg_idx], semantic);
- break;
-@@ -886,8 +888,10 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
- for (i = 0; i < ins.dst_count; ++i)
- {
- if (!shader_record_register_usage(shader, reg_maps, &ins.dst[i].reg,
-- shader_version.type, constf_size))
-+ shader_version.type, constf_size)) {
-+ WARN("!shader_record_register_usage\n");
- return WINED3DERR_INVALIDCALL;
-+ }
-
- if (shader_version.type == WINED3D_SHADER_TYPE_VERTEX)
- {
-@@ -1061,8 +1065,10 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
-
- if (ins.predicate)
- if (!shader_record_register_usage(shader, reg_maps, &ins.predicate->reg,
-- shader_version.type, constf_size))
-+ shader_version.type, constf_size)) {
-+ WARN("!shader_record_register_usage (2)");
- return WINED3DERR_INVALIDCALL;
-+ }
-
- for (i = 0; i < ins.src_count; ++i)
- {
-@@ -1070,14 +1076,18 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
- struct wined3d_shader_register reg = ins.src[i].reg;
-
- if (!shader_record_register_usage(shader, reg_maps, &ins.src[i].reg,
-- shader_version.type, constf_size))
-+ shader_version.type, constf_size)) {
-+ WARN("!shader_record_register_usage (3)\n");
- return WINED3DERR_INVALIDCALL;
-+ }
- while (count)
- {
- ++reg.idx[0].offset;
- if (!shader_record_register_usage(shader, reg_maps, &reg,
-- shader_version.type, constf_size))
-+ shader_version.type, constf_size)) {
-+ WARN("!shader_record_register_usage (4)");
- return WINED3DERR_INVALIDCALL;
-+ }
- --count;
- }
-
-@@ -1090,7 +1100,7 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
- shader->u.ps.color0_reg = ins.src[i].reg.idx[0].offset;
- }
- }
-- }
-+ } //for (i = 0; i < ins.src_count; ++i)
- }
- }
- reg_maps->loop_depth = max_loop_depth;
-@@ -2071,8 +2081,10 @@ static HRESULT shader_set_function(struct wined3d_shader *shader, const DWORD *b
-
- /* Second pass: figure out which registers are used, what the semantics are, etc. */
- if (FAILED(hr = shader_get_registers_used(shader, fe, reg_maps, &shader->input_signature,
-- &shader->output_signature, byte_code, float_const_count)))
-- return hr;
-+ &shader->output_signature, byte_code, float_const_count))) {
-+ WARN("Error shader_get_registers_used\n");
-+ return hr;
-+ }
-
- if (reg_maps->shader_version.type != type)
- {
+diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
+index 0b376b6..b384469 100644
+--- a/dlls/wined3d/wined3d_private.h
++++ b/dlls/wined3d/wined3d_private.h
+@@ -530,7 +530,7 @@ enum wined3d_shader_conditional_op
+ #define WINED3D_MAX_CBS 15
+ #define WINED3D_MAX_CONSTS_B 16
+ #define WINED3D_MAX_CONSTS_I 16
+-#define WINED3D_MAX_VS_CONSTS_F 256
++#define WINED3D_MAX_VS_CONSTS_F 1024
+ #define WINED3D_MAX_PS_CONSTS_F 224
+
+ /* FIXME: This needs to go up to 2048 for
+--
+2.5.5
+