mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patch to allow NULL pointer for optional arguments of D3DXIntersectTri.
This commit is contained in:
parent
e5b7f0c052
commit
d7bdce7fb6
@ -39,10 +39,11 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
===================================
|
||||
|
||||
**Bugfixes and features included in the next upcoming release [11]:**
|
||||
**Bugfixes and features included in the next upcoming release [12]:**
|
||||
|
||||
* Add stub for NtSetLdtEntries/ZwSetLdtEntries ([Wine Bug #26268](https://bugs.winehq.org/show_bug.cgi?id=26268))
|
||||
* Add stubs for vectored continue handler ([Wine Bug #30572](https://bugs.winehq.org/show_bug.cgi?id=30572))
|
||||
* Allow NULL pointer for optional arguments of D3DXIntersectTri ([Wine Bug #35133](https://bugs.winehq.org/show_bug.cgi?id=35133))
|
||||
* Allow selection of audio device for PulseAudio backend
|
||||
* CoWaitForMultipleHandles shouldn't process window events when APC calls are queued ([Wine Bug #32568](https://bugs.winehq.org/show_bug.cgi?id=32568))
|
||||
* Exception during start of fr-043 caused by missing DXTn support ([Wine Bug #37391](https://bugs.winehq.org/show_bug.cgi?id=37391))
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -12,6 +12,7 @@ wine-compholio (1.7.31) UNRELEASED; urgency=low
|
||||
* Added patch with stub for IoCsqInitialize.
|
||||
* Added patch with stubs for vectored continue handler functions.
|
||||
* Added patch to fix wglDescribePixelFormat when NULL is passed as pixel format descriptor.
|
||||
* Added patch to allow NULL pointer for optional arguments of D3DXIntersectTri.
|
||||
* Removed patch for iphlpapi stub functions (accepted upstream).
|
||||
* Removed patches for FindFirstFileExW (accepted upstream).
|
||||
* Removed patches for TLB dependencies lookup in resources (accepted upstream).
|
||||
|
@ -30,6 +30,7 @@ PATCHLIST := \
|
||||
d3dx9_36-DXTn.ok \
|
||||
d3dx9_36-Filter_Warnings.ok \
|
||||
d3dx9_36-GetShaderSemantics.ok \
|
||||
d3dx9_36-IntersectTri.ok \
|
||||
d3dx9_36-Texture_Align.ok \
|
||||
d3dx9_36-UpdateSkinnedMesh.ok \
|
||||
dbghelp-KdHelp.ok \
|
||||
@ -380,6 +381,24 @@ d3dx9_36-GetShaderSemantics.ok:
|
||||
echo '+ { "d3dx9_36-GetShaderSemantics", "Christian Costa", "Implement D3DXGetShaderInputSemantics." },'; \
|
||||
) > d3dx9_36-GetShaderSemantics.ok
|
||||
|
||||
# Patchset d3dx9_36-IntersectTri
|
||||
# |
|
||||
# | Included patches:
|
||||
# | * Allow NULL pointer for optional arguments of D3DXIntersectTri. [by Sebastian Lackner]
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35133] Allow NULL pointer for optional arguments of D3DXIntersectTri
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3dx9_36/mesh.c, dlls/d3dx9_36/tests/mesh.c
|
||||
# |
|
||||
.INTERMEDIATE: d3dx9_36-IntersectTri.ok
|
||||
d3dx9_36-IntersectTri.ok:
|
||||
$(call APPLY_FILE,d3dx9_36-IntersectTri/0001-d3dx9_36-Allow-NULL-pointer-for-optional-arguments-o.patch)
|
||||
@( \
|
||||
echo '+ { "d3dx9_36-IntersectTri", "Sebastian Lackner", "Allow NULL pointer for optional arguments of D3DXIntersectTri." },'; \
|
||||
) > d3dx9_36-IntersectTri.ok
|
||||
|
||||
# Patchset d3dx9_36-Texture_Align
|
||||
# |
|
||||
# | Included patches:
|
||||
|
@ -0,0 +1,65 @@
|
||||
From f287d54f5a2a1e874aafb2fb5ce442113e805afe Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 8 Nov 2014 19:29:53 +0100
|
||||
Subject: d3dx9_36: Allow NULL pointer for optional arguments of
|
||||
D3DXIntersectTri.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/mesh.c | 6 +++---
|
||||
dlls/d3dx9_36/tests/mesh.c | 9 +++++++++
|
||||
2 files changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
|
||||
index aecb45d..1eff2d3 100644
|
||||
--- a/dlls/d3dx9_36/mesh.c
|
||||
+++ b/dlls/d3dx9_36/mesh.c
|
||||
@@ -2407,9 +2407,9 @@ BOOL WINAPI D3DXIntersectTri(const D3DXVECTOR3 *p0, const D3DXVECTOR3 *p1, const
|
||||
D3DXVec4Transform(&vec, &vec, &m);
|
||||
if ( (vec.x >= 0.0f) && (vec.y >= 0.0f) && (vec.x + vec.y <= 1.0f) && (vec.z >= 0.0f) )
|
||||
{
|
||||
- *pu = vec.x;
|
||||
- *pv = vec.y;
|
||||
- *pdist = fabsf( vec.z );
|
||||
+ if (pu) *pu = vec.x;
|
||||
+ if (pv) *pv = vec.y;
|
||||
+ if (pdist) *pdist = fabsf( vec.z );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
|
||||
index 17c5d9c..4e45b25 100644
|
||||
--- a/dlls/d3dx9_36/tests/mesh.c
|
||||
+++ b/dlls/d3dx9_36/tests/mesh.c
|
||||
@@ -1104,6 +1104,9 @@ static void D3DXIntersectTriTest(void)
|
||||
ok( compare(exp_v,got_v), "Expected v = %f, got %f\n",exp_v,got_v);
|
||||
ok( compare(exp_dist,got_dist), "Expected distance = %f, got %f\n",exp_dist,got_dist);
|
||||
|
||||
+ got_res = D3DXIntersectTri(&vertex[0], &vertex[1], &vertex[2], &position, &ray, NULL, NULL, NULL);
|
||||
+ ok(got_res == exp_res, "Expected result = %d, got %d\n", exp_res, got_res);
|
||||
+
|
||||
/*Only positive ray is taken in account*/
|
||||
|
||||
vertex[0].x = 1.0f; vertex[0].y = 0.0f; vertex[0].z = 0.0f;
|
||||
@@ -1119,6 +1122,9 @@ static void D3DXIntersectTriTest(void)
|
||||
got_res = D3DXIntersectTri(&vertex[0],&vertex[1],&vertex[2],&position,&ray,&got_u,&got_v,&got_dist);
|
||||
ok( got_res == exp_res, "Expected result = %d, got %d\n",exp_res,got_res);
|
||||
|
||||
+ got_res = D3DXIntersectTri(&vertex[0], &vertex[1], &vertex[2], &position, &ray, NULL, NULL, NULL);
|
||||
+ ok(got_res == exp_res, "Expected result = %d, got %d\n", exp_res, got_res);
|
||||
+
|
||||
/*Intersection between ray and triangle in a same plane is considered as empty*/
|
||||
|
||||
vertex[0].x = 4.0f; vertex[0].y = 0.0f; vertex[0].z = 0.0f;
|
||||
@@ -1133,6 +1139,9 @@ static void D3DXIntersectTriTest(void)
|
||||
|
||||
got_res = D3DXIntersectTri(&vertex[0],&vertex[1],&vertex[2],&position,&ray,&got_u,&got_v,&got_dist);
|
||||
ok( got_res == exp_res, "Expected result = %d, got %d\n",exp_res,got_res);
|
||||
+
|
||||
+ got_res = D3DXIntersectTri(&vertex[0], &vertex[1], &vertex[2], &position, &ray, NULL, NULL, NULL);
|
||||
+ ok(got_res == exp_res, "Expected result = %d, got %d\n", exp_res, got_res);
|
||||
}
|
||||
|
||||
static void D3DXCreateMeshTest(void)
|
||||
--
|
||||
2.1.3
|
||||
|
4
patches/d3dx9_36-IntersectTri/definition
Normal file
4
patches/d3dx9_36-IntersectTri/definition
Normal file
@ -0,0 +1,4 @@
|
||||
Author: Sebastian Lackner
|
||||
Subject: Allow NULL pointer for optional arguments of D3DXIntersectTri.
|
||||
Revision: 1
|
||||
Fixes: [35133] Allow NULL pointer for optional arguments of D3DXIntersectTri
|
Loading…
Reference in New Issue
Block a user