From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/glsl_shader.c | 1 - dlls/wined3d/utils.c | 3 +-- dlls/wined3d/wined3d_private.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 24bbe1cc6a8..f23a31516c4 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -12132,7 +12132,6 @@ static void glsl_fragment_pipe_get_caps(const struct wined3d_adapter *adapter, s const struct wined3d_gl_info *gl_info = &wined3d_adapter_gl_const(adapter)->gl_info;
memset(caps, 0, sizeof(*caps)); - caps->srgb_write = true; caps->color_key = true; caps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP | WINED3DPMISCCAPS_PERSTAGECONSTANT; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 91355438378..7e4fe21e727 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -3174,8 +3174,7 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
adapter->fragment_pipe->get_caps(adapter, &fragment_caps); adapter->shader_backend->shader_get_caps(adapter, &shader_caps); - srgb_write = fragment_caps.srgb_write - && (!shader_caps.ps_version || (shader_caps.wined3d_caps & WINED3D_SHADER_CAP_SRGB_WRITE)); + srgb_write = (!shader_caps.ps_version || (shader_caps.wined3d_caps & WINED3D_SHADER_CAP_SRGB_WRITE));
for (i = 0; i < ARRAY_SIZE(format_texture_info); ++i) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1c70b65dd8c..2f5318adfc1 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -197,7 +197,6 @@ struct fragment_caps unsigned int TextureOpCaps; unsigned int max_blend_stages; unsigned int max_textures; - bool srgb_write; bool color_key; };
From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/adapter_gl.c | 8 ------- dlls/wined3d/glsl_shader.c | 1 - dlls/wined3d/texture.c | 38 ---------------------------------- dlls/wined3d/wined3d_private.h | 1 - 4 files changed, 48 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 59c85df5a9a..8e2e8f9a359 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -5225,14 +5225,6 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl,
wined3d_adapter_gl_init_d3d_info(adapter_gl, wined3d_creation_flags);
- if (!adapter_gl->a.d3d_info.ffp_fragment_caps.color_key) - { - /* We do not want to deal with re-creating immutable texture storage - * for colour-keying emulation. */ - WARN("Disabling ARB_texture_storage because fragment pipe doesn't support colour-keying.\n"); - gl_info->supported[ARB_TEXTURE_STORAGE] = FALSE; - } - if (!wined3d_driver_info_init(driver_info, caps_gl_ctx.gpu_description, adapter_gl->a.d3d_info.feature_level, caps_gl_ctx.vram_bytes, 0)) { diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index f23a31516c4..a0cc7126b3e 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -12132,7 +12132,6 @@ static void glsl_fragment_pipe_get_caps(const struct wined3d_adapter *adapter, s const struct wined3d_gl_info *gl_info = &wined3d_adapter_gl_const(adapter)->gl_info;
memset(caps, 0, sizeof(*caps)); - caps->color_key = true; caps->PrimitiveMiscCaps = WINED3DPMISCCAPS_TSSARGTEMP | WINED3DPMISCCAPS_PERSTAGECONSTANT; caps->TextureOpCaps = WINED3DTEXOPCAPS_DISABLE diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 86e4b603663..688dc35de98 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1658,18 +1658,11 @@ struct wined3d_resource * CDECL wined3d_texture_get_resource(struct wined3d_text return &texture->resource; }
-static BOOL color_key_equal(const struct wined3d_color_key *c1, struct wined3d_color_key *c2) -{ - return c1->color_space_low_value == c2->color_space_low_value - && c1->color_space_high_value == c2->color_space_high_value; -} - /* Context activation is done by the caller */ void wined3d_texture_load(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) { UINT sub_count = texture->level_count * texture->layer_count; - const struct wined3d_d3d_info *d3d_info = context->d3d_info; DWORD flag; UINT i;
@@ -1683,26 +1676,6 @@ void wined3d_texture_load(struct wined3d_texture *texture, else flag = WINED3D_TEXTURE_RGB_VALID;
- if (!d3d_info->ffp_fragment_caps.color_key - && (!(texture->async.flags & WINED3D_TEXTURE_ASYNC_COLOR_KEY) - != !(texture->async.color_key_flags & WINED3D_CKEY_SRC_BLT) - || (texture->async.flags & WINED3D_TEXTURE_ASYNC_COLOR_KEY - && !color_key_equal(&texture->async.gl_color_key, &texture->async.src_blt_color_key)))) - { - unsigned int i; - - TRACE("Reloading because of color key value change.\n"); - for (i = 0; i < sub_count; i++) - { - if (!wined3d_texture_load_location(texture, i, context, texture->resource.map_binding)) - ERR("Failed to load location %s.\n", wined3d_debug_location(texture->resource.map_binding)); - else - wined3d_texture_invalidate_location(texture, i, ~texture->resource.map_binding); - } - - texture->async.gl_color_key = texture->async.src_blt_color_key; - } - if (texture->flags & flag) { TRACE("Texture %p not dirty, nothing to do.\n", texture); @@ -2051,7 +2024,6 @@ void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl, struct wined3d_context_gl *context_gl, BOOL srgb) { DWORD alloc_flag = srgb ? WINED3D_TEXTURE_SRGB_ALLOCATED : WINED3D_TEXTURE_RGB_ALLOCATED; - const struct wined3d_d3d_info *d3d_info = context_gl->c.d3d_info; const struct wined3d_gl_info *gl_info = context_gl->gl_info; struct wined3d_resource *resource = &texture_gl->t.resource; const struct wined3d_device *device = resource->device; @@ -2063,16 +2035,6 @@ void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl, TRACE("texture_gl %p, context_gl %p, srgb %d, format %s.\n", texture_gl, context_gl, srgb, debug_d3dformat(format->id));
- if (!d3d_info->ffp_fragment_caps.color_key - && !(texture_gl->t.async.flags & WINED3D_TEXTURE_ASYNC_COLOR_KEY) - != !(texture_gl->t.async.color_key_flags & WINED3D_CKEY_SRC_BLT)) - { - wined3d_texture_force_reload(&texture_gl->t); - - if (texture_gl->t.async.color_key_flags & WINED3D_CKEY_SRC_BLT) - texture_gl->t.async.flags |= WINED3D_TEXTURE_ASYNC_COLOR_KEY; - } - if (texture_gl->t.flags & alloc_flag) return;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2f5318adfc1..cb67dfaf93a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -197,7 +197,6 @@ struct fragment_caps unsigned int TextureOpCaps; unsigned int max_blend_stages; unsigned int max_textures; - bool color_key; };
struct wined3d_d3d_limits
From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/adapter_gl.c | 24 +--------------------- dlls/wined3d/adapter_vk.c | 1 - dlls/wined3d/buffer.c | 37 ---------------------------------- dlls/wined3d/context.c | 3 +-- dlls/wined3d/cs.c | 2 +- dlls/wined3d/glsl_shader.c | 1 - dlls/wined3d/shader_spirv.c | 1 - dlls/wined3d/wined3d_private.h | 3 --- 8 files changed, 3 insertions(+), 69 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 8e2e8f9a359..073a41644b7 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -3867,23 +3867,6 @@ static void WINE_GLAPI position_d3dcolor(const void *data) D3DCOLOR_B_A(pos)); }
-static void WINE_GLAPI position_float4(const void *data) -{ - const struct wined3d_gl_info *gl_info = wined3d_context_gl_get_current()->gl_info; - const GLfloat *pos = data; - - if (pos[3] != 0.0f && pos[3] != 1.0f) - { - float w = 1.0f / pos[3]; - - gl_info->gl_ops.gl.p_glVertex4f(pos[0] * w, pos[1] * w, pos[2] * w, w); - } - else - { - gl_info->gl_ops.gl.p_glVertex3fv(pos); - } -} - static void WINE_GLAPI diffuse_d3dcolor(const void *data) { const struct wined3d_gl_info *gl_info = wined3d_context_gl_get_current()->gl_info; @@ -3962,7 +3945,6 @@ static void WINE_GLAPI generic_float16_4(GLuint idx, const void *data)
static void wined3d_adapter_init_ffp_attrib_ops(struct wined3d_adapter_gl *adapter_gl) { - const struct wined3d_d3d_info *d3d_info = &adapter_gl->a.d3d_info; struct wined3d_gl_info *gl_info = &adapter_gl->gl_info; struct wined3d_ffp_attrib_ops *ops = &gl_info->ffp_attrib_ops; unsigned int i; @@ -3978,10 +3960,7 @@ static void wined3d_adapter_init_ffp_attrib_ops(struct wined3d_adapter_gl *adapt }
ops->position[WINED3D_FFP_EMIT_FLOAT3] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glVertex3fv; - if (!d3d_info->xyzrhw) - ops->position[WINED3D_FFP_EMIT_FLOAT4] = position_float4; - else - ops->position[WINED3D_FFP_EMIT_FLOAT4] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glVertex4fv; + ops->position[WINED3D_FFP_EMIT_FLOAT4] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glVertex4fv; ops->position[WINED3D_FFP_EMIT_D3DCOLOR] = position_d3dcolor; ops->position[WINED3D_FFP_EMIT_SHORT4] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glVertex2sv;
@@ -5036,7 +5015,6 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_ TRACE("Maximum point size support - max point size %.8e.\n", f[1]);
d3d_info->wined3d_creation_flags = wined3d_creation_flags; - d3d_info->xyzrhw = vertex_caps.xyzrhw; d3d_info->emulated_flatshading = vertex_caps.emulated_flatshading; d3d_info->ffp_generic_attributes = vertex_caps.ffp_generic_attributes; d3d_info->ffp_alpha_test = !!gl_info->supported[WINED3D_GL_LEGACY_CONTEXT]; diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 1b0a402b233..c23ee92c84f 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -2325,7 +2325,6 @@ static void wined3d_adapter_vk_init_d3d_info(struct wined3d_adapter_vk *adapter_
d3d_info->wined3d_creation_flags = wined3d_creation_flags;
- d3d_info->xyzrhw = vertex_caps.xyzrhw; d3d_info->emulated_flatshading = vertex_caps.emulated_flatshading; d3d_info->ffp_generic_attributes = vertex_caps.ffp_generic_attributes; d3d_info->ffp_alpha_test = false; diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 697c4f393a4..ad58aa4a152 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -306,7 +306,6 @@ static BOOL buffer_process_converted_attribute(struct wined3d_buffer *buffer, }
#define WINED3D_BUFFER_FIXUP_D3DCOLOR 0x01 -#define WINED3D_BUFFER_FIXUP_XYZRHW 0x02
static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct wined3d_stream_info *si, const struct wined3d_state *state, UINT attrib_idx, DWORD fixup_flags, UINT *stride_this_run) @@ -325,23 +324,9 @@ static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct win format = attrib->format->id; /* Look for newly appeared conversion */ if (fixup_flags & WINED3D_BUFFER_FIXUP_D3DCOLOR && format == WINED3DFMT_B8G8R8A8_UNORM) - { ret = buffer_process_converted_attribute(This, CONV_D3DCOLOR, attrib, stride_this_run); - } - else if (fixup_flags & WINED3D_BUFFER_FIXUP_XYZRHW && si->position_transformed) - { - if (format != WINED3DFMT_R32G32B32A32_FLOAT) - { - FIXME("Unexpected format %s for transformed position.\n", debug_d3dformat(format)); - return FALSE; - } - - ret = buffer_process_converted_attribute(This, CONV_POSITIONT, attrib, stride_this_run); - } else if (This->conversion_map) - { ret = buffer_process_converted_attribute(This, CONV_NONE, attrib, stride_this_run); - }
return ret; } @@ -423,8 +408,6 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This, const struct wined3d_s
ret = buffer_check_attribute(This, si, state, WINED3D_FFP_POSITION, fixup_flags, &stride_this_run) || ret; - fixup_flags &= ~WINED3D_BUFFER_FIXUP_XYZRHW; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_BLENDWEIGHT, fixup_flags, &stride_this_run) || ret; ret = buffer_check_attribute(This, si, state, WINED3D_FFP_BLENDINDICES, @@ -488,21 +471,6 @@ static inline unsigned int fixup_d3dcolor(DWORD *dst_color) return sizeof(*dst_color); }
-static inline unsigned int fixup_transformed_pos(struct wined3d_vec4 *p) -{ - /* rhw conversion like in position_float4(). */ - if (p->w != 1.0f && p->w != 0.0f) - { - float w = 1.0f / p->w; - p->x *= w; - p->y *= w; - p->z *= w; - p->w = w; - } - - return sizeof(*p); -} - ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer) { unsigned int refcount = InterlockedIncrement(&buffer->resource.ref); @@ -553,9 +521,6 @@ static void buffer_conversion_upload(struct wined3d_buffer *buffer, struct wined case CONV_D3DCOLOR: j += fixup_d3dcolor((DWORD *) (data + i * buffer->stride + j)); break; - case CONV_POSITIONT: - j += fixup_transformed_pos((struct wined3d_vec4 *) (data + i * buffer->stride + j)); - break; default: FIXME("Unimplemented conversion %d in shifted conversion.\n", buffer->conversion_map[j]); ++j; @@ -852,8 +817,6 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context * { if (!d3d_info->vertex_bgra && !d3d_info->ffp_generic_attributes) fixup_flags |= WINED3D_BUFFER_FIXUP_D3DCOLOR; - if (!d3d_info->xyzrhw) - fixup_flags |= WINED3D_BUFFER_FIXUP_XYZRHW; }
decl_changed = buffer_find_decl(buffer, &context->stream_info, state, fixup_flags); diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index b6c24c3d837..bfee98e470f 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -332,8 +332,7 @@ void context_update_stream_info(struct wined3d_context *context, const struct wi slow_mask |= -(!d3d_info->vertex_bgra && !d3d_info->ffp_generic_attributes) & ((1u << WINED3D_FFP_DIFFUSE) | (1u << WINED3D_FFP_SPECULAR) | (1u << WINED3D_FFP_BLENDWEIGHT));
- if ((stream_info->position_transformed && !d3d_info->xyzrhw) - || (stream_info->use_map & slow_mask)) + if (stream_info->use_map & slow_mask) context->use_immediate_mode_draw = TRUE; } } diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index ebccc53951e..f473a0e8c2c 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3080,7 +3080,7 @@ static bool wined3d_cs_map_upload_bo(struct wined3d_device_context *context, str
/* We can't use persistent maps if we might need to do vertex attribute * conversion; that will cause the CS thread to invalidate the BO. */ - if (!d3d_info->xyzrhw || !d3d_info->vertex_bgra || !d3d_info->ffp_generic_attributes) + if (!d3d_info->vertex_bgra || !d3d_info->ffp_generic_attributes) { TRACE("Not returning a persistent buffer because we might need to do vertex attribute conversion.\n"); return false; diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index a0cc7126b3e..7b46c648db7 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11682,7 +11682,6 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_adapter *adapter, { const struct wined3d_gl_info *gl_info = &wined3d_adapter_gl_const(adapter)->gl_info;
- caps->xyzrhw = TRUE; caps->emulated_flatshading = !needs_legacy_glsl_syntax(gl_info); caps->ffp_generic_attributes = TRUE; caps->max_active_lights = WINED3D_MAX_ACTIVE_LIGHTS; diff --git a/dlls/wined3d/shader_spirv.c b/dlls/wined3d/shader_spirv.c index 38d4dc0d81d..b5cba701103 100644 --- a/dlls/wined3d/shader_spirv.c +++ b/dlls/wined3d/shader_spirv.c @@ -1134,7 +1134,6 @@ static void spirv_vertex_pipe_vk_vp_disable(const struct wined3d_context *contex static void spirv_vertex_pipe_vk_vp_get_caps(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps) { memset(caps, 0, sizeof(*caps)); - caps->xyzrhw = TRUE; caps->ffp_generic_attributes = TRUE; }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index cb67dfaf93a..0167000343e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -220,7 +220,6 @@ struct wined3d_d3d_info struct fragment_caps ffp_fragment_caps; struct wined3d_d3d_limits limits; uint32_t wined3d_creation_flags; - uint32_t xyzrhw : 1; uint32_t emulated_flatshading : 1; uint32_t ffp_generic_attributes : 1; uint32_t ffp_alpha_test : 1; @@ -1999,7 +1998,6 @@ struct wined3d_fragment_pipe_ops
struct wined3d_vertex_caps { - BOOL xyzrhw; BOOL emulated_flatshading; BOOL ffp_generic_attributes; DWORD max_active_lights; @@ -3798,7 +3796,6 @@ enum wined3d_buffer_conversion_type { CONV_NONE, CONV_D3DCOLOR, - CONV_POSITIONT, };
struct wined3d_buffer
From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/adapter_gl.c | 1 - dlls/wined3d/adapter_vk.c | 1 - dlls/wined3d/buffer.c | 39 +-- dlls/wined3d/context.c | 25 +- dlls/wined3d/context_gl.c | 461 +-------------------------------- dlls/wined3d/cs.c | 9 - dlls/wined3d/glsl_shader.c | 1 - dlls/wined3d/shader_spirv.c | 1 - dlls/wined3d/wined3d_gl.h | 2 - dlls/wined3d/wined3d_private.h | 3 - 10 files changed, 12 insertions(+), 531 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 073a41644b7..19e24aac3ca 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -5016,7 +5016,6 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
d3d_info->wined3d_creation_flags = wined3d_creation_flags; d3d_info->emulated_flatshading = vertex_caps.emulated_flatshading; - d3d_info->ffp_generic_attributes = vertex_caps.ffp_generic_attributes; d3d_info->ffp_alpha_test = !!gl_info->supported[WINED3D_GL_LEGACY_CONTEXT]; d3d_info->vs_clipping = shader_caps.wined3d_caps & WINED3D_SHADER_CAP_VS_CLIPPING; d3d_info->shader_double_precision = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_DOUBLE_PRECISION); diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index c23ee92c84f..8e004339525 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -2326,7 +2326,6 @@ static void wined3d_adapter_vk_init_d3d_info(struct wined3d_adapter_vk *adapter_ d3d_info->wined3d_creation_flags = wined3d_creation_flags;
d3d_info->emulated_flatshading = vertex_caps.emulated_flatshading; - d3d_info->ffp_generic_attributes = vertex_caps.ffp_generic_attributes; d3d_info->ffp_alpha_test = false; d3d_info->vs_clipping = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_VS_CLIPPING); d3d_info->shader_double_precision = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_DOUBLE_PRECISION); diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index ad58aa4a152..4fa8b811661 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -305,13 +305,10 @@ static BOOL buffer_process_converted_attribute(struct wined3d_buffer *buffer, return ret; }
-#define WINED3D_BUFFER_FIXUP_D3DCOLOR 0x01 - static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct wined3d_stream_info *si, const struct wined3d_state *state, UINT attrib_idx, DWORD fixup_flags, UINT *stride_this_run) { const struct wined3d_stream_info_element *attrib = &si->elements[attrib_idx]; - enum wined3d_format_id format; BOOL ret = FALSE;
/* Ignore attributes that do not have our vbo. After that check we can be sure that the attribute is @@ -321,11 +318,8 @@ static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct win || state->streams[attrib->stream_idx].buffer != This) return FALSE;
- format = attrib->format->id; /* Look for newly appeared conversion */ - if (fixup_flags & WINED3D_BUFFER_FIXUP_D3DCOLOR && format == WINED3DFMT_B8G8R8A8_UNORM) - ret = buffer_process_converted_attribute(This, CONV_D3DCOLOR, attrib, stride_this_run); - else if (This->conversion_map) + if (This->conversion_map) ret = buffer_process_converted_attribute(This, CONV_NONE, attrib, stride_this_run);
return ret; @@ -450,27 +444,6 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This, const struct wined3d_s return ret; }
-static inline unsigned int fixup_d3dcolor(DWORD *dst_color) -{ - DWORD src_color = *dst_color; - - /* Color conversion like in draw_primitive_immediate_mode(). Watch out for - * endianness. If we want this to work on big-endian machines as well we - * have to consider more things. - * - * 0xff000000: Alpha mask - * 0x00ff0000: Blue mask - * 0x0000ff00: Green mask - * 0x000000ff: Red mask - */ - *dst_color = 0; - *dst_color |= (src_color & 0xff00ff00u); /* Alpha Green */ - *dst_color |= (src_color & 0x00ff0000u) >> 16; /* Red */ - *dst_color |= (src_color & 0x000000ffu) << 16; /* Blue */ - - return sizeof(*dst_color); -} - ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer) { unsigned int refcount = InterlockedIncrement(&buffer->resource.ref); @@ -518,9 +491,6 @@ static void buffer_conversion_upload(struct wined3d_buffer *buffer, struct wined /* Done already */ j += sizeof(DWORD); break; - case CONV_D3DCOLOR: - j += fixup_d3dcolor((DWORD *) (data + i * buffer->stride + j)); - break; default: FIXME("Unimplemented conversion %d in shifted conversion.\n", buffer->conversion_map[j]); ++j; @@ -779,7 +749,6 @@ void * CDECL wined3d_buffer_get_parent(const struct wined3d_buffer *buffer) void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state) { - const struct wined3d_d3d_info *d3d_info = context->d3d_info; BOOL decl_changed = FALSE;
TRACE("buffer %p.\n", buffer); @@ -813,12 +782,6 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context * { DWORD fixup_flags = 0;
- if (!use_vs(state)) - { - if (!d3d_info->vertex_bgra && !d3d_info->ffp_generic_attributes) - fixup_flags |= WINED3D_BUFFER_FIXUP_D3DCOLOR; - } - decl_changed = buffer_find_decl(buffer, &context->stream_info, state, fixup_flags); buffer->flags |= WINED3D_BUFFER_HASDESC; } diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index bfee98e470f..30f50ea23f3 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -162,7 +162,6 @@ void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_inf { /* We need to deal with frequency data! */ struct wined3d_vertex_declaration *declaration = state->vertex_declaration; - BOOL generic_attributes = d3d_info->ffp_generic_attributes; BOOL use_vshader = use_vs(state); unsigned int i;
@@ -213,16 +212,7 @@ void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_inf } else { - if (!generic_attributes && !element->ffp_valid) - { - WARN("Skipping unsupported fixed function element of format %s and usage %s.\n", - debug_d3dformat(element->format->id), debug_d3ddeclusage(element->usage)); - stride_used = FALSE; - } - else - { - stride_used = fixed_get_input(element->usage, element->usage_idx, &idx); - } + stride_used = fixed_get_input(element->usage, element->usage_idx, &idx); }
if (stride_used) @@ -322,17 +312,4 @@ void context_update_stream_info(struct wined3d_context *context, const struct wi context_invalidate_state(context, STATE_INDEXBUFFER);
context->use_immediate_mode_draw = FALSE; - - if (stream_info->all_vbo) - return; - - if (!use_vs(state)) - { - WORD slow_mask = -!d3d_info->ffp_generic_attributes & (1u << WINED3D_FFP_PSIZE); - slow_mask |= -(!d3d_info->vertex_bgra && !d3d_info->ffp_generic_attributes) - & ((1u << WINED3D_FFP_DIFFUSE) | (1u << WINED3D_FFP_SPECULAR) | (1u << WINED3D_FFP_BLENDWEIGHT)); - - if (stream_info->use_map & slow_mask) - context->use_immediate_mode_draw = TRUE; - } } diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index ad6334016ec..d245a87526f 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -4624,18 +4624,8 @@ static void draw_primitive_immediate_mode(struct wined3d_context_gl *context_gl, const struct wined3d_stream_info *si, const void *idx_data, unsigned int idx_size, int base_vertex_idx, unsigned int start_idx, unsigned int vertex_count, unsigned int instance_count) { - const BYTE *position = NULL, *normal = NULL, *diffuse = NULL, *specular = NULL; - const struct wined3d_d3d_info *d3d_info = context_gl->c.d3d_info; const struct wined3d_gl_info *gl_info = context_gl->gl_info; - unsigned int coord_idx, stride_idx, texture_idx, vertex_idx; - const struct wined3d_stream_info_element *element; - const BYTE *tex_coords[WINED3DDP_MAXTEXCOORD]; - unsigned int texture_unit, texture_stages; const struct wined3d_ffp_attrib_ops *ops; - unsigned int untracked_material_count; - unsigned int tex_mask = 0; - BOOL specular_fog = FALSE; - BOOL ps = use_ps(state); const void *ptr;
static unsigned int once; @@ -4660,183 +4650,23 @@ static void draw_primitive_immediate_mode(struct wined3d_context_gl *context_gl,
gl_info->gl_ops.gl.p_glBegin(gl_primitive_type_from_d3d(state->primitive_type));
- if (use_vs(state) || d3d_info->ffp_generic_attributes) - { - for (vertex_idx = 0; vertex_idx < vertex_count; ++vertex_idx) - { - unsigned int use_map = si->use_map; - unsigned int element_idx; - - stride_idx = get_stride_idx(idx_data, idx_size, base_vertex_idx, start_idx, vertex_idx); - for (element_idx = gl_info->limits.vertex_attribs - 1; use_map; - use_map &= ~(1u << element_idx), --element_idx) - { - if (!(use_map & 1u << element_idx)) - continue; - - ptr = si->elements[element_idx].data.addr + si->elements[element_idx].stride * stride_idx; - ops->generic[si->elements[element_idx].format->emit_idx](element_idx, ptr); - } - } - - gl_info->gl_ops.gl.p_glEnd(); - return; - } - - if (si->use_map & (1u << WINED3D_FFP_POSITION)) - position = si->elements[WINED3D_FFP_POSITION].data.addr; - - if (si->use_map & (1u << WINED3D_FFP_NORMAL)) - normal = si->elements[WINED3D_FFP_NORMAL].data.addr; - else - gl_info->gl_ops.gl.p_glNormal3f(0.0f, 0.0f, 0.0f); - - untracked_material_count = context_gl->untracked_material_count; - if (si->use_map & (1u << WINED3D_FFP_DIFFUSE)) - { - element = &si->elements[WINED3D_FFP_DIFFUSE]; - diffuse = element->data.addr; - - if (untracked_material_count && element->format->id != WINED3DFMT_B8G8R8A8_UNORM) - FIXME("Implement diffuse color tracking from %s.\n", debug_d3dformat(element->format->id)); - } - else - { - gl_info->gl_ops.gl.p_glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - } - - if (si->use_map & (1u << WINED3D_FFP_SPECULAR)) + for (unsigned int vertex_idx = 0; vertex_idx < vertex_count; ++vertex_idx) { - element = &si->elements[WINED3D_FFP_SPECULAR]; - specular = element->data.addr; + unsigned int stride_idx = get_stride_idx(idx_data, idx_size, base_vertex_idx, start_idx, vertex_idx); + unsigned int use_map = si->use_map;
- /* Special case where the fog density is stored in the specular alpha channel. */ - if (state->render_states[WINED3D_RS_FOGENABLE] - && (state->render_states[WINED3D_RS_FOGVERTEXMODE] == WINED3D_FOG_NONE - || si->elements[WINED3D_FFP_POSITION].format->id == WINED3DFMT_R32G32B32A32_FLOAT) - && state->render_states[WINED3D_RS_FOGTABLEMODE] == WINED3D_FOG_NONE) + for (unsigned int element_idx = gl_info->limits.vertex_attribs - 1; use_map; + use_map &= ~(1u << element_idx), --element_idx) { - if (gl_info->supported[EXT_FOG_COORD]) - { - if (element->format->id == WINED3DFMT_B8G8R8A8_UNORM) - specular_fog = TRUE; - else - FIXME("Implement fog coordinates from %s.\n", debug_d3dformat(element->format->id)); - } - else - { - static unsigned int once; - - if (!once++) - FIXME("Implement fog for transformed vertices in software.\n"); - } - } - } - else if (gl_info->supported[EXT_SECONDARY_COLOR]) - { - GL_EXTCALL(glSecondaryColor3fEXT)(0.0f, 0.0f, 0.0f); - } - - texture_stages = d3d_info->ffp_fragment_caps.max_blend_stages; - for (texture_idx = 0; texture_idx < texture_stages; ++texture_idx) - { - if (!gl_info->supported[ARB_MULTITEXTURE] && texture_idx > 0) - { - FIXME("Program using multiple concurrent textures which this OpenGL implementation doesn't support.\n"); - continue; - } - - if (!ps && !wined3d_state_get_ffp_texture(state, texture_idx)) - continue; - - texture_unit = context_gl->tex_unit_map[texture_idx]; - if (texture_unit == WINED3D_UNMAPPED_STAGE) - continue; - - coord_idx = state->texture_states[texture_idx][WINED3D_TSS_TEXCOORD_INDEX]; - if (coord_idx > 7) - { - TRACE("Skipping generated coordinates (%#x) for texture %u.\n", coord_idx, texture_idx); - continue; - } - - if (si->use_map & (1u << (WINED3D_FFP_TEXCOORD0 + coord_idx))) - { - tex_coords[coord_idx] = si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].data.addr; - tex_mask |= (1u << texture_idx); - } - else - { - TRACE("Setting default coordinates for texture %u.\n", texture_idx); - if (gl_info->supported[ARB_MULTITEXTURE]) - GL_EXTCALL(glMultiTexCoord4fARB(GL_TEXTURE0_ARB + texture_unit, 0.0f, 0.0f, 0.0f, 1.0f)); - else - gl_info->gl_ops.gl.p_glTexCoord4f(0.0f, 0.0f, 0.0f, 1.0f); - } - } - - /* Blending data and point sizes are not supported by this function. They - * are not supported by the fixed function pipeline at all. A FIXME for - * them is printed after decoding the vertex declaration. */ - for (vertex_idx = 0; vertex_idx < vertex_count; ++vertex_idx) - { - uint32_t tmp_tex_mask; - - stride_idx = get_stride_idx(idx_data, idx_size, base_vertex_idx, start_idx, vertex_idx); - - if (normal) - { - ptr = normal + stride_idx * si->elements[WINED3D_FFP_NORMAL].stride; - ops->normal[si->elements[WINED3D_FFP_NORMAL].format->emit_idx](ptr); - } - - if (diffuse) - { - ptr = diffuse + stride_idx * si->elements[WINED3D_FFP_DIFFUSE].stride; - ops->diffuse[si->elements[WINED3D_FFP_DIFFUSE].format->emit_idx](ptr); - - if (untracked_material_count) - { - struct wined3d_color color; - unsigned int i; - - wined3d_color_from_d3dcolor(&color, *(const DWORD *)ptr); - for (i = 0; i < untracked_material_count; ++i) - { - gl_info->gl_ops.gl.p_glMaterialfv(GL_FRONT_AND_BACK, - context_gl->untracked_materials[i], &color.r); - } - } - } - - if (specular) - { - ptr = specular + stride_idx * si->elements[WINED3D_FFP_SPECULAR].stride; - ops->specular[si->elements[WINED3D_FFP_SPECULAR].format->emit_idx](ptr); - - if (specular_fog) - GL_EXTCALL(glFogCoordfEXT((float)(*(const DWORD *)ptr >> 24))); - } - - tmp_tex_mask = tex_mask; - while (tmp_tex_mask) - { - texture_idx = wined3d_bit_scan(&tmp_tex_mask); - coord_idx = state->texture_states[texture_idx][WINED3D_TSS_TEXCOORD_INDEX]; - ptr = tex_coords[coord_idx] + (stride_idx * si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].stride); - ops->texcoord[si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].format->emit_idx]( - GL_TEXTURE0_ARB + context_gl->tex_unit_map[texture_idx], ptr); - } + if (!(use_map & 1u << element_idx)) + continue;
- if (position) - { - ptr = position + stride_idx * si->elements[WINED3D_FFP_POSITION].stride; - ops->position[si->elements[WINED3D_FFP_POSITION].format->emit_idx](ptr); + ptr = si->elements[element_idx].data.addr + si->elements[element_idx].stride * stride_idx; + ops->generic[si->elements[element_idx].format->emit_idx](element_idx, ptr); } }
gl_info->gl_ops.gl.p_glEnd(); - checkGLcall("draw immediate mode"); }
static void wined3d_context_gl_draw_indirect(struct wined3d_context_gl *context_gl, const struct wined3d_state *state, @@ -5193,71 +5023,6 @@ static const void *get_vertex_attrib_pointer(const struct wined3d_stream_info_el return offset; }
-void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context_gl, - const struct wined3d_stream_info *si, GLuint *current_bo, const struct wined3d_state *state) -{ - const struct wined3d_gl_info *gl_info = context_gl->gl_info; - const struct wined3d_format_gl *format_gl; - unsigned int mapped_stage = 0; - unsigned int texture_idx; - GLuint bo; - - for (texture_idx = 0; texture_idx < context_gl->c.d3d_info->ffp_fragment_caps.max_blend_stages; ++texture_idx) - { - unsigned int coord_idx = state->texture_states[texture_idx][WINED3D_TSS_TEXCOORD_INDEX]; - - if ((mapped_stage = context_gl->tex_unit_map[texture_idx]) == WINED3D_UNMAPPED_STAGE) - continue; - - if (mapped_stage >= gl_info->limits.texture_coords) - { - FIXME("Attempted to load unsupported texture coordinate %u.\n", mapped_stage); - continue; - } - - if (coord_idx < WINED3D_MAX_FFP_TEXTURES && (si->use_map & (1u << (WINED3D_FFP_TEXCOORD0 + coord_idx)))) - { - const struct wined3d_stream_info_element *e = &si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx]; - - TRACE("Setting up texture %u, idx %u, coord_idx %u, data %s.\n", - texture_idx, mapped_stage, coord_idx, debug_bo_address(&e->data)); - - bo = wined3d_bo_gl_id(e->data.buffer_object); - if (*current_bo != bo) - { - GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, bo)); - checkGLcall("glBindBuffer"); - *current_bo = bo; - } - - GL_EXTCALL(glClientActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage)); - checkGLcall("glClientActiveTextureARB"); - - /* The coords to supply depend completely on the fvf/vertex shader. */ - format_gl = wined3d_format_gl(e->format); - gl_info->gl_ops.gl.p_glTexCoordPointer(format_gl->vtx_format, format_gl->vtx_type, e->stride, - get_vertex_attrib_pointer(e, state)); - gl_info->gl_ops.gl.p_glEnableClientState(GL_TEXTURE_COORD_ARRAY); - if (bo) - wined3d_buffer_validate_user(state->streams[e->stream_idx].buffer); - } - else - { - GL_EXTCALL(glMultiTexCoord4fARB(GL_TEXTURE0_ARB + mapped_stage, 0, 0, 0, 1)); - } - } - if (gl_info->supported[NV_REGISTER_COMBINERS]) - { - /* The number of the mapped stages increases monotonically, so it's fine to use the last used one. */ - for (texture_idx = mapped_stage + 1; texture_idx < gl_info->limits.ffp_textures; ++texture_idx) - { - GL_EXTCALL(glMultiTexCoord4fARB(GL_TEXTURE0_ARB + texture_idx, 0, 0, 0, 1)); - } - } - - checkGLcall("loadTexCoords"); -} - /* This should match any arrays loaded in wined3d_context_gl_load_vertex_data(). */ static void wined3d_context_gl_unload_vertex_data(struct wined3d_context_gl *context_gl) { @@ -5274,202 +5039,6 @@ static void wined3d_context_gl_unload_vertex_data(struct wined3d_context_gl *con context_gl->c.namedArraysLoaded = FALSE; }
-static void wined3d_context_gl_load_vertex_data(struct wined3d_context_gl *context_gl, - const struct wined3d_stream_info *si, const struct wined3d_state *state) -{ - const struct wined3d_gl_info *gl_info = context_gl->gl_info; - const struct wined3d_stream_info_element *e; - const struct wined3d_format_gl *format_gl; - GLuint current_bo, bo; - const void *offset; - - TRACE("context_gl %p, si %p, state %p.\n", context_gl, si, state); - - /* This is used for the fixed-function pipeline only, and the - * fixed-function pipeline doesn't do instancing. */ - current_bo = gl_info->supported[ARB_VERTEX_BUFFER_OBJECT] ? ~0u : 0; - - /* Blend data */ - if ((si->use_map & (1u << WINED3D_FFP_BLENDWEIGHT)) - || si->use_map & (1u << WINED3D_FFP_BLENDINDICES)) - { - /* TODO: Support vertex blending in immediate mode draws. No need to - * write a FIXME here, this is done after the general vertex - * declaration decoding. */ - WARN("Vertex blending not supported.\n"); - } - - /* Point Size */ - if (si->use_map & (1u << WINED3D_FFP_PSIZE)) - { - /* No such functionality in the fixed-function GL pipeline. */ - WARN("Per-vertex point size not supported.\n"); - } - - /* Position */ - if (si->use_map & (1u << WINED3D_FFP_POSITION)) - { - e = &si->elements[WINED3D_FFP_POSITION]; - format_gl = wined3d_format_gl(e->format); - offset = get_vertex_attrib_pointer(e, state); - - bo = wined3d_bo_gl_id(e->data.buffer_object); - if (current_bo != bo) - { - GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, bo)); - checkGLcall("glBindBuffer"); - current_bo = bo; - } - - TRACE("glVertexPointer(%#x, %#x, %#x, %p);\n", format_gl->vtx_format, format_gl->vtx_type, e->stride, offset); - gl_info->gl_ops.gl.p_glVertexPointer(format_gl->vtx_format, format_gl->vtx_type, e->stride, offset); - checkGLcall("glVertexPointer(...)"); - gl_info->gl_ops.gl.p_glEnableClientState(GL_VERTEX_ARRAY); - checkGLcall("glEnableClientState(GL_VERTEX_ARRAY)"); - if (bo) - wined3d_buffer_validate_user(state->streams[e->stream_idx].buffer); - } - - /* Normals */ - if (si->use_map & (1u << WINED3D_FFP_NORMAL)) - { - e = &si->elements[WINED3D_FFP_NORMAL]; - format_gl = wined3d_format_gl(e->format); - offset = get_vertex_attrib_pointer(e, state); - - bo = wined3d_bo_gl_id(e->data.buffer_object); - if (current_bo != bo) - { - GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, bo)); - checkGLcall("glBindBuffer"); - current_bo = bo; - } - - TRACE("glNormalPointer(%#x, %#x, %p);\n", format_gl->vtx_type, e->stride, offset); - gl_info->gl_ops.gl.p_glNormalPointer(format_gl->vtx_type, e->stride, offset); - checkGLcall("glNormalPointer(...)"); - gl_info->gl_ops.gl.p_glEnableClientState(GL_NORMAL_ARRAY); - checkGLcall("glEnableClientState(GL_NORMAL_ARRAY)"); - if (bo) - wined3d_buffer_validate_user(state->streams[e->stream_idx].buffer); - } - else - { - gl_info->gl_ops.gl.p_glNormal3f(0, 0, 0); - checkGLcall("glNormal3f(0, 0, 0)"); - } - - /* Diffuse colour */ - if (si->use_map & (1u << WINED3D_FFP_DIFFUSE)) - { - e = &si->elements[WINED3D_FFP_DIFFUSE]; - format_gl = wined3d_format_gl(e->format); - offset = get_vertex_attrib_pointer(e, state); - - bo = wined3d_bo_gl_id(e->data.buffer_object); - if (current_bo != bo) - { - GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, bo)); - checkGLcall("glBindBuffer"); - current_bo = bo; - } - - TRACE("glColorPointer(%#x, %#x %#x, %p);\n", - format_gl->vtx_format, format_gl->vtx_type, e->stride, offset); - gl_info->gl_ops.gl.p_glColorPointer(format_gl->vtx_format, format_gl->vtx_type, e->stride, offset); - checkGLcall("glColorPointer(4, GL_UNSIGNED_BYTE, ...)"); - gl_info->gl_ops.gl.p_glEnableClientState(GL_COLOR_ARRAY); - checkGLcall("glEnableClientState(GL_COLOR_ARRAY)"); - if (bo) - wined3d_buffer_validate_user(state->streams[e->stream_idx].buffer); - } - else - { - gl_info->gl_ops.gl.p_glColor4f(1.0f, 1.0f, 1.0f, 1.0f); - checkGLcall("glColor4f(1, 1, 1, 1)"); - } - - /* Specular colour */ - if (si->use_map & (1u << WINED3D_FFP_SPECULAR)) - { - TRACE("Setting specular colour.\n"); - - e = &si->elements[WINED3D_FFP_SPECULAR]; - offset = get_vertex_attrib_pointer(e, state); - - if (gl_info->supported[EXT_SECONDARY_COLOR]) - { - GLint format; - GLenum type; - - format_gl = wined3d_format_gl(e->format); - type = format_gl->vtx_type; - format = format_gl->vtx_format; - - bo = wined3d_bo_gl_id(e->data.buffer_object); - if (current_bo != bo) - { - GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, bo)); - checkGLcall("glBindBuffer"); - current_bo = bo; - } - - if (format != 4 || (gl_info->quirks & WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA)) - { - /* Usually specular colors only allow 3 components, since they have no alpha. In D3D, the specular alpha - * contains the fog coordinate, which is passed to GL with GL_EXT_fog_coord. However, the fixed function - * vertex pipeline can pass the specular alpha through, and pixel shaders can read it. So it GL accepts - * 4 component secondary colors use it - */ - TRACE("glSecondaryColorPointer(%#x, %#x, %#x, %p);\n", format, type, e->stride, offset); - GL_EXTCALL(glSecondaryColorPointerEXT(format, type, e->stride, offset)); - checkGLcall("glSecondaryColorPointerEXT(format, type, ...)"); - } - else - { - switch (type) - { - case GL_UNSIGNED_BYTE: - TRACE("glSecondaryColorPointer(3, GL_UNSIGNED_BYTE, %#x, %p);\n", e->stride, offset); - GL_EXTCALL(glSecondaryColorPointerEXT(3, GL_UNSIGNED_BYTE, e->stride, offset)); - checkGLcall("glSecondaryColorPointerEXT(3, GL_UNSIGNED_BYTE, ...)"); - break; - - default: - FIXME("Add 4 component specular colour pointers for type %#x.\n", type); - /* Make sure that the right colour component is dropped. */ - TRACE("glSecondaryColorPointer(3, %#x, %#x, %p);\n", type, e->stride, offset); - GL_EXTCALL(glSecondaryColorPointerEXT(3, type, e->stride, offset)); - checkGLcall("glSecondaryColorPointerEXT(3, type, ...)"); - } - } - gl_info->gl_ops.gl.p_glEnableClientState(GL_SECONDARY_COLOR_ARRAY_EXT); - checkGLcall("glEnableClientState(GL_SECONDARY_COLOR_ARRAY_EXT)"); - if (bo) - wined3d_buffer_validate_user(state->streams[e->stream_idx].buffer); - } - else - { - WARN("Specular colour is not supported in this GL implementation.\n"); - } - } - else - { - if (gl_info->supported[EXT_SECONDARY_COLOR]) - { - GL_EXTCALL(glSecondaryColor3fEXT)(0, 0, 0); - checkGLcall("glSecondaryColor3fEXT(0, 0, 0)"); - } - else - { - WARN("Specular colour is not supported in this GL implementation.\n"); - } - } - - /* Texture coordinates */ - wined3d_context_gl_load_tex_coords(context_gl, si, ¤t_bo, state); -} - static void wined3d_context_gl_unload_numbered_array(struct wined3d_context_gl *context_gl, unsigned int i) { const struct wined3d_gl_info *gl_info = context_gl->gl_info; @@ -5726,17 +5295,7 @@ void wined3d_context_gl_update_stream_sources(struct wined3d_context_gl *context return;
wined3d_context_gl_unload_vertex_data(context_gl); - if (context_gl->c.d3d_info->ffp_generic_attributes || use_vs(state)) - { - TRACE("Loading numbered arrays.\n"); - wined3d_context_gl_load_numbered_arrays(context_gl, &context_gl->c.stream_info, state); - return; - } - - TRACE("Loading named arrays.\n"); - wined3d_context_gl_unload_numbered_arrays(context_gl); - wined3d_context_gl_load_vertex_data(context_gl, &context_gl->c.stream_info, state); - context_gl->c.namedArraysLoaded = TRUE; + wined3d_context_gl_load_numbered_arrays(context_gl, &context_gl->c.stream_info, state); }
static void apply_texture_blit_state(const struct wined3d_gl_info *gl_info, struct gl_texture *texture, diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index f473a0e8c2c..a462f717bdf 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3072,20 +3072,11 @@ static bool wined3d_cs_map_upload_bo(struct wined3d_device_context *context, str
if (flags & (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE)) { - const struct wined3d_d3d_info *d3d_info = &context->device->adapter->d3d_info; struct wined3d_device *device = context->device; struct wined3d_bo_address addr; struct wined3d_bo *bo; uint8_t *map_ptr;
- /* We can't use persistent maps if we might need to do vertex attribute - * conversion; that will cause the CS thread to invalidate the BO. */ - if (!d3d_info->vertex_bgra || !d3d_info->ffp_generic_attributes) - { - TRACE("Not returning a persistent buffer because we might need to do vertex attribute conversion.\n"); - return false; - } - if (resource->pin_sysmem) { TRACE("Not allocating an upload buffer because system memory is pinned for this resource.\n"); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 7b46c648db7..c114734e013 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11683,7 +11683,6 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_adapter *adapter, const struct wined3d_gl_info *gl_info = &wined3d_adapter_gl_const(adapter)->gl_info;
caps->emulated_flatshading = !needs_legacy_glsl_syntax(gl_info); - caps->ffp_generic_attributes = TRUE; caps->max_active_lights = WINED3D_MAX_ACTIVE_LIGHTS; caps->max_vertex_blend_matrices = MAX_VERTEX_BLENDS; caps->max_vertex_blend_matrix_index = 0; diff --git a/dlls/wined3d/shader_spirv.c b/dlls/wined3d/shader_spirv.c index b5cba701103..1079c19b99b 100644 --- a/dlls/wined3d/shader_spirv.c +++ b/dlls/wined3d/shader_spirv.c @@ -1134,7 +1134,6 @@ static void spirv_vertex_pipe_vk_vp_disable(const struct wined3d_context *contex static void spirv_vertex_pipe_vk_vp_get_caps(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps) { memset(caps, 0, sizeof(*caps)); - caps->ffp_generic_attributes = TRUE; }
static unsigned int spirv_vertex_pipe_vk_vp_get_emul_mask(const struct wined3d_adapter *adapter) diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 52d3b01b8cd..9a27bb5b2bf 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -762,8 +762,6 @@ GLenum wined3d_context_gl_get_offscreen_gl_buffer(const struct wined3d_context_g const unsigned int *wined3d_context_gl_get_tex_unit_mapping(const struct wined3d_context_gl *context_gl, const struct wined3d_shader_version *shader_version, unsigned int *base, unsigned int *count); HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wined3d_swapchain_gl *swapchain_gl); -void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context_gl, - const struct wined3d_stream_info *si, GLuint *current_bo, const struct wined3d_state *state); void *wined3d_context_gl_map_bo_address(struct wined3d_context_gl *context_gl, const struct wined3d_bo_address *data, size_t size, uint32_t flags); struct wined3d_context_gl *wined3d_context_gl_reacquire(struct wined3d_context_gl *context_gl); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0167000343e..4df086464c8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -221,7 +221,6 @@ struct wined3d_d3d_info struct wined3d_d3d_limits limits; uint32_t wined3d_creation_flags; uint32_t emulated_flatshading : 1; - uint32_t ffp_generic_attributes : 1; uint32_t ffp_alpha_test : 1; uint32_t vs_clipping : 1; uint32_t shader_double_precision : 1; @@ -1999,7 +1998,6 @@ struct wined3d_fragment_pipe_ops struct wined3d_vertex_caps { BOOL emulated_flatshading; - BOOL ffp_generic_attributes; DWORD max_active_lights; DWORD max_vertex_blend_matrices; DWORD max_vertex_blend_matrix_index; @@ -3795,7 +3793,6 @@ static inline void wined3d_resource_wait_idle(const struct wined3d_resource *res enum wined3d_buffer_conversion_type { CONV_NONE, - CONV_D3DCOLOR, };
struct wined3d_buffer
From: Elizabeth Figura zfigura@codeweavers.com
--- dlls/wined3d/buffer.c | 348 +-------------------------------- dlls/wined3d/wined3d_private.h | 14 -- 2 files changed, 9 insertions(+), 353 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 4fa8b811661..608be16b9df 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -31,11 +31,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); #define WINED3D_BUFFER_HASDESC 0x01 /* A vertex description has been found. */ #define WINED3D_BUFFER_USE_BO 0x02 /* Use a buffer object for this buffer. */
-#define VB_MAXDECLCHANGES 100 /* After that number of decl changes we stop converting */ -#define VB_RESETDECLCHANGE 1000 /* Reset the decl changecount after that number of draws */ -#define VB_MAXFULLCONVERSIONS 5 /* Number of full conversions before we stop converting */ -#define VB_RESETFULLCONVS 20 /* Reset full conversion counts after that number of draws */ - #define SB_MIN_SIZE (512 * 1024) /* Minimum size of an allocated streaming buffer. */
struct wined3d_buffer_ops @@ -250,200 +245,6 @@ static BOOL wined3d_buffer_gl_create_buffer_object(struct wined3d_buffer_gl *buf return TRUE; }
-static BOOL buffer_process_converted_attribute(struct wined3d_buffer *buffer, - const enum wined3d_buffer_conversion_type conversion_type, - const struct wined3d_stream_info_element *attrib, UINT *stride_this_run) -{ - const struct wined3d_format *format = attrib->format; - BOOL ret = FALSE; - unsigned int i; - DWORD_PTR data; - - /* Check for some valid situations which cause us pain. One is if the buffer is used for - * constant attributes(stride = 0), the other one is if the buffer is used on two streams - * with different strides. In the 2nd case we might have to drop conversion entirely, - * it is possible that the same bytes are once read as FLOAT2 and once as UBYTE4N. - */ - if (!attrib->stride) - { - FIXME("%s used with stride 0, let's hope we get the vertex stride from somewhere else.\n", - debug_d3dformat(format->id)); - } - else if (attrib->stride != *stride_this_run && *stride_this_run) - { - FIXME("Got two concurrent strides, %d and %d.\n", attrib->stride, *stride_this_run); - } - else - { - *stride_this_run = attrib->stride; - if (buffer->stride != *stride_this_run) - { - /* We rely that this happens only on the first converted attribute that is found, - * if at all. See above check - */ - TRACE("Reconverting because converted attributes occur, and the stride changed.\n"); - buffer->stride = *stride_this_run; - free(buffer->conversion_map); - buffer->conversion_map = calloc(buffer->stride, sizeof(*buffer->conversion_map)); - ret = TRUE; - } - } - - data = ((DWORD_PTR)attrib->data.addr) % buffer->stride; - for (i = 0; i < format->byte_count; ++i) - { - DWORD_PTR idx = (data + i) % buffer->stride; - if (buffer->conversion_map[idx] != conversion_type) - { - TRACE("Byte %Iu in vertex changed:\n", idx); - TRACE(" It was type %#x, is %#x now.\n", buffer->conversion_map[idx], conversion_type); - ret = TRUE; - buffer->conversion_map[idx] = conversion_type; - } - } - - return ret; -} - -static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct wined3d_stream_info *si, - const struct wined3d_state *state, UINT attrib_idx, DWORD fixup_flags, UINT *stride_this_run) -{ - const struct wined3d_stream_info_element *attrib = &si->elements[attrib_idx]; - BOOL ret = FALSE; - - /* Ignore attributes that do not have our vbo. After that check we can be sure that the attribute is - * there, on nonexistent attribs the vbo is 0. - */ - if (!(si->use_map & (1u << attrib_idx)) - || state->streams[attrib->stream_idx].buffer != This) - return FALSE; - - /* Look for newly appeared conversion */ - if (This->conversion_map) - ret = buffer_process_converted_attribute(This, CONV_NONE, attrib, stride_this_run); - - return ret; -} - -static BOOL buffer_find_decl(struct wined3d_buffer *This, const struct wined3d_stream_info *si, - const struct wined3d_state *state, DWORD fixup_flags) -{ - UINT stride_this_run = 0; - BOOL ret = FALSE; - - /* In d3d7 the vertex buffer declaration NEVER changes because it is stored in the d3d7 vertex buffer. - * Once we have our declaration there is no need to look it up again. Index buffers also never need - * conversion, so once the (empty) conversion structure is created don't bother checking again - */ - if (This->flags & WINED3D_BUFFER_HASDESC) - { - if(This->resource.usage & WINED3DUSAGE_STATICDECL) return FALSE; - } - - if (!fixup_flags) - { - TRACE("No fixup required.\n"); - if(This->conversion_map) - { - free(This->conversion_map); - This->conversion_map = NULL; - This->stride = 0; - return TRUE; - } - - return FALSE; - } - - TRACE("Finding vertex buffer conversion information\n"); - /* Certain declaration types need some fixups before we can pass them to - * opengl. This means D3DCOLOR attributes with fixed function vertex - * processing, FLOAT4 POSITIONT with fixed function, and FLOAT16 if - * GL_ARB_half_float_vertex is not supported. - * - * Note for d3d8 and d3d9: - * The vertex buffer FVF doesn't help with finding them, we have to use - * the decoded vertex declaration and pick the things that concern the - * current buffer. A problem with this is that this can change between - * draws, so we have to validate the information and reprocess the buffer - * if it changes, and avoid false positives for performance reasons. - * WineD3D doesn't even know the vertex buffer any more, it is managed - * by the client libraries and passed to SetStreamSource and ProcessVertices - * as needed. - * - * We have to distinguish between vertex shaders and fixed function to - * pick the way we access the strided vertex information. - * - * This code sets up a per-byte array with the size of the detected - * stride of the arrays in the buffer. For each byte we have a field - * that marks the conversion needed on this byte. For example, the - * following declaration with fixed function vertex processing: - * - * POSITIONT, FLOAT4 - * NORMAL, FLOAT3 - * DIFFUSE, FLOAT16_4 - * SPECULAR, D3DCOLOR - * - * Will result in - * { POSITIONT }{ NORMAL }{ DIFFUSE }{SPECULAR } - * [P][P][P][P][P][P][P][P][P][P][P][P][P][P][P][P][0][0][0][0][0][0][0][0][0][0][0][0][F][F][F][F][F][F][F][F][C][C][C][C] - * - * Where in this example map P means 4 component position conversion, 0 - * means no conversion, F means FLOAT16_2 conversion and C means D3DCOLOR - * conversion (red / blue swizzle). - * - * If we're doing conversion and the stride changes we have to reconvert - * the whole buffer. Note that we do not mind if the semantic changes, - * we only care for the conversion type. So if the NORMAL is replaced - * with a TEXCOORD, nothing has to be done, or if the DIFFUSE is replaced - * with a D3DCOLOR BLENDWEIGHT we can happily dismiss the change. Some - * conversion types depend on the semantic as well, for example a FLOAT4 - * texcoord needs no conversion while a FLOAT4 positiont needs one - */ - - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_POSITION, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_BLENDWEIGHT, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_BLENDINDICES, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_NORMAL, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_DIFFUSE, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_SPECULAR, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_TEXCOORD0, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_TEXCOORD1, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_TEXCOORD2, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_TEXCOORD3, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_TEXCOORD4, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_TEXCOORD5, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_TEXCOORD6, - fixup_flags, &stride_this_run) || ret; - ret = buffer_check_attribute(This, si, state, WINED3D_FFP_TEXCOORD7, - fixup_flags, &stride_this_run) || ret; - - if (!stride_this_run && This->conversion_map) - { - /* Sanity test */ - if (!ret) - ERR("no converted attributes found, old conversion map exists, and no declaration change?\n"); - free(This->conversion_map); - This->conversion_map = NULL; - This->stride = 0; - } - - if (ret) TRACE("Conversion information changed\n"); - - return ret; -} - ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer) { unsigned int refcount = InterlockedIncrement(&buffer->resource.ref); @@ -453,62 +254,6 @@ ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer) return refcount; }
-static void buffer_conversion_upload(struct wined3d_buffer *buffer, struct wined3d_context *context) -{ - unsigned int i, j, range_idx, start, end, vertex_count; - struct wined3d_bo_address src, dst; - BYTE *data; - - if (!wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_SYSMEM)) - { - ERR("Failed to load system memory.\n"); - return; - } - buffer->resource.pin_sysmem = 1; - - /* Now for each vertex in the buffer that needs conversion. */ - vertex_count = buffer->resource.size / buffer->stride; - - if (!(data = malloc(buffer->resource.size))) - { - ERR("Out of memory.\n"); - return; - } - - for (range_idx = 0; range_idx < buffer->dirty_range_count; ++range_idx) - { - start = buffer->dirty_ranges[range_idx].offset; - end = start + buffer->dirty_ranges[range_idx].size; - - memcpy(data + start, (BYTE *)buffer->resource.heap_memory + start, end - start); - for (i = start / buffer->stride; i < min((end / buffer->stride) + 1, vertex_count); ++i) - { - for (j = 0; j < buffer->stride;) - { - switch (buffer->conversion_map[j]) - { - case CONV_NONE: - /* Done already */ - j += sizeof(DWORD); - break; - default: - FIXME("Unimplemented conversion %d in shifted conversion.\n", buffer->conversion_map[j]); - ++j; - } - } - } - } - - dst.buffer_object = buffer->buffer_object; - dst.addr = NULL; - src.buffer_object = NULL; - src.addr = data; - wined3d_context_copy_bo_address(context, &dst, &src, - buffer->dirty_range_count, buffer->dirty_ranges, WINED3D_MAP_WRITE); - - free(data); -} - BOOL wined3d_buffer_prepare_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location) { @@ -576,6 +321,9 @@ BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer, break;
case WINED3D_LOCATION_BUFFER: + { + uint32_t map_flags = WINED3D_MAP_WRITE; + if (buffer->locations & WINED3D_LOCATION_CLEARED) { /* FIXME: Clear the buffer on the GPU if possible. */ @@ -589,21 +337,13 @@ BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer, src.buffer_object = NULL; src.addr = buffer->resource.heap_memory;
- if (!buffer->conversion_map) - { - uint32_t map_flags = WINED3D_MAP_WRITE; + if (buffer_is_fully_dirty(buffer)) + map_flags |= WINED3D_MAP_DISCARD;
- if (buffer_is_fully_dirty(buffer)) - map_flags |= WINED3D_MAP_DISCARD; - - wined3d_context_copy_bo_address(context, &dst, &src, - buffer->dirty_range_count, buffer->dirty_ranges, map_flags); - } - else - { - buffer_conversion_upload(buffer, context); - } + wined3d_context_copy_bo_address(context, &dst, &src, + buffer->dirty_range_count, buffer->dirty_ranges, map_flags); break; + }
default: ERR("Invalid location %s.\n", wined3d_debug_location(location)); @@ -682,10 +422,6 @@ static void buffer_resource_unload(struct wined3d_resource *resource)
context_release(context);
- free(buffer->conversion_map); - buffer->conversion_map = NULL; - buffer->stride = 0; - buffer->conversion_stride = 0; buffer->flags &= ~WINED3D_BUFFER_HASDESC; }
@@ -711,7 +447,6 @@ static void wined3d_buffer_destroy_object(void *object) wined3d_buffer_unload_location(buffer, context, WINED3D_LOCATION_BUFFER); context_release(context); } - free(buffer->conversion_map); free(buffer->dirty_ranges); }
@@ -749,8 +484,6 @@ void * CDECL wined3d_buffer_get_parent(const struct wined3d_buffer *buffer) void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state) { - BOOL decl_changed = FALSE; - TRACE("buffer %p.\n", buffer);
if (buffer->resource.map_count && buffer->map_ptr) @@ -763,12 +496,8 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context * WARN("Loading mapped buffer.\n"); }
- /* TODO: Make converting independent from VBOs */ if (!(buffer->flags & WINED3D_BUFFER_USE_BO)) - { - /* Not doing any conversion */ return; - }
if (!wined3d_buffer_prepare_location(buffer, context, WINED3D_LOCATION_BUFFER)) { @@ -779,69 +508,10 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context * /* Reading the declaration makes only sense if we have valid state information * (i.e., if this function is called during draws). */ if (state) - { - DWORD fixup_flags = 0; - - decl_changed = buffer_find_decl(buffer, &context->stream_info, state, fixup_flags); buffer->flags |= WINED3D_BUFFER_HASDESC; - }
- if (!decl_changed && !(buffer->flags & WINED3D_BUFFER_HASDESC && buffer_is_dirty(buffer))) - { - ++buffer->draw_count; - if (buffer->draw_count > VB_RESETDECLCHANGE) - buffer->decl_change_count = 0; - if (buffer->draw_count > VB_RESETFULLCONVS) - buffer->full_conversion_count = 0; + if (!(buffer->flags & WINED3D_BUFFER_HASDESC && buffer_is_dirty(buffer))) return; - } - - /* If applications change the declaration over and over, reconverting all the time is a huge - * performance hit. So count the declaration changes and release the VBO if there are too many - * of them (and thus stop converting) - */ - if (decl_changed) - { - ++buffer->decl_change_count; - buffer->draw_count = 0; - - if (buffer->decl_change_count > VB_MAXDECLCHANGES - || (buffer->conversion_map && (buffer->resource.usage & WINED3DUSAGE_DYNAMIC))) - { - FIXME("Too many declaration changes or converting dynamic buffer, stopping converting.\n"); - wined3d_buffer_drop_bo(buffer); - return; - } - - /* The declaration changed, reload the whole buffer. */ - WARN("Reloading buffer because of a vertex declaration change.\n"); - buffer_invalidate_bo_range(buffer, 0, 0); - } - else - { - /* However, it is perfectly fine to change the declaration every now and then. We don't want a game that - * changes it every minute drop the VBO after VB_MAX_DECL_CHANGES minutes. So count draws without - * decl changes and reset the decl change count after a specific number of them - */ - if (buffer->conversion_map && buffer_is_fully_dirty(buffer)) - { - ++buffer->full_conversion_count; - if (buffer->full_conversion_count > VB_MAXFULLCONVERSIONS) - { - FIXME("Too many full buffer conversions, stopping converting.\n"); - wined3d_buffer_drop_bo(buffer); - return; - } - } - else - { - ++buffer->draw_count; - if (buffer->draw_count > VB_RESETDECLCHANGE) - buffer->decl_change_count = 0; - if (buffer->draw_count > VB_RESETFULLCONVS) - buffer->full_conversion_count = 0; - } - }
if (!wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_BUFFER)) ERR("Failed to load buffer location.\n"); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 4df086464c8..17b57424839 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3788,13 +3788,6 @@ static inline void wined3d_resource_wait_idle(const struct wined3d_resource *res } }
-/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other - * fixed function semantics as D3DCOLOR or FLOAT16 */ -enum wined3d_buffer_conversion_type -{ - CONV_NONE, -}; - struct wined3d_buffer { struct wined3d_resource resource; @@ -3812,13 +3805,6 @@ struct wined3d_buffer * uploaded to BUFFER. */ struct wined3d_range *dirty_ranges; SIZE_T dirty_range_count, dirty_ranges_capacity; - - /* conversion stuff */ - UINT decl_change_count, full_conversion_count; - UINT draw_count; - UINT stride; /* 0 if no conversion */ - enum wined3d_buffer_conversion_type *conversion_map; /* NULL if no conversion */ - UINT conversion_stride; /* 0 if no shifted conversion */ };
static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resource *resource)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=145857
Your paranoid android.
=== debian11b (64 bit WoW report) ===
Report validation errors: shell32:shelllink crashed (c0000005)