Module: wine
Branch: master
Commit: 07228191d0550e9d18a2148c2bc5363a58f352d7
URL: https://gitlab.winehq.org/wine/wine/-/commit/07228191d0550e9d18a2148c2bc536…
Author: Matteo Bruni <mbruni(a)codeweavers.com>
Date: Fri Jul 14 23:10:09 2023 +0200
wined3d: Don't override texture parameters for COND_NP2 on multisample textures.
Those parameters are not supported on multisample textures in the
first place (basically, GL mandates ARB_sampler_objects for those).
The combination COND_NP2 + ARB_texture_multisample is not expected to
happen without wined3d configuration overrides.
---
dlls/wined3d/texture.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index a531998ddd2..2fc6d5c06df 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -1377,7 +1377,8 @@ GLuint wined3d_texture_gl_prepare_gl_texture(struct wined3d_texture_gl *texture_
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
}
- if (texture_gl->t.flags & WINED3D_TEXTURE_COND_NP2)
+ if (texture_gl->t.flags & WINED3D_TEXTURE_COND_NP2 && target != GL_TEXTURE_2D_MULTISAMPLE
+ && target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
{
/* Conditional non power of two textures use a different clamping
* default. If we're using the GL_WINE_normalized_texrect partial
Module: wine
Branch: master
Commit: 5f0d6afcd7b27b6af381d8c99ab9cb692933d09c
URL: https://gitlab.winehq.org/wine/wine/-/commit/5f0d6afcd7b27b6af381d8c99ab9cb…
Author: Matteo Bruni <mbruni(a)codeweavers.com>
Date: Thu Jul 13 21:31:37 2023 +0200
wined3d: Don't skip FFP projection transform update.
In the same vein as e106bbdd39a5f27bce028ed992033eb0a5635f60.
---
dlls/wined3d/ffp_gl.c | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/dlls/wined3d/ffp_gl.c b/dlls/wined3d/ffp_gl.c
index 8a87248de4f..e4c44f77609 100644
--- a/dlls/wined3d/ffp_gl.c
+++ b/dlls/wined3d/ffp_gl.c
@@ -3528,6 +3528,8 @@ static void transform_projection(struct wined3d_context *context, const struct w
const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info;
struct wined3d_matrix projection;
+ TRACE("context %p, state %p, state_id %lu.\n", context, state, state_id);
+
gl_info->gl_ops.gl.p_glMatrixMode(GL_PROJECTION);
checkGLcall("glMatrixMode(GL_PROJECTION)");
@@ -3558,6 +3560,8 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
BOOL wasrhw = context->last_was_rhw;
unsigned int i;
+ TRACE("context %p, state %p, state_id %lu.\n", context, state, state_id);
+
transformed = context->stream_info.position_transformed;
if (transformed != context->last_was_rhw && !useVertexShaderFunction)
updateFog = TRUE;
@@ -3574,25 +3578,12 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
* make sure they're properly set. */
if (!useVertexShaderFunction)
{
- /* TODO: Move this mainly to the viewport state and only apply when
- * the vp has changed or transformed / untransformed was switched. */
if (wasrhw != context->last_was_rhw
- && !isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION))
&& !isStateDirty(context, STATE_VIEWPORT))
transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION));
- /* World matrix needs reapplication here only if we're switching between rhw and non-rhw
- * mode.
- *
- * If a vertex shader is used, the world matrix changed and then vertex shader unbound
- * this check will fail and the matrix not applied again. This is OK because a simple
- * world matrix change reapplies the matrix - These checks here are only to satisfy the
- * needs of the vertex declaration.
- *
- * World and view matrix go into the same gl matrix, so only apply them when neither is
- * dirty
- */
- if (transformed != wasrhw && !isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)))
- && !isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_VIEW)))
+ /* World matrix needs reapplication here only if we're switching
+ * between rhw and non-rhw mode. */
+ if (transformed != wasrhw)
transform_world(context, state, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)));
if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_COLORVERTEX)))
context_apply_state(context, state, STATE_RENDER(WINED3D_RS_COLORVERTEX));
@@ -3830,8 +3821,9 @@ static void viewport_miscpart_cc(struct wined3d_context *context,
static void viewport_vertexpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
- if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION)))
- transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION));
+ TRACE("context %p, state %p, state_id %lu.\n", context, state, state_id);
+
+ transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION));
if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE))
&& state->render_states[WINED3D_RS_POINTSCALEENABLE])
state_pscale(context, state, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE));