Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f6907843
Commit
f6907843
authored
Oct 13, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Check for tx_1_0 blob magic earlier in D3DXCreateTextureShader().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
0e44c658
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
d3dx9_private.h
dlls/d3dx9_36/d3dx9_private.h
+2
-0
preshader.c
dlls/d3dx9_36/preshader.c
+0
-1
shader.c
dlls/d3dx9_36/shader.c
+3
-0
texture.c
dlls/d3dx9_36/tests/texture.c
+11
-3
No files found.
dlls/d3dx9_36/d3dx9_private.h
View file @
f6907843
...
...
@@ -32,6 +32,8 @@
#define ULONG64_MAX (~(ULONG64)0)
#define FOURCC_TX_1 0x54580100
struct
vec4
{
float
x
,
y
,
z
,
w
;
...
...
dlls/d3dx9_36/preshader.c
View file @
f6907843
...
...
@@ -144,7 +144,6 @@ static double pres_div(double *args, int n) {return 0.0;}
#define FOURCC_CLIT 0x54494c43
#define FOURCC_FXLC 0x434c5846
#define FOURCC_PRSI 0x49535250
#define FOURCC_TX_1 0x54580100
#define PRES_SIGN 0x46580000
struct
op_info
...
...
dlls/d3dx9_36/shader.c
View file @
f6907843
...
...
@@ -2653,6 +2653,9 @@ HRESULT WINAPI D3DXCreateTextureShader(const DWORD *function, ID3DXTextureShader
if
(
!
function
||
!
texture_shader
)
return
D3DERR_INVALIDCALL
;
if
(
*
function
!=
FOURCC_TX_1
)
return
D3DXERR_INVALIDDATA
;
if
(
!
(
size
=
D3DXGetShaderSize
(
function
)))
return
D3DXERR_INVALIDDATA
;
...
...
dlls/d3dx9_36/tests/texture.c
View file @
f6907843
...
...
@@ -2475,17 +2475,25 @@ float4 main(float3 pos : POSITION, float3 size : PSIZE) : COLOR
hr
=
D3DXCreateTextureShader
(
NULL
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
tx
=
(
void
*
)
0xdeadbeef
;
hr
=
D3DXCreateTextureShader
(
NULL
,
&
tx
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
tx
==
(
void
*
)
0xdeadbeef
,
"Unexpected pointer %p.
\n
"
,
tx
);
tx
=
(
void
*
)
0xdeadbeef
;
hr
=
D3DXCreateTextureShader
(
shader_invalid
,
&
tx
);
todo_wine
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
tx
==
(
void
*
)
0xdeadbeef
,
"Unexpected pointer %p.
\n
"
,
tx
);
tx
=
(
void
*
)
0xdeadbeef
;
hr
=
D3DXCreateTextureShader
(
shader_zero
,
&
tx
);
todo_wine
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
tx
==
(
void
*
)
0xdeadbeef
,
"Unexpected pointer %p.
\n
"
,
tx
);
tx
=
(
void
*
)
0xdeadbeef
;
hr
=
D3DXCreateTextureShader
(
shader_empty
,
&
tx
);
todo_wine
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
tx
==
(
void
*
)
0xdeadbeef
,
"Unexpected pointer %p.
\n
"
,
tx
);
hr
=
D3DXCreateTextureShader
(
shader_code
,
&
tx
);
ok
(
SUCCEEDED
(
hr
),
"Got unexpected hr %#lx.
\n
"
,
hr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment