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
b1126a8c
Commit
b1126a8c
authored
Jan 10, 2013
by
Rico Schüller
Committed by
Alexandre Julliard
Jan 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler43/tests: Don't use IUnknown_Release().
parent
43f30fe8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
29 deletions
+29
-29
blob.c
dlls/d3dcompiler_43/tests/blob.c
+1
-1
hlsl.c
dlls/d3dcompiler_43/tests/hlsl.c
+28
-28
No files found.
dlls/d3dcompiler_43/tests/blob.c
View file @
b1126a8c
...
@@ -64,7 +64,7 @@ static void test_create_blob(void)
...
@@ -64,7 +64,7 @@ static void test_create_blob(void)
hr
=
D3DCreateBlob
(
0
,
&
blob
);
hr
=
D3DCreateBlob
(
0
,
&
blob
);
ok
(
hr
==
S_OK
,
"D3DCreateBlob failed with %x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"D3DCreateBlob failed with %x
\n
"
,
hr
);
refcount
=
blob
->
lpVtbl
->
Release
(
blob
);
refcount
=
ID3D10Blob_
Release
(
blob
);
ok
(
!
refcount
,
"ID3DBlob has %u references left
\n
"
,
refcount
);
ok
(
!
refcount
,
"ID3DBlob has %u references left
\n
"
,
refcount
);
}
}
...
...
dlls/d3dcompiler_43/tests/hlsl.c
View file @
b1126a8c
...
@@ -139,14 +139,14 @@ static IDirect3DDevice9 *init_d3d9(IDirect3DVertexDeclaration9 **vdeclaration,
...
@@ -139,14 +139,14 @@ static IDirect3DDevice9 *init_d3d9(IDirect3DVertexDeclaration9 **vdeclaration,
{
{
skip
(
"not compiling vertex shader due to lacking wine HLSL support!
\n
"
);
skip
(
"not compiling vertex shader due to lacking wine HLSL support!
\n
"
);
if
(
errors
)
if
(
errors
)
I
Unknown
_Release
(
errors
);
I
D3D10Blob
_Release
(
errors
);
return
NULL
;
return
NULL
;
}
}
hr
=
IDirect3DDevice9_CreateVertexShader
(
device_ptr
,
ID3D10Blob_GetBufferPointer
(
compiled
),
hr
=
IDirect3DDevice9_CreateVertexShader
(
device_ptr
,
ID3D10Blob_GetBufferPointer
(
compiled
),
vshader_passthru
);
vshader_passthru
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice9_CreateVertexShader returned: %08x
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice9_CreateVertexShader returned: %08x
\n
"
,
hr
);
I
Unknown
_Release
(
compiled
);
I
D3D10Blob
_Release
(
compiled
);
return
device_ptr
;
return
device_ptr
;
}
}
...
@@ -184,7 +184,7 @@ static IDirect3DPixelShader9 *compile_pixel_shader9(IDirect3DDevice9 *device, co
...
@@ -184,7 +184,7 @@ static IDirect3DPixelShader9 *compile_pixel_shader9(IDirect3DDevice9 *device, co
hr
=
IDirect3DDevice9_CreatePixelShader
(
device
,
ID3D10Blob_GetBufferPointer
(
compiled
),
&
pshader
);
hr
=
IDirect3DDevice9_CreatePixelShader
(
device
,
ID3D10Blob_GetBufferPointer
(
compiled
),
&
pshader
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice9_CreatePixelShader returned: %08x
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice9_CreatePixelShader returned: %08x
\n
"
,
hr
);
I
Unknown
_Release
(
compiled
);
I
D3D10Blob
_Release
(
compiled
);
return
pshader
;
return
pshader
;
}
}
...
@@ -287,8 +287,8 @@ static void compute_shader_probe9(IDirect3DDevice9 *device, IDirect3DVertexShade
...
@@ -287,8 +287,8 @@ static void compute_shader_probe9(IDirect3DDevice9 *device, IDirect3DVertexShade
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Present returned: %08x
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Present returned: %08x
\n
"
,
hr
);
I
Unknown
_Release
(
render_target
);
I
Direct3DSurface9
_Release
(
render_target
);
I
Unknown
_Release
(
readback
);
I
Direct3DSurface9
_Release
(
readback
);
}
}
/* Now the actual test functions */
/* Now the actual test functions */
...
@@ -321,8 +321,8 @@ static void test_swizzle(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_
...
@@ -321,8 +321,8 @@ static void test_swizzle(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
probes
,
sizeof
(
probes
)
/
sizeof
(
*
probes
),
1
,
1
,
__LINE__
);
probes
,
sizeof
(
probes
)
/
sizeof
(
*
probes
),
1
,
1
,
__LINE__
);
I
Unknown
_Release
(
constants
);
I
D3DXConstantTable
_Release
(
constants
);
I
Unknown
_Release
(
pshader
);
I
Direct3DPixelShader9
_Release
(
pshader
);
}
}
}
}
...
@@ -364,8 +364,8 @@ static void test_math(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_geo
...
@@ -364,8 +364,8 @@ static void test_math(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_geo
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
probes
,
sizeof
(
probes
)
/
sizeof
(
*
probes
),
1
,
1
,
__LINE__
);
probes
,
sizeof
(
probes
)
/
sizeof
(
*
probes
),
1
,
1
,
__LINE__
);
I
Unknown
_Release
(
constants
);
I
D3DXConstantTable
_Release
(
constants
);
I
Unknown
_Release
(
pshader
);
I
Direct3DPixelShader9
_Release
(
pshader
);
}
}
}
}
...
@@ -418,8 +418,8 @@ static void test_conditionals(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *
...
@@ -418,8 +418,8 @@ static void test_conditionals(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
if_greater_probes
,
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
if_greater_probes
,
sizeof
(
if_greater_probes
)
/
sizeof
(
*
if_greater_probes
),
32
,
1
,
__LINE__
);
sizeof
(
if_greater_probes
)
/
sizeof
(
*
if_greater_probes
),
32
,
1
,
__LINE__
);
I
Unknown
_Release
(
constants
);
I
D3DXConstantTable
_Release
(
constants
);
I
Unknown
_Release
(
pshader
);
I
Direct3DPixelShader9
_Release
(
pshader
);
}
}
pshader
=
compile_pixel_shader9
(
device
,
ternary_operator_shader
,
"ps_2_0"
,
&
constants
);
pshader
=
compile_pixel_shader9
(
device
,
ternary_operator_shader
,
"ps_2_0"
,
&
constants
);
...
@@ -428,8 +428,8 @@ static void test_conditionals(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *
...
@@ -428,8 +428,8 @@ static void test_conditionals(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
ternary_operator_probes
,
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
ternary_operator_probes
,
sizeof
(
ternary_operator_probes
)
/
sizeof
(
*
ternary_operator_probes
),
8
,
1
,
__LINE__
);
sizeof
(
ternary_operator_probes
)
/
sizeof
(
*
ternary_operator_probes
),
8
,
1
,
__LINE__
);
I
Unknown
_Release
(
constants
);
I
D3DXConstantTable
_Release
(
constants
);
I
Unknown
_Release
(
pshader
);
I
Direct3DPixelShader9
_Release
(
pshader
);
}
}
}
}
...
@@ -477,8 +477,8 @@ static void test_float_vectors(IDirect3DDevice9 *device, IDirect3DVertexBuffer9
...
@@ -477,8 +477,8 @@ static void test_float_vectors(IDirect3DDevice9 *device, IDirect3DVertexBuffer9
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
vec4_indexing_test1_probes
,
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
vec4_indexing_test1_probes
,
sizeof
(
vec4_indexing_test1_probes
)
/
sizeof
(
*
vec4_indexing_test1_probes
),
1
,
1
,
__LINE__
);
sizeof
(
vec4_indexing_test1_probes
)
/
sizeof
(
*
vec4_indexing_test1_probes
),
1
,
1
,
__LINE__
);
I
Unknown
_Release
(
constants
);
I
D3DXConstantTable
_Release
(
constants
);
I
Unknown
_Release
(
pshader
);
I
Direct3DPixelShader9
_Release
(
pshader
);
}
}
pshader
=
compile_pixel_shader9
(
device
,
vec4_indexing_test2_shader
,
"ps_2_0"
,
&
constants
);
pshader
=
compile_pixel_shader9
(
device
,
vec4_indexing_test2_shader
,
"ps_2_0"
,
&
constants
);
...
@@ -489,8 +489,8 @@ static void test_float_vectors(IDirect3DDevice9 *device, IDirect3DVertexBuffer9
...
@@ -489,8 +489,8 @@ static void test_float_vectors(IDirect3DDevice9 *device, IDirect3DVertexBuffer9
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
vec4_indexing_test2_probes
,
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
vec4_indexing_test2_probes
,
sizeof
(
vec4_indexing_test2_probes
)
/
sizeof
(
*
vec4_indexing_test2_probes
),
32
,
1
,
__LINE__
);
sizeof
(
vec4_indexing_test2_probes
)
/
sizeof
(
*
vec4_indexing_test2_probes
),
32
,
1
,
__LINE__
);
I
Unknown
_Release
(
constants
);
I
D3DXConstantTable
_Release
(
constants
);
I
Unknown
_Release
(
pshader
);
I
Direct3DPixelShader9
_Release
(
pshader
);
}
}
}
}
...
@@ -551,8 +551,8 @@ static void test_trig(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_geo
...
@@ -551,8 +551,8 @@ static void test_trig(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_geo
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
sincos_probes
,
compute_shader_probe9
(
device
,
vshader_passthru
,
pshader
,
quad_geometry
,
sincos_probes
,
sizeof
(
sincos_probes
)
/
sizeof
(
*
sincos_probes
),
32
,
1
,
__LINE__
);
sizeof
(
sincos_probes
)
/
sizeof
(
*
sincos_probes
),
32
,
1
,
__LINE__
);
I
Unknown
_Release
(
constants
);
I
D3DXConstantTable
_Release
(
constants
);
I
Unknown
_Release
(
pshader
);
I
Direct3DPixelShader9
_Release
(
pshader
);
}
}
}
}
...
@@ -604,7 +604,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
...
@@ -604,7 +604,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
ok
(
errors
!=
NULL
,
"No errors returned for a shader with undefined variables
\n
"
);
ok
(
errors
!=
NULL
,
"No errors returned for a shader with undefined variables
\n
"
);
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with undefined variables
\n
"
);
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with undefined variables
\n
"
);
I
Unknown
_Release
(
errors
);
I
D3D10Blob
_Release
(
errors
);
errors
=
NULL
;
errors
=
NULL
;
hr
=
D3DCompile
(
invalid_swizzle_shader
,
strlen
(
invalid_swizzle_shader
),
NULL
,
NULL
,
NULL
,
hr
=
D3DCompile
(
invalid_swizzle_shader
,
strlen
(
invalid_swizzle_shader
),
NULL
,
NULL
,
NULL
,
...
@@ -613,7 +613,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
...
@@ -613,7 +613,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
ok
(
errors
!=
NULL
,
"No errors returned for a shader with an invalid swizzle mask
\n
"
);
ok
(
errors
!=
NULL
,
"No errors returned for a shader with an invalid swizzle mask
\n
"
);
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with an invalid swizzle mask
\n
"
);
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with an invalid swizzle mask
\n
"
);
I
Unknown
_Release
(
errors
);
I
D3D10Blob
_Release
(
errors
);
errors
=
NULL
;
errors
=
NULL
;
hr
=
D3DCompile
(
invalid_conversion_shader
,
strlen
(
invalid_conversion_shader
),
NULL
,
NULL
,
NULL
,
hr
=
D3DCompile
(
invalid_conversion_shader
,
strlen
(
invalid_conversion_shader
),
NULL
,
NULL
,
NULL
,
...
@@ -623,7 +623,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
...
@@ -623,7 +623,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
ok
(
errors
!=
NULL
,
"No errors returned for a shader with invalid type conversions
\n
"
);
ok
(
errors
!=
NULL
,
"No errors returned for a shader with invalid type conversions
\n
"
);
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with invalid type conversions
\n
"
);
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with invalid type conversions
\n
"
);
I
Unknown
_Release
(
errors
);
I
D3D10Blob
_Release
(
errors
);
errors
=
NULL
;
errors
=
NULL
;
hr
=
D3DCompile
(
invalid_syntax_shader
,
strlen
(
invalid_syntax_shader
),
NULL
,
NULL
,
NULL
,
"test"
,
hr
=
D3DCompile
(
invalid_syntax_shader
,
strlen
(
invalid_syntax_shader
),
NULL
,
NULL
,
NULL
,
"test"
,
...
@@ -633,7 +633,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
...
@@ -633,7 +633,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
ok
(
errors
!=
NULL
,
"No errors returned for a shader with invalid syntax
\n
"
);
ok
(
errors
!=
NULL
,
"No errors returned for a shader with invalid syntax
\n
"
);
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with invalid syntax
\n
"
);
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with invalid syntax
\n
"
);
I
Unknown
_Release
(
errors
);
I
D3D10Blob
_Release
(
errors
);
errors
=
NULL
;
errors
=
NULL
;
hr
=
D3DCompile
(
invalid_identifiers_shader
,
strlen
(
invalid_identifiers_shader
),
NULL
,
NULL
,
hr
=
D3DCompile
(
invalid_identifiers_shader
,
strlen
(
invalid_identifiers_shader
),
NULL
,
NULL
,
...
@@ -645,7 +645,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
...
@@ -645,7 +645,7 @@ static void test_fail(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *qquad_ge
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with invalid variable and "
ok
(
compiled
==
NULL
,
"A shader blob was returned for a shader with invalid variable and "
"function names
\n
"
);
"function names
\n
"
);
I
Unknown
_Release
(
errors
);
I
D3D10Blob
_Release
(
errors
);
}
}
START_TEST
(
hlsl
)
START_TEST
(
hlsl
)
...
@@ -679,16 +679,16 @@ START_TEST(hlsl)
...
@@ -679,16 +679,16 @@ START_TEST(hlsl)
/* Reference counting sanity checks */
/* Reference counting sanity checks */
if
(
vshader_passthru
)
if
(
vshader_passthru
)
{
{
refcount
=
I
Unknown
_Release
(
vshader_passthru
);
refcount
=
I
Direct3DVertexShader9
_Release
(
vshader_passthru
);
ok
(
!
refcount
,
"Pass-through vertex shader has %u references left
\n
"
,
refcount
);
ok
(
!
refcount
,
"Pass-through vertex shader has %u references left
\n
"
,
refcount
);
}
}
refcount
=
I
Unknown
_Release
(
quad_geometry
);
refcount
=
I
Direct3DVertexBuffer9
_Release
(
quad_geometry
);
ok
(
!
refcount
,
"Vertex buffer has %u references left
\n
"
,
refcount
);
ok
(
!
refcount
,
"Vertex buffer has %u references left
\n
"
,
refcount
);
refcount
=
I
Unknown
_Release
(
vdeclaration
);
refcount
=
I
Direct3DVertexDeclaration9
_Release
(
vdeclaration
);
ok
(
!
refcount
,
"Vertex declaration has %u references left
\n
"
,
refcount
);
ok
(
!
refcount
,
"Vertex declaration has %u references left
\n
"
,
refcount
);
refcount
=
I
Unknown
_Release
(
device
);
refcount
=
I
Direct3DDevice9
_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
}
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