d3dcompiler_43/tests: COM cleanup for the ID3DInclude iface.
This commit is contained in:
parent
134cb5bfef
commit
629e853894
dlls/d3dcompiler_43/tests
|
@ -16,6 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
|
#define CONST_VTABLE
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
|
||||||
#include <d3d9types.h>
|
#include <d3d9types.h>
|
||||||
|
@ -1480,7 +1481,7 @@ static const struct ID3DIncludeVtbl D3DInclude_Vtbl =
|
||||||
};
|
};
|
||||||
|
|
||||||
struct D3DIncludeImpl {
|
struct D3DIncludeImpl {
|
||||||
const ID3DIncludeVtbl *lpVtbl;
|
ID3DInclude ID3DInclude_iface;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void assembleshader_test(void) {
|
static void assembleshader_test(void) {
|
||||||
|
@ -1542,10 +1543,9 @@ static void assembleshader_test(void) {
|
||||||
/* D3DInclude test */
|
/* D3DInclude test */
|
||||||
shader = NULL;
|
shader = NULL;
|
||||||
messages = NULL;
|
messages = NULL;
|
||||||
include.lpVtbl = &D3DInclude_Vtbl;
|
include.ID3DInclude_iface.lpVtbl = &D3DInclude_Vtbl;
|
||||||
hr = D3DAssemble(testshader, strlen(testshader), NULL,
|
hr = D3DAssemble(testshader, strlen(testshader), NULL, NULL, &include.ID3DInclude_iface,
|
||||||
NULL, (LPD3DINCLUDE)&include, D3DCOMPILE_SKIP_VALIDATION,
|
D3DCOMPILE_SKIP_VALIDATION, &shader, &messages);
|
||||||
&shader, &messages);
|
|
||||||
ok(hr == S_OK, "D3DInclude test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF);
|
ok(hr == S_OK, "D3DInclude test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF);
|
||||||
if(messages) {
|
if(messages) {
|
||||||
trace("D3DAssemble messages:\n%s", (char *)ID3D10Blob_GetBufferPointer(messages));
|
trace("D3DAssemble messages:\n%s", (char *)ID3D10Blob_GetBufferPointer(messages));
|
||||||
|
@ -1634,9 +1634,9 @@ static void d3dpreprocess_test(void)
|
||||||
/* pInclude test */
|
/* pInclude test */
|
||||||
shader = NULL;
|
shader = NULL;
|
||||||
messages = NULL;
|
messages = NULL;
|
||||||
include.lpVtbl = &D3DInclude_Vtbl;
|
include.ID3DInclude_iface.lpVtbl = &D3DInclude_Vtbl;
|
||||||
hr = D3DPreprocess(testshader, strlen(testshader), NULL,
|
hr = D3DPreprocess(testshader, strlen(testshader), NULL, NULL, &include.ID3DInclude_iface,
|
||||||
NULL, (ID3DInclude *)&include, &shader, &messages);
|
&shader, &messages);
|
||||||
ok(hr == S_OK, "pInclude test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF);
|
ok(hr == S_OK, "pInclude test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF);
|
||||||
if (messages)
|
if (messages)
|
||||||
{
|
{
|
||||||
|
@ -1648,8 +1648,8 @@ static void d3dpreprocess_test(void)
|
||||||
/* recursive #include test */
|
/* recursive #include test */
|
||||||
shader = NULL;
|
shader = NULL;
|
||||||
messages = NULL;
|
messages = NULL;
|
||||||
hr = D3DPreprocess(testshader2, strlen(testshader2), NULL,
|
hr = D3DPreprocess(testshader2, strlen(testshader2), NULL, NULL, &include.ID3DInclude_iface,
|
||||||
NULL, (ID3DInclude *)&include, &shader, &messages);
|
&shader, &messages);
|
||||||
ok(hr == S_OK, "D3DPreprocess test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF);
|
ok(hr == S_OK, "D3DPreprocess test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF);
|
||||||
if (messages)
|
if (messages)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue