You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Updated wined3d-Indexed_Vertex_Blending and wined3d-SWVP-shaders patchset
Thanks Paul Gofman.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 22aa526b9442ac184b928d16fd354d97b92a7a39 Mon Sep 17 00:00:00 2001
|
||||
From 8c0527ec9d3d1635b74d892aa21d45b86a1e5a18 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 13:17:01 +0300
|
||||
Subject: [PATCH 1/5] wined3d: Use UBO for vertex shader float constants if
|
||||
@@ -9,18 +9,18 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
dlls/d3d8/directx.c | 2 +-
|
||||
dlls/d3d9/directx.c | 2 +-
|
||||
dlls/wined3d/adapter_gl.c | 3 +
|
||||
dlls/wined3d/glsl_shader.c | 126 ++++++++++++++++++++++++++++++---
|
||||
dlls/wined3d/glsl_shader.c | 144 ++++++++++++++++++++++++++++++---
|
||||
dlls/wined3d/shader.c | 2 +
|
||||
dlls/wined3d/state.c | 5 ++
|
||||
dlls/wined3d/wined3d_private.h | 2 +
|
||||
include/wine/wined3d.h | 1 +
|
||||
8 files changed, 130 insertions(+), 13 deletions(-)
|
||||
8 files changed, 147 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
|
||||
index 09188cc2ae..657227357c 100644
|
||||
index f78ff3e5af..847cfd17bf 100644
|
||||
--- a/dlls/d3d8/directx.c
|
||||
+++ b/dlls/d3d8/directx.c
|
||||
@@ -419,7 +419,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
|
||||
@@ -420,7 +420,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
|
||||
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING
|
||||
| WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER
|
||||
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART
|
||||
@@ -43,10 +43,10 @@ index c507991aaa..7cdf5ddbb9 100644
|
||||
if (!extended)
|
||||
flags |= WINED3D_VIDMEM_ACCOUNTING;
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index a61e87344b..abd7114ff2 100644
|
||||
index 5a5a1612a5..fe85fab216 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -3087,6 +3087,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct
|
||||
@@ -3091,6 +3091,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct
|
||||
gl_info->limits.uniform_blocks[WINED3D_SHADER_TYPE_VERTEX] = min(gl_max, WINED3D_MAX_CBS);
|
||||
TRACE("Max vertex uniform blocks: %u (%d).\n",
|
||||
gl_info->limits.uniform_blocks[WINED3D_SHADER_TYPE_VERTEX], gl_max);
|
||||
@@ -57,7 +57,7 @@ index a61e87344b..abd7114ff2 100644
|
||||
}
|
||||
if (gl_info->supported[ARB_TESSELLATION_SHADER])
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 84899be004..710abbe2a0 100644
|
||||
index 84899be004..5dc5c98982 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -138,6 +138,10 @@ struct shader_glsl_priv
|
||||
@@ -79,7 +79,15 @@ index 84899be004..710abbe2a0 100644
|
||||
};
|
||||
|
||||
struct glsl_hs_program
|
||||
@@ -1145,12 +1150,54 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i
|
||||
@@ -284,6 +289,7 @@ struct glsl_context_data
|
||||
struct glsl_shader_prog_link *glsl_program;
|
||||
GLenum vertex_color_clamp;
|
||||
BOOL rasterization_disabled;
|
||||
+ BOOL ubo_bound;
|
||||
};
|
||||
|
||||
struct glsl_ps_compiled_shader
|
||||
@@ -1145,12 +1151,54 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i
|
||||
checkGLcall("walk_constant_heap_clamped()");
|
||||
}
|
||||
|
||||
@@ -135,8 +143,42 @@ index 84899be004..710abbe2a0 100644
|
||||
|
||||
/* 1.X pshaders have the constants clamped to [-1;1] implicitly. */
|
||||
if (shader->reg_maps.shader_version.major == 1
|
||||
@@ -1801,7 +1848,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1783,7 +1831,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
{
|
||||
const struct wined3d_shader *vshader = state->shader[WINED3D_SHADER_TYPE_VERTEX];
|
||||
const struct wined3d_shader *pshader = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
- const struct glsl_context_data *ctx_data = context->shader_backend_data;
|
||||
+ struct glsl_context_data *ctx_data = context->shader_backend_data;
|
||||
struct glsl_shader_prog_link *prog = ctx_data->glsl_program;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
float position_fixup[4 * WINED3D_MAX_VIEWPORTS];
|
||||
@@ -1799,9 +1847,32 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
constant_version = prog->constant_version;
|
||||
update_mask = context->constant_update_mask & prog->constant_update_mask;
|
||||
|
||||
+ if (!ctx_data->ubo_bound)
|
||||
+ {
|
||||
+ unsigned int base, count;
|
||||
+
|
||||
+ if (priv->consts_ubo)
|
||||
+ {
|
||||
+ wined3d_gl_limits_get_uniform_block_range(&gl_info->limits, WINED3D_SHADER_TYPE_VERTEX,
|
||||
+ &base, &count);
|
||||
+ if (priv->ubo_vs_c == -1)
|
||||
+ {
|
||||
+ GL_EXTCALL(glGenBuffers(1, &priv->ubo_vs_c));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_UNIFORM_BUFFER, priv->ubo_vs_c));
|
||||
+ checkGLcall("glBindBuffer (UBO)");
|
||||
+ GL_EXTCALL(glBufferData(GL_UNIFORM_BUFFER, WINED3D_MAX_VS_CONSTS_F * sizeof(struct wined3d_vec4),
|
||||
+ NULL, GL_STREAM_DRAW));
|
||||
+ checkGLcall("glBufferData");
|
||||
+ }
|
||||
+ GL_EXTCALL(glBindBufferBase(GL_UNIFORM_BUFFER, base, priv->ubo_vs_c));
|
||||
+ checkGLcall("glBindBufferBase");
|
||||
+ }
|
||||
+ ctx_data->ubo_bound = TRUE;
|
||||
+ }
|
||||
+
|
||||
if (update_mask & WINED3D_SHADER_CONST_VS_F)
|
||||
shader_glsl_load_constants_f(vshader, gl_info, state->vs_consts_f,
|
||||
- prog->vs.uniform_f_locations, &priv->vconst_heap, priv->stack, constant_version);
|
||||
@@ -144,7 +186,7 @@ index 84899be004..710abbe2a0 100644
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_VS_I)
|
||||
shader_glsl_load_constants_i(vshader, gl_info, state->vs_consts_i,
|
||||
@@ -1954,7 +2001,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1954,7 +2025,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_PS_F)
|
||||
shader_glsl_load_constants_f(pshader, gl_info, state->ps_consts_f,
|
||||
@@ -153,7 +195,7 @@ index 84899be004..710abbe2a0 100644
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_PS_I)
|
||||
shader_glsl_load_constants_i(pshader, gl_info, state->ps_consts_i,
|
||||
@@ -2093,6 +2140,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
@@ -2093,6 +2164,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
struct constant_heap *heap = &priv->vconst_heap;
|
||||
UINT i;
|
||||
|
||||
@@ -166,7 +208,7 @@ index 84899be004..710abbe2a0 100644
|
||||
for (i = start; i < count + start; ++i)
|
||||
{
|
||||
update_heap_entry(heap, i, priv->next_constant_version);
|
||||
@@ -2105,6 +2158,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
|
||||
@@ -2105,6 +2182,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
|
||||
struct constant_heap *heap = &priv->pconst_heap;
|
||||
UINT i;
|
||||
|
||||
@@ -176,7 +218,7 @@ index 84899be004..710abbe2a0 100644
|
||||
for (i = start; i < count + start; ++i)
|
||||
{
|
||||
update_heap_entry(heap, i, priv->next_constant_version);
|
||||
@@ -2408,6 +2464,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2408,6 +2488,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
const struct wined3d_shader_version *version = ®_maps->shader_version;
|
||||
const struct vs_compile_args *vs_args = ctx_priv->cur_vs_args;
|
||||
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
|
||||
@@ -184,7 +226,7 @@ index 84899be004..710abbe2a0 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
const struct wined3d_shader_indexable_temp *idx_temp_reg;
|
||||
unsigned int uniform_block_base, uniform_block_count;
|
||||
@@ -2428,7 +2485,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2428,7 +2509,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
}
|
||||
|
||||
/* Declare the constants (aka uniforms) */
|
||||
@@ -201,7 +243,7 @@ index 84899be004..710abbe2a0 100644
|
||||
{
|
||||
unsigned max_constantsF;
|
||||
|
||||
@@ -2493,11 +2558,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2493,11 +2582,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -216,7 +258,7 @@ index 84899be004..710abbe2a0 100644
|
||||
}
|
||||
|
||||
/* Always declare the full set of constants, the compiler can remove the
|
||||
@@ -10120,17 +10186,44 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
|
||||
@@ -10120,17 +10210,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
|
||||
|
||||
|
||||
static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *gl_info,
|
||||
@@ -229,7 +271,9 @@ index 84899be004..710abbe2a0 100644
|
||||
|
||||
- for (i = 0; i < vs_c_count; ++i)
|
||||
+ if (priv->consts_ubo && vs_c_count)
|
||||
+ {
|
||||
{
|
||||
- string_buffer_sprintf(name, "vs_c[%u]", i);
|
||||
- vs->uniform_f_locations[i] = GL_EXTCALL(glGetUniformLocation(program_id, name->buffer));
|
||||
+ unsigned int base, count;
|
||||
+
|
||||
+ vs->vs_c_block_index = GL_EXTCALL(glGetUniformBlockIndex(program_id, "vs_c_ubo"));
|
||||
@@ -242,19 +286,9 @@ index 84899be004..710abbe2a0 100644
|
||||
+ assert(count >= 1);
|
||||
+ GL_EXTCALL(glUniformBlockBinding(program_id, vs->vs_c_block_index, base));
|
||||
+ checkGLcall("glUniformBlockBinding");
|
||||
+ if (priv->ubo_vs_c == -1)
|
||||
+ {
|
||||
+ GL_EXTCALL(glGenBuffers(1, &priv->ubo_vs_c));
|
||||
+ GL_EXTCALL(glBindBuffer(GL_UNIFORM_BUFFER, priv->ubo_vs_c));
|
||||
+ checkGLcall("glBindBuffer (UBO)");
|
||||
+ GL_EXTCALL(glBindBufferBase(GL_UNIFORM_BUFFER, base, priv->ubo_vs_c));
|
||||
+ checkGLcall("glBindBufferBase");
|
||||
+ }
|
||||
+ }
|
||||
+ else if (!priv->consts_ubo)
|
||||
{
|
||||
- string_buffer_sprintf(name, "vs_c[%u]", i);
|
||||
- vs->uniform_f_locations[i] = GL_EXTCALL(glGetUniformLocation(program_id, name->buffer));
|
||||
+ {
|
||||
+ for (i = 0; i < vs_c_count; ++i)
|
||||
+ {
|
||||
+ string_buffer_sprintf(name, "vs_c[%u]", i);
|
||||
@@ -266,7 +300,7 @@ index 84899be004..710abbe2a0 100644
|
||||
|
||||
for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
|
||||
{
|
||||
@@ -11210,6 +11303,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11210,6 +11319,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
if (!(priv = heap_alloc_zero(sizeof(*priv))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -275,7 +309,7 @@ index 84899be004..710abbe2a0 100644
|
||||
string_buffer_list_init(&priv->string_buffers);
|
||||
|
||||
if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv)))
|
||||
@@ -11264,6 +11359,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11264,6 +11375,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
device->fragment_priv = fragment_priv;
|
||||
device->shader_priv = priv;
|
||||
|
||||
@@ -284,7 +318,7 @@ index 84899be004..710abbe2a0 100644
|
||||
return WINED3D_OK;
|
||||
|
||||
fail:
|
||||
@@ -11291,6 +11388,13 @@ static void shader_glsl_free(struct wined3d_device *device)
|
||||
@@ -11291,6 +11404,13 @@ static void shader_glsl_free(struct wined3d_device *device)
|
||||
priv->fragment_pipe->free_private(device);
|
||||
priv->vertex_pipe->vp_free(device);
|
||||
|
||||
@@ -328,10 +362,10 @@ index 3af60e1351..d84b42d2ea 100644
|
||||
if (STATE_IS_GRAPHICS_CONSTANT_BUFFER(state_id))
|
||||
shader_type = state_id - STATE_GRAPHICS_CONSTANT_BUFFER(0);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index a5a3f34737..81507db891 100644
|
||||
index 152a78cbf9..faf4be0ab1 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1053,6 +1053,7 @@ struct wined3d_shader_reg_maps
|
||||
@@ -1055,6 +1055,7 @@ struct wined3d_shader_reg_maps
|
||||
struct wined3d_shader_tgsm *tgsm;
|
||||
SIZE_T tgsm_capacity;
|
||||
unsigned int tgsm_count;
|
||||
@@ -339,7 +373,7 @@ index a5a3f34737..81507db891 100644
|
||||
};
|
||||
|
||||
/* Keeps track of details for TEX_M#x# instructions which need to maintain
|
||||
@@ -2592,6 +2593,7 @@ struct wined3d_gl_limits
|
||||
@@ -2593,6 +2594,7 @@ struct wined3d_gl_limits
|
||||
UINT glsl_varyings;
|
||||
UINT glsl_vs_float_constants;
|
||||
UINT glsl_ps_float_constants;
|
||||
@@ -348,7 +382,7 @@ index a5a3f34737..81507db891 100644
|
||||
UINT arb_vs_float_constants;
|
||||
UINT arb_vs_native_constants;
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 86fde6a1f2..c597897f43 100644
|
||||
index 6d977a6179..1a541bed46 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -1348,6 +1348,7 @@ enum wined3d_shader_type
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 93e394cd34fa63e16adeee0bf87537256c071fe7 Mon Sep 17 00:00:00 2001
|
||||
From 624a1744fb48b75afb79169b7fab8c8a9d3000d6 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 14:24:50 +0300
|
||||
Subject: [PATCH 2/5] d3d9: Support SWVP vertex shader float constants limits.
|
||||
@@ -11,7 +11,7 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
3 files changed, 28 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
|
||||
index 3fe0376e5c..300bee73c7 100644
|
||||
index b07d72a066..a9b332ff92 100644
|
||||
--- a/dlls/d3d9/d3d9_private.h
|
||||
+++ b/dlls/d3d9/d3d9_private.h
|
||||
@@ -41,6 +41,7 @@
|
||||
@@ -32,7 +32,7 @@ index 3fe0376e5c..300bee73c7 100644
|
||||
struct d3d9
|
||||
{
|
||||
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
|
||||
index 6cc3f180b0..03d2faf61a 100644
|
||||
index 5844d2cdac..00734021b0 100644
|
||||
--- a/dlls/d3d9/device.c
|
||||
+++ b/dlls/d3d9/device.c
|
||||
@@ -362,7 +362,7 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch
|
||||
@@ -81,7 +81,7 @@ index 6cc3f180b0..03d2faf61a 100644
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -3418,14 +3424,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
@@ -3434,14 +3440,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
UINT reg_idx, const float *data, UINT count)
|
||||
{
|
||||
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||
@@ -104,7 +104,7 @@ index 6cc3f180b0..03d2faf61a 100644
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -3441,14 +3453,20 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
@@ -3457,14 +3469,20 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
UINT reg_idx, float *data, UINT count)
|
||||
{
|
||||
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||
@@ -128,10 +128,10 @@ index 6cc3f180b0..03d2faf61a 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
|
||||
index eab114d19c..7c4defa169 100644
|
||||
index 7cdf5ddbb9..1d37e900c2 100644
|
||||
--- a/dlls/d3d9/directx.c
|
||||
+++ b/dlls/d3d9/directx.c
|
||||
@@ -371,7 +371,7 @@ static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DD
|
||||
@@ -372,7 +372,7 @@ static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DD
|
||||
hr = wined3d_get_device_caps(d3d9->wined3d, adapter, device_type, &wined3d_caps);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 37d7d2673047b10e356541e113c8d35d893a0ebb Mon Sep 17 00:00:00 2001
|
||||
From fdfe81a0579648faaff6d4cfd59908b62f2c1d3c Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 14:47:28 +0300
|
||||
Subject: [PATCH 3/5] wined3d: Report actual vertex shader float constants
|
||||
@@ -13,10 +13,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
4 files changed, 20 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 86df4003db..89d887e0fc 100644
|
||||
index fe85fab216..47fff09b8a 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -3737,7 +3737,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||
@@ -3741,7 +3741,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||
d3d_info->limits.gs_version = shader_caps.gs_version;
|
||||
d3d_info->limits.ps_version = shader_caps.ps_version;
|
||||
d3d_info->limits.cs_version = shader_caps.cs_version;
|
||||
@@ -27,7 +27,7 @@ index 86df4003db..89d887e0fc 100644
|
||||
d3d_info->limits.varying_count = shader_caps.varying_count;
|
||||
d3d_info->shader_double_precision = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_DOUBLE_PRECISION);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index af73751dbf..0be43d4551 100644
|
||||
index 30d52bc610..4d8396888c 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3623,10 +3623,21 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d
|
||||
@@ -54,10 +54,10 @@ index af73751dbf..0be43d4551 100644
|
||||
|
||||
HRESULT CDECL wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx,
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index ecc1d7fbf8..ac77a6a178 100644
|
||||
index 5dc5c98982..d9d807abdb 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -11441,7 +11441,10 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
|
||||
@@ -11486,7 +11486,10 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
|
||||
caps->vs_version = gl_info->supported[ARB_VERTEX_SHADER] ? caps->vs_version : 0;
|
||||
caps->ps_version = gl_info->supported[ARB_FRAGMENT_SHADER] ? caps->ps_version : 0;
|
||||
|
||||
@@ -70,10 +70,10 @@ index ecc1d7fbf8..ac77a6a178 100644
|
||||
caps->varying_count = gl_info->limits.glsl_varyings;
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 5edff2ecee..9e5665165f 100644
|
||||
index faf4be0ab1..fa195c3b15 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -163,6 +163,7 @@ struct wined3d_d3d_limits
|
||||
@@ -164,6 +164,7 @@ struct wined3d_d3d_limits
|
||||
{
|
||||
unsigned int vs_version, hs_version, ds_version, gs_version, ps_version, cs_version;
|
||||
DWORD vs_uniform_count;
|
||||
@@ -81,7 +81,7 @@ index 5edff2ecee..9e5665165f 100644
|
||||
DWORD ps_uniform_count;
|
||||
unsigned int varying_count;
|
||||
unsigned int ffp_textures;
|
||||
@@ -681,6 +682,7 @@ enum wined3d_shader_conditional_op
|
||||
@@ -685,6 +686,7 @@ enum wined3d_shader_conditional_op
|
||||
#define WINED3D_MAX_CONSTS_B 16
|
||||
#define WINED3D_MAX_CONSTS_I 16
|
||||
#define WINED3D_MAX_VS_CONSTS_F 256
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 220fe2d54e6a022f263ccfc014e31ef239f9c6a6 Mon Sep 17 00:00:00 2001
|
||||
From 83e16d7e0af178dd8e7183446893083c5a69869d Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 15:05:12 +0300
|
||||
Subject: [PATCH 4/5] wined3d: Support SWVP vertex shader constants limit in
|
||||
@@ -15,10 +15,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
6 files changed, 20 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index 030b34c4e4..5f7944b93a 100644
|
||||
index 8e996d3fb3..0dddcceeeb 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -6425,13 +6425,10 @@ static void test_vertex_shader_constant(void)
|
||||
@@ -6437,13 +6437,10 @@ static void test_vertex_shader_constant(void)
|
||||
ok(consts_swvp == 8192, "Unexpected consts_swvp %u.\n", consts_swvp);
|
||||
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
|
||||
@@ -32,7 +32,7 @@ index 030b34c4e4..5f7944b93a 100644
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
@@ -6456,7 +6453,6 @@ static void test_vertex_shader_constant(void)
|
||||
@@ -6468,7 +6465,6 @@ static void test_vertex_shader_constant(void)
|
||||
|
||||
IDirect3DDevice9_SetSoftwareVertexProcessing(device, 0);
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
|
||||
@@ -40,7 +40,7 @@ index 030b34c4e4..5f7944b93a 100644
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
@@ -6464,7 +6460,6 @@ static void test_vertex_shader_constant(void)
|
||||
@@ -6476,7 +6472,6 @@ static void test_vertex_shader_constant(void)
|
||||
IDirect3DDevice9_SetSoftwareVertexProcessing(device, 1);
|
||||
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
|
||||
@@ -49,10 +49,10 @@ index 030b34c4e4..5f7944b93a 100644
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 659d074149..a0d7b9caaf 100644
|
||||
index 80b9ecd4ab..768ec8f39e 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -23948,7 +23948,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24639,7 +24639,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, c_index, 1);
|
||||
ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, (unsigned int)c_index[0], c_color, 1);
|
||||
@@ -61,7 +61,7 @@ index 659d074149..a0d7b9caaf 100644
|
||||
|
||||
hr = IDirect3DDevice9_BeginScene(device);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 0be43d4551..6649e5078d 100644
|
||||
index 4d8396888c..b9cfbf9e68 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2557,13 +2557,17 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -104,10 +104,10 @@ index 0be43d4551..6649e5078d 100644
|
||||
|
||||
memcpy(constants, &device->state.vs_consts_f[start_idx], count * sizeof(*constants));
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index ac77a6a178..6acb730fe4 100644
|
||||
index d9d807abdb..ddd2cfa633 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -2137,7 +2137,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
@@ -2170,7 +2170,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
if (priv->consts_ubo)
|
||||
return;
|
||||
|
||||
@@ -148,10 +148,10 @@ index 820089d0b8..cd5c8bd5dc 100644
|
||||
|
||||
default:
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9e5665165f..9655660a5b 100644
|
||||
index fa195c3b15..42396a1b6e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2947,7 +2947,7 @@ struct wined3d_state
|
||||
@@ -2953,7 +2953,7 @@ struct wined3d_state
|
||||
|
||||
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
@@ -160,7 +160,7 @@ index 9e5665165f..9655660a5b 100644
|
||||
|
||||
BOOL ps_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
struct wined3d_ivec4 ps_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
@@ -3019,7 +3019,7 @@ struct wined3d_stateblock_state
|
||||
@@ -3025,7 +3025,7 @@ struct wined3d_stateblock_state
|
||||
int base_vertex_index;
|
||||
|
||||
struct wined3d_shader *vs;
|
||||
@@ -169,7 +169,7 @@ index 9e5665165f..9655660a5b 100644
|
||||
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
|
||||
@@ -3614,7 +3614,7 @@ struct wined3d_saved_states
|
||||
@@ -3621,7 +3621,7 @@ struct wined3d_saved_states
|
||||
BOOL ps_consts_f[WINED3D_MAX_PS_CONSTS_F];
|
||||
WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */
|
||||
WORD vertexShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */
|
||||
@@ -178,7 +178,7 @@ index 9e5665165f..9655660a5b 100644
|
||||
DWORD textures : 20; /* WINED3D_MAX_COMBINED_SAMPLERS, 20 */
|
||||
DWORD indices : 1;
|
||||
DWORD material : 1;
|
||||
@@ -3650,7 +3650,7 @@ struct wined3d_stateblock
|
||||
@@ -3657,7 +3657,7 @@ struct wined3d_stateblock
|
||||
unsigned int num_contained_vs_consts_i;
|
||||
DWORD contained_vs_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
unsigned int num_contained_vs_consts_b;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 7fd5eef6fefa01881ac93471672b391b5e8346e7 Mon Sep 17 00:00:00 2001
|
||||
From 8a25d864ab5a2b9bb157a9fe9ddd46620a188d40 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 15:23:33 +0300
|
||||
Subject: [PATCH 5/5] wined3d: Support SWVP mode vertex shaders.
|
||||
@@ -8,17 +8,17 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
dlls/d3d9/tests/device.c | 16 ++------
|
||||
dlls/d3d9/tests/visual.c | 5 +--
|
||||
dlls/wined3d/device.c | 8 ++++
|
||||
dlls/wined3d/glsl_shader.c | 69 +++++++++++++++++++++++++---------
|
||||
dlls/wined3d/shader.c | 44 +++++++++++++++-------
|
||||
dlls/wined3d/glsl_shader.c | 71 +++++++++++++++++++++++++---------
|
||||
dlls/wined3d/shader.c | 44 ++++++++++++++-------
|
||||
dlls/wined3d/shader_sm1.c | 2 +-
|
||||
dlls/wined3d/wined3d_private.h | 7 ++++
|
||||
7 files changed, 103 insertions(+), 48 deletions(-)
|
||||
7 files changed, 104 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index 23c2a7d47f..265285730f 100644
|
||||
index 0dddcceeeb..e1d968e19e 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -6913,15 +6913,11 @@ float4 main(const float4 color : COLOR) : SV_TARGET
|
||||
@@ -6925,15 +6925,11 @@ float4 main(const float4 color : COLOR) : SV_TARGET
|
||||
|
||||
vs = NULL;
|
||||
hr = IDirect3DDevice9_CreateVertexShader(device, vs_1_256, &vs);
|
||||
@@ -36,7 +36,7 @@ index 23c2a7d47f..265285730f 100644
|
||||
|
||||
refcount = IDirect3DDevice9_Release(device);
|
||||
ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
@@ -6938,20 +6934,16 @@ float4 main(const float4 color : COLOR) : SV_TARGET
|
||||
@@ -6950,20 +6946,16 @@ float4 main(const float4 color : COLOR) : SV_TARGET
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDevice9_CreateVertexShader(device, vs_1_256, &vs);
|
||||
@@ -60,10 +60,10 @@ index 23c2a7d47f..265285730f 100644
|
||||
cleanup:
|
||||
refcount = IDirect3DDevice9_Release(device);
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index a0d7b9caaf..09cd09db94 100644
|
||||
index 768ec8f39e..1cc8642f9b 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -23874,7 +23874,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24565,7 +24565,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
hr = IDirect3DDevice9_CreateVertexShader(device, reladdr_shader_code, &reladdr_shader);
|
||||
ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9_CreateVertexShader(device, pure_sw_shader_code, &pure_sw_shader);
|
||||
@@ -71,7 +71,7 @@ index a0d7b9caaf..09cd09db94 100644
|
||||
ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr);
|
||||
hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &vertex_declaration);
|
||||
ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr);
|
||||
@@ -23912,7 +23911,7 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24603,7 +24602,7 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
|
||||
expected_color = 0x00ff0000; /* Color from vertex data and not from the shader. */
|
||||
color = getPixelColor(device, 5, 5);
|
||||
@@ -80,7 +80,7 @@ index a0d7b9caaf..09cd09db94 100644
|
||||
expected_color, color);
|
||||
|
||||
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
|
||||
@@ -23931,7 +23930,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24622,7 +24621,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
|
||||
expected_color = 0x00ffffff;
|
||||
color = getPixelColor(device, 5, 5);
|
||||
@@ -88,7 +88,7 @@ index a0d7b9caaf..09cd09db94 100644
|
||||
ok(color == expected_color, "Expected color 0x%08x, got 0x%08x (sw shader in sw mode).\n",
|
||||
expected_color, color);
|
||||
|
||||
@@ -23981,7 +23979,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24672,7 +24670,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
|
||||
expected_color = 0x0000ffff; /* c[256] is c_color for SW shader. */
|
||||
color = getPixelColor(device, 5, 5);
|
||||
@@ -97,7 +97,7 @@ index a0d7b9caaf..09cd09db94 100644
|
||||
expected_color, color);
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 956333afe6..b67d534cfe 100644
|
||||
index b9cfbf9e68..4b98987f63 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4080,6 +4080,14 @@ void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device *
|
||||
@@ -116,7 +116,7 @@ index 956333afe6..b67d534cfe 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 01e79a7ecc..3d9280dc70 100644
|
||||
index ddd2cfa633..0df81ed669 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -140,7 +140,9 @@ struct shader_glsl_priv
|
||||
@@ -139,7 +139,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
GLint uniform_i_locations[WINED3D_MAX_CONSTS_I];
|
||||
GLint uniform_b_locations[WINED3D_MAX_CONSTS_B];
|
||||
GLint pos_fixup_location;
|
||||
@@ -1154,7 +1156,7 @@ static void bind_and_orphan_consts_ubo(const struct wined3d_gl_info *gl_info, st
|
||||
@@ -1155,7 +1157,7 @@ static void bind_and_orphan_consts_ubo(const struct wined3d_gl_info *gl_info, st
|
||||
{
|
||||
GL_EXTCALL(glBindBuffer(GL_UNIFORM_BUFFER, priv->ubo_vs_c));
|
||||
checkGLcall("glBindBuffer");
|
||||
@@ -148,7 +148,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
NULL, GL_STREAM_DRAW));
|
||||
checkGLcall("glBufferData");
|
||||
}
|
||||
@@ -1162,14 +1164,16 @@ static void bind_and_orphan_consts_ubo(const struct wined3d_gl_info *gl_info, st
|
||||
@@ -1163,14 +1165,16 @@ static void bind_and_orphan_consts_ubo(const struct wined3d_gl_info *gl_info, st
|
||||
/* Context activation is done by the caller. */
|
||||
static void shader_glsl_load_constants_f(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_vec4 *constants, const GLint *constant_locations, const struct constant_heap *heap,
|
||||
@@ -166,7 +166,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
unsigned max_const_used;
|
||||
|
||||
if (priv->ubo_vs_c == -1)
|
||||
@@ -1179,22 +1183,32 @@ static void shader_glsl_load_constants_f(const struct wined3d_shader *shader, co
|
||||
@@ -1180,22 +1184,32 @@ static void shader_glsl_load_constants_f(const struct wined3d_shader *shader, co
|
||||
}
|
||||
|
||||
bind_and_orphan_consts_ubo(gl_info, priv);
|
||||
@@ -205,7 +205,16 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
checkGLcall("glBufferSubData");
|
||||
return;
|
||||
}
|
||||
@@ -1848,7 +1862,8 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -1860,7 +1874,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
GL_EXTCALL(glGenBuffers(1, &priv->ubo_vs_c));
|
||||
GL_EXTCALL(glBindBuffer(GL_UNIFORM_BUFFER, priv->ubo_vs_c));
|
||||
checkGLcall("glBindBuffer (UBO)");
|
||||
- GL_EXTCALL(glBufferData(GL_UNIFORM_BUFFER, WINED3D_MAX_VS_CONSTS_F * sizeof(struct wined3d_vec4),
|
||||
+ GL_EXTCALL(glBufferData(GL_UNIFORM_BUFFER, priv->max_vs_consts_f * sizeof(struct wined3d_vec4),
|
||||
NULL, GL_STREAM_DRAW));
|
||||
checkGLcall("glBufferData");
|
||||
}
|
||||
@@ -1872,7 +1886,8 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_VS_F)
|
||||
shader_glsl_load_constants_f(vshader, gl_info, state->vs_consts_f,
|
||||
@@ -215,7 +224,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_VS_I)
|
||||
shader_glsl_load_constants_i(vshader, gl_info, state->vs_consts_i,
|
||||
@@ -2001,7 +2016,8 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
@@ -2025,7 +2040,8 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_PS_F)
|
||||
shader_glsl_load_constants_f(pshader, gl_info, state->ps_consts_f,
|
||||
@@ -225,7 +234,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
|
||||
if (update_mask & WINED3D_SHADER_CONST_PS_I)
|
||||
shader_glsl_load_constants_i(pshader, gl_info, state->ps_consts_i,
|
||||
@@ -2146,7 +2162,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
@@ -2170,7 +2186,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
if (priv->consts_ubo)
|
||||
return;
|
||||
|
||||
@@ -234,7 +243,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
{
|
||||
update_heap_entry(heap, i, priv->next_constant_version);
|
||||
}
|
||||
@@ -2491,7 +2507,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2515,7 +2531,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
shader_addline(buffer,"layout(std140) uniform vs_c_ubo\n"
|
||||
"{ \n"
|
||||
" vec4 %s_c[%u];\n"
|
||||
@@ -243,7 +252,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
}
|
||||
else if (shader->limits->constant_float > 0)
|
||||
{
|
||||
@@ -10217,12 +10233,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
@@ -10233,12 +10249,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
}
|
||||
else if (!priv->consts_ubo)
|
||||
{
|
||||
@@ -259,7 +268,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
}
|
||||
|
||||
for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
|
||||
@@ -10541,6 +10558,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
@@ -10557,6 +10574,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
vs_list = &ffp_shader->linked_programs;
|
||||
}
|
||||
|
||||
@@ -270,7 +279,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
hshader = state->shader[WINED3D_SHADER_TYPE_HULL];
|
||||
if (!(context->shader_update_mask & (1u << WINED3D_SHADER_TYPE_HULL)) && ctx_data->glsl_program)
|
||||
hs_id = ctx_data->glsl_program->hs.id;
|
||||
@@ -11294,7 +11315,7 @@ static void constant_heap_free(struct constant_heap *heap)
|
||||
@@ -11310,7 +11331,7 @@ static void constant_heap_free(struct constant_heap *heap)
|
||||
static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe,
|
||||
const struct fragment_pipeline *fragment_pipe)
|
||||
{
|
||||
@@ -279,7 +288,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
struct fragment_caps fragment_caps;
|
||||
void *vertex_priv, *fragment_priv;
|
||||
@@ -11305,6 +11326,18 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11321,6 +11342,18 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
|
||||
priv->consts_ubo = (device->adapter->d3d_info.wined3d_creation_flags & WINED3D_LEGACY_SHADER_CONSTANTS)
|
||||
&& gl_info->supported[ARB_UNIFORM_BUFFER_OBJECT];
|
||||
@@ -298,7 +307,7 @@ index 01e79a7ecc..3d9280dc70 100644
|
||||
string_buffer_list_init(&priv->string_buffers);
|
||||
|
||||
if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv)))
|
||||
@@ -11334,7 +11367,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11350,7 +11383,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -474,10 +483,10 @@ index 0c6bb93317..1051307e88 100644
|
||||
WARN("Invalid shader version %u.%u (%#x).\n", major, minor, *byte_code);
|
||||
return NULL;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index c01100e0a4..857fc8a06d 100644
|
||||
index 42396a1b6e..766449d711 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -4428,6 +4428,13 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader,
|
||||
@@ -4430,6 +4430,13 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user