ReactOS 0.4.16-dev-91-g764881a
reflection.c File Reference
#include "initguid.h"
#include "d3dcompiler.h"
#include "wine/test.h"
#include "d3d10.h"
#include "d3d10_1shader.h"
Include dependency graph for reflection.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define D3DERR_INVALIDCALL   0x8876086c
 

Functions

static HRESULT (WINAPI *pD3DReflect)(const void *
 
static void test_reflection_references (void)
 
static void test_reflection_desc_vs (void)
 
static void test_reflection_desc_ps (void)
 
static void test_reflection_desc_ps_output (void)
 
static void test_reflection_bound_resources (void)
 
static void test_reflection_constant_buffer (void)
 
static BOOL load_d3dcompiler (void)
 
 START_TEST (reflection)
 

Variables

static SIZE_T
 
static REFIID
 
static void **static DWORD shader_creator []
 
static DWORD test_reflection_blob []
 
static DWORD test_reflection_desc_vs_blob []
 
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_vs_resultin []
 
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_vs_resultout []
 
static DWORD test_reflection_desc_ps_blob []
 
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_ps_resultin []
 
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_ps_resultout []
 
static const DWORD test_reflection_desc_ps_output_blob_0 []
 
static const DWORD test_reflection_desc_ps_output_blob_1 []
 
static const DWORD test_reflection_desc_ps_output_blob_2 []
 
static const DWORD test_reflection_desc_ps_output_blob_3 []
 
static const DWORD test_reflection_desc_ps_output_blob_4 []
 
static const DWORD test_reflection_desc_ps_output_blob_5 []
 
static const DWORDtest_reflection_desc_ps_output_blob []
 
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_ps_output_result []
 
static DWORD test_reflection_bound_resources_blob []
 
static const D3D11_SHADER_INPUT_BIND_DESC test_reflection_bound_resources_result []
 
static DWORD test_reflection_constant_buffer_blob []
 
static const D3D11_SHADER_BUFFER_DESC test_reflection_constant_buffer_cb_result []
 
struct {
   D3D11_SHADER_VARIABLE_DESC   desc
 
   unsigned int   type
 
test_reflection_constant_buffer_variable_result []
 
static const D3D11_SHADER_TYPE_DESC test_reflection_constant_buffer_type_result []
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 25 of file reflection.c.

◆ D3DERR_INVALIDCALL

#define D3DERR_INVALIDCALL   0x8876086c

Definition at line 41 of file reflection.c.

Function Documentation

◆ HRESULT()

static HRESULT ( WINAPI pD3DReflect) const
static

◆ load_d3dcompiler()

static BOOL load_d3dcompiler ( void  )
static

Definition at line 1519 of file reflection.c.

1520{
1522
1523 if (!(module = LoadLibraryA("d3dcompiler_43.dll"))) return FALSE;
1524
1525 pD3DReflect = (void*)GetProcAddress(module, "D3DReflect");
1526 return TRUE;
1527}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcAddress(x, y)
Definition: compat.h:753
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( reflection  )

Definition at line 1529 of file reflection.c.

1530{
1531 if (!load_d3dcompiler())
1532 {
1533 win_skip("Could not load d3dcompiler_43.dll\n");
1534 return;
1535 }
1536
1537#ifndef __REACTOS__
1539#endif
1545}
static void test_reflection_references(void)
Definition: reflection.c:81
static void test_reflection_desc_vs(void)
Definition: reflection.c:296
static void test_reflection_constant_buffer(void)
Definition: reflection.c:1224
static void test_reflection_desc_ps_output(void)
Definition: reflection.c:902
static void test_reflection_bound_resources(void)
Definition: reflection.c:1016
static void test_reflection_desc_ps(void)
Definition: reflection.c:583
static BOOL load_d3dcompiler(void)
Definition: reflection.c:1519
#define win_skip
Definition: test.h:163

◆ test_reflection_bound_resources()

static void test_reflection_bound_resources ( void  )
static

Definition at line 1016 of file reflection.c.

1017{
1018 HRESULT hr;
1019 ULONG count;
1020 ID3D11ShaderReflection *ref11;
1022 const D3D11_SHADER_INPUT_BIND_DESC *pdesc;
1023 unsigned int i;
1024
1025 hr = pD3DReflect(test_reflection_bound_resources_blob, test_reflection_bound_resources_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11);
1026 ok(hr == S_OK, "D3DReflect failed %x\n", hr);
1027
1028 /* check invalid cases */
1029 hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, 0, NULL);
1030 ok(hr == E_INVALIDARG, "GetResourceBindingDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
1031
1032 hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, 0xffffffff, &desc);
1033 ok(hr == E_INVALIDARG, "GetResourceBindingDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
1034
1035 hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, NULL, &desc);
1036 ok(hr == E_INVALIDARG, "GetResourceBindingDescByName failed, got %x, expected %x\n", hr, E_INVALIDARG);
1037
1038 hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, "sam", NULL);
1039 ok(hr == E_INVALIDARG, "GetResourceBindingDescByName failed, got %x, expected %x\n", hr, E_INVALIDARG);
1040
1041 hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, "invalid", NULL);
1042 ok(hr == E_INVALIDARG, "GetResourceBindingDescByName failed, got %x, expected %x\n", hr, E_INVALIDARG);
1043
1044 hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, "invalid", &desc);
1045 ok(hr == E_INVALIDARG, "GetResourceBindingDescByName failed, got %x, expected %x\n", hr, E_INVALIDARG);
1046
1047 /* GetResourceBindingDesc */
1049 {
1051
1052 hr = ref11->lpVtbl->GetResourceBindingDesc(ref11, i, &desc);
1053 ok(hr == S_OK, "GetResourceBindingDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK);
1054
1055 ok(!strcmp(desc.Name, pdesc->Name), "GetResourceBindingDesc(%u) Name failed, got \"%s\", expected \"%s\"\n",
1056 i, desc.Name, pdesc->Name);
1057 ok(desc.Type == pdesc->Type, "GetResourceBindingDesc(%u) Type failed, got %x, expected %x\n",
1058 i, desc.Type, pdesc->Type);
1059 ok(desc.BindPoint == pdesc->BindPoint, "GetResourceBindingDesc(%u) BindPoint failed, got %u, expected %u\n",
1060 i, desc.BindPoint, pdesc->BindPoint);
1061 ok(desc.BindCount == pdesc->BindCount, "GetResourceBindingDesc(%u) BindCount failed, got %u, expected %u\n",
1062 i, desc.BindCount, pdesc->BindCount);
1063 ok(desc.uFlags == pdesc->uFlags, "GetResourceBindingDesc(%u) uFlags failed, got %u, expected %u\n",
1064 i, desc.uFlags, pdesc->uFlags);
1065 ok(desc.ReturnType == pdesc->ReturnType, "GetResourceBindingDesc(%u) ReturnType failed, got %x, expected %x\n",
1066 i, desc.ReturnType, pdesc->ReturnType);
1067 ok(desc.Dimension == pdesc->Dimension, "GetResourceBindingDesc(%u) Dimension failed, got %x, expected %x\n",
1068 i, desc.Dimension, pdesc->Dimension);
1069 ok(desc.NumSamples == pdesc->NumSamples, "GetResourceBindingDesc(%u) NumSamples failed, got %u, expected %u\n",
1070 i, desc.NumSamples, pdesc->NumSamples);
1071 }
1072
1073 /* GetResourceBindingDescByName */
1075 {
1077
1078 hr = ref11->lpVtbl->GetResourceBindingDescByName(ref11, pdesc->Name, &desc);
1079 ok(hr == S_OK, "GetResourceBindingDescByName(%u) failed, got %x, expected %x\n", i, hr, S_OK);
1080
1081 ok(!strcmp(desc.Name, pdesc->Name), "GetResourceBindingDescByName(%u) Name failed, got \"%s\", expected \"%s\"\n",
1082 i, desc.Name, pdesc->Name);
1083 ok(desc.Type == pdesc->Type, "GetResourceBindingDescByName(%u) Type failed, got %x, expected %x\n",
1084 i, desc.Type, pdesc->Type);
1085 ok(desc.BindPoint == pdesc->BindPoint, "GetResourceBindingDescByName(%u) BindPoint failed, got %u, expected %u\n",
1086 i, desc.BindPoint, pdesc->BindPoint);
1087 ok(desc.BindCount == pdesc->BindCount, "GetResourceBindingDescByName(%u) BindCount failed, got %u, expected %u\n",
1088 i, desc.BindCount, pdesc->BindCount);
1089 ok(desc.uFlags == pdesc->uFlags, "GetResourceBindingDescByName(%u) uFlags failed, got %u, expected %u\n",
1090 i, desc.uFlags, pdesc->uFlags);
1091 ok(desc.ReturnType == pdesc->ReturnType, "GetResourceBindingDescByName(%u) ReturnType failed, got %x, expected %x\n",
1092 i, desc.ReturnType, pdesc->ReturnType);
1093 ok(desc.Dimension == pdesc->Dimension, "GetResourceBindingDescByName(%u) Dimension failed, got %x, expected %x\n",
1094 i, desc.Dimension, pdesc->Dimension);
1095 ok(desc.NumSamples == pdesc->NumSamples, "GetResourceBindingDescByName(%u) NumSamples failed, got %u, expected %u\n",
1096 i, desc.NumSamples, pdesc->NumSamples);
1097 }
1098
1099 count = ref11->lpVtbl->Release(ref11);
1100 ok(count == 0, "Release failed %u\n", count);
1101}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define ok(value,...)
Definition: atltest.h:57
#define ARRAY_SIZE(A)
Definition: main.h:20
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define S_OK
Definition: intsafe.h:52
static const WCHAR desc[]
Definition: protectdata.c:36
static DWORD test_reflection_bound_resources_blob[]
Definition: reflection.c:973
static const D3D11_SHADER_INPUT_BIND_DESC test_reflection_bound_resources_result[]
Definition: reflection.c:1008
HRESULT hr
Definition: shlfolder.c:183
D3D_SRV_DIMENSION Dimension
Definition: d3d11shader.h:119
D3D_SHADER_INPUT_TYPE Type
Definition: d3d11shader.h:114
D3D_RESOURCE_RETURN_TYPE ReturnType
Definition: d3d11shader.h:118
uint32_t ULONG
Definition: typedefs.h:59

Referenced by START_TEST().

◆ test_reflection_constant_buffer()

static void test_reflection_constant_buffer ( void  )
static

Definition at line 1224 of file reflection.c.

1225{
1226 HRESULT hr;
1227 ULONG count;
1228 ID3D11ShaderReflection *ref11;
1229 ID3D11ShaderReflectionConstantBuffer *cb11, *cb11_dummy = NULL, *cb11_valid = NULL;
1230 ID3D11ShaderReflectionVariable *v11, *v11_dummy = NULL, *v11_valid = NULL;
1231 ID3D11ShaderReflectionType *t11, *t, *t2, *t11_dummy = NULL, *t11_valid = NULL;
1232 D3D11_SHADER_BUFFER_DESC cbdesc = {0};
1233 D3D11_SHADER_VARIABLE_DESC vdesc = {0};
1234 D3D11_SHADER_TYPE_DESC tdesc = {0};
1235 D3D11_SHADER_DESC sdesc = {0};
1236 const D3D11_SHADER_BUFFER_DESC *pcbdesc;
1237 const D3D11_SHADER_VARIABLE_DESC *pvdesc;
1238 const D3D11_SHADER_TYPE_DESC *ptdesc;
1239 unsigned int i;
1240 LPCSTR string;
1241
1242 hr = pD3DReflect(test_reflection_constant_buffer_blob, test_reflection_constant_buffer_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11);
1243 ok(hr == S_OK, "D3DReflect failed %x\n", hr);
1244
1245 hr = ref11->lpVtbl->GetDesc(ref11, &sdesc);
1246 ok(hr == S_OK, "GetDesc failed %x\n", hr);
1247
1248 ok(sdesc.Version == 80, "GetDesc failed, got %u, expected %u\n", sdesc.Version, 80);
1249 ok(strcmp(sdesc.Creator, (char*) shader_creator) == 0, "GetDesc failed, got \"%s\", expected \"%s\"\n", sdesc.Creator, (char*)shader_creator);
1250 ok(sdesc.Flags == 256, "GetDesc failed, got %u, expected %u\n", sdesc.Flags, 256);
1251 ok(sdesc.ConstantBuffers == 2, "GetDesc failed, got %u, expected %u\n", sdesc.ConstantBuffers, 2);
1252 ok(sdesc.BoundResources == 1, "GetDesc failed, got %u, expected %u\n", sdesc.BoundResources, 1);
1253 ok(sdesc.InputParameters == 1, "GetDesc failed, got %u, expected %u\n", sdesc.InputParameters, 1);
1254 ok(sdesc.OutputParameters == 1, "GetDesc failed, got %u, expected %u\n", sdesc.OutputParameters, 1);
1255 ok(sdesc.InstructionCount == 8, "GetDesc failed, got %u, expected %u\n", sdesc.InstructionCount, 8);
1256 ok(sdesc.TempRegisterCount == 2, "GetDesc failed, got %u, expected %u\n", sdesc.TempRegisterCount, 2);
1257 ok(sdesc.TempArrayCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.TempArrayCount, 0);
1258 ok(sdesc.DefCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.DefCount, 0);
1259 ok(sdesc.DclCount == 2, "GetDesc failed, got %u, expected %u\n", sdesc.DclCount, 2);
1260 ok(sdesc.TextureNormalInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc.TextureNormalInstructions, 0);
1261 ok(sdesc.TextureLoadInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc.TextureLoadInstructions, 0);
1262 ok(sdesc.TextureCompInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc.TextureCompInstructions, 0);
1263 ok(sdesc.TextureBiasInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc.TextureBiasInstructions, 0);
1264 ok(sdesc.TextureGradientInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc.TextureGradientInstructions, 0);
1265 ok(sdesc.FloatInstructionCount == 2, "GetDesc failed, got %u, expected %u\n", sdesc.FloatInstructionCount, 2);
1266 ok(sdesc.IntInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.IntInstructionCount, 0);
1267 ok(sdesc.UintInstructionCount == 1, "GetDesc failed, got %u, expected %u\n", sdesc.UintInstructionCount, 1);
1268 ok(sdesc.StaticFlowControlCount == 1, "GetDesc failed, got %u, expected %u\n", sdesc.StaticFlowControlCount, 1);
1269 ok(sdesc.DynamicFlowControlCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.DynamicFlowControlCount, 0);
1270 ok(sdesc.MacroInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.MacroInstructionCount, 0);
1271 ok(sdesc.ArrayInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.ArrayInstructionCount, 0);
1272 ok(sdesc.CutInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.CutInstructionCount, 0);
1273 ok(sdesc.EmitInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.EmitInstructionCount, 0);
1274 ok(sdesc.GSOutputTopology == 0, "GetDesc failed, got %x, expected %x\n", sdesc.GSOutputTopology, 0);
1275 ok(sdesc.GSMaxOutputVertexCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.GSMaxOutputVertexCount, 0);
1276 ok(sdesc.InputPrimitive == 0, "GetDesc failed, got %x, expected %x\n", sdesc.InputPrimitive, 0);
1277 ok(sdesc.PatchConstantParameters == 0, "GetDesc failed, got %u, expected %u\n", sdesc.PatchConstantParameters, 0);
1278 ok(sdesc.cGSInstanceCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc.cGSInstanceCount, 0);
1279 ok(sdesc.cControlPoints == 0, "GetDesc failed, got %u, expected %u\n", sdesc.cControlPoints, 0);
1280 ok(sdesc.HSOutputPrimitive == 0, "GetDesc failed, got %x, expected %x\n", sdesc.HSOutputPrimitive, 0);
1281 ok(sdesc.HSPartitioning == 0, "GetDesc failed, got %x, expected %x\n", sdesc.HSPartitioning, 0);
1282 ok(sdesc.TessellatorDomain == 0, "GetDesc failed, got %x, expected %x\n", sdesc.TessellatorDomain, 0);
1283 ok(sdesc.cBarrierInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc.cBarrierInstructions, 0);
1284 ok(sdesc.cInterlockedInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc.cInterlockedInstructions, 0);
1285 ok(sdesc.cTextureStoreInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc.cTextureStoreInstructions, 0);
1286
1287 /* get the dummys for comparison */
1288 cb11_dummy = ref11->lpVtbl->GetConstantBufferByIndex(ref11, 0xffffffff);
1289 ok(cb11_dummy != NULL, "GetConstantBufferByIndex failed\n");
1290
1291 v11_dummy = cb11_dummy->lpVtbl->GetVariableByIndex(cb11_dummy, 0xffffffff);
1292 ok(v11_dummy != NULL, "GetVariableByIndex failed\n");
1293
1294 t11_dummy = v11_dummy->lpVtbl->GetType(v11_dummy);
1295 ok(t11_dummy != NULL, "GetType failed\n");
1296
1297 /* get the valid variables */
1298 cb11_valid = ref11->lpVtbl->GetConstantBufferByIndex(ref11, 1);
1299 ok(cb11_valid != cb11_dummy && cb11_valid, "GetConstantBufferByIndex failed\n");
1300
1301 v11_valid = cb11_valid->lpVtbl->GetVariableByIndex(cb11_valid, 0);
1302 ok(v11_valid != v11_dummy && v11_valid, "GetVariableByIndex failed\n");
1303
1304 t11_valid = v11_valid->lpVtbl->GetType(v11_valid);
1305 ok(t11_valid != t11_dummy && t11_valid, "GetType failed\n");
1306
1307 /* reflection calls */
1308 cb11 = ref11->lpVtbl->GetConstantBufferByName(ref11, "invalid");
1309 ok(cb11_dummy == cb11, "GetConstantBufferByName failed, got %p, expected %p\n", cb11, cb11_dummy);
1310
1311 cb11 = ref11->lpVtbl->GetConstantBufferByName(ref11, NULL);
1312 ok(cb11_dummy == cb11, "GetConstantBufferByName failed, got %p, expected %p\n", cb11, cb11_dummy);
1313
1314 v11 = ref11->lpVtbl->GetVariableByName(ref11, NULL);
1315 ok(v11_dummy == v11, "GetVariableByIndex failed, got %p, expected %p\n", v11, v11_dummy);
1316
1317 v11 = ref11->lpVtbl->GetVariableByName(ref11, "invalid");
1318 ok(v11_dummy == v11, "GetVariableByName failed, got %p, expected %p\n", v11, v11_dummy);
1319
1320 v11 = ref11->lpVtbl->GetVariableByName(ref11, "a");
1321 ok(v11_valid == v11, "GetVariableByName failed, got %p, expected %p\n", v11, v11_valid);
1322
1323 /* constant buffer calls */
1324 v11 = cb11_dummy->lpVtbl->GetVariableByName(cb11_dummy, NULL);
1325 ok(v11_dummy == v11, "GetVariableByName failed, got %p, expected %p\n", v11, v11_dummy);
1326
1327 v11 = cb11_dummy->lpVtbl->GetVariableByName(cb11_dummy, "invalid");
1328 ok(v11_dummy == v11, "GetVariableByName failed, got %p, expected %p\n", v11, v11_dummy);
1329
1330 v11 = cb11_valid->lpVtbl->GetVariableByName(cb11_valid, NULL);
1331 ok(v11_dummy == v11, "GetVariableByName failed, got %p, expected %p\n", v11, v11_dummy);
1332
1333 v11 = cb11_valid->lpVtbl->GetVariableByName(cb11_valid, "invalid");
1334 ok(v11_dummy == v11, "GetVariableByName failed, got %p, expected %p\n", v11, v11_dummy);
1335
1336 v11 = cb11_valid->lpVtbl->GetVariableByName(cb11_valid, "a");
1337 ok(v11_valid == v11, "GetVariableByName failed, got %p, expected %p\n", v11, v11_valid);
1338
1339 hr = cb11_dummy->lpVtbl->GetDesc(cb11_dummy, NULL);
1340 ok(hr == E_FAIL, "GetDesc failed, got %x, expected %x\n", hr, E_FAIL);
1341
1342 hr = cb11_dummy->lpVtbl->GetDesc(cb11_dummy, &cbdesc);
1343 ok(hr == E_FAIL, "GetDesc failed, got %x, expected %x\n", hr, E_FAIL);
1344
1345 hr = cb11_valid->lpVtbl->GetDesc(cb11_valid, NULL);
1346 ok(hr == E_FAIL, "GetDesc failed, got %x, expected %x\n", hr, E_FAIL);
1347
1348 /* variable calls */
1349 hr = v11_dummy->lpVtbl->GetDesc(v11_dummy, NULL);
1350 ok(hr == E_FAIL, "GetDesc failed, got %x, expected %x\n", hr, E_FAIL);
1351
1352 hr = v11_dummy->lpVtbl->GetDesc(v11_dummy, &vdesc);
1353 ok(hr == E_FAIL, "GetDesc failed, got %x, expected %x\n", hr, E_FAIL);
1354
1355 hr = v11_valid->lpVtbl->GetDesc(v11_valid, NULL);
1356 ok(hr == E_FAIL, "GetDesc failed, got %x, expected %x\n", hr, E_FAIL);
1357
1358 /* type calls */
1359 hr = t11_dummy->lpVtbl->GetDesc(t11_dummy, NULL);
1360 ok(hr == E_FAIL, "GetDesc failed, got %x, expected %x\n", hr, E_FAIL);
1361
1362 hr = t11_dummy->lpVtbl->GetDesc(t11_dummy, &tdesc);
1363 ok(hr == E_FAIL, "GetDesc failed, got %x, expected %x\n", hr, E_FAIL);
1364
1365 hr = t11_valid->lpVtbl->GetDesc(t11_valid, NULL);
1366 ok(hr == E_FAIL, "GetDesc failed, got %x, expected %x\n", hr, E_FAIL);
1367
1368 string = t11_dummy->lpVtbl->GetMemberTypeName(t11_dummy, 0xffffffff);
1369 ok(!strcmp(string, "$Invalid"), "GetMemberTypeName failed, got \"%s\", expected \"%s\"\n", string, "$Invalid");
1370
1371 string = t11_valid->lpVtbl->GetMemberTypeName(t11_valid, 0xffffffff);
1372 ok(!string, "GetMemberTypeName failed, got \"%s\", expected NULL\n", string);
1373
1374 t11 = t11_dummy->lpVtbl->GetMemberTypeByIndex(t11_dummy, 0xffffffff);
1375 ok(t11_dummy == t11, "GetMemberTypeByIndex failed, got %p, expected %p\n", t11, t11_dummy);
1376
1377 t11 = t11_valid->lpVtbl->GetMemberTypeByIndex(t11_valid, 0xffffffff);
1378 ok(t11_dummy == t11, "GetMemberTypeByIndex failed, got %p, expected %p\n", t11, t11_dummy);
1379
1380 t11 = t11_dummy->lpVtbl->GetMemberTypeByName(t11_dummy, NULL);
1381 ok(t11_dummy == t11, "GetMemberTypeByName failed, got %p, expected %p\n", t11, t11_dummy);
1382
1383 t11 = t11_dummy->lpVtbl->GetMemberTypeByName(t11_dummy, "invalid");
1384 ok(t11_dummy == t11, "GetMemberTypeByName failed, got %p, expected %p\n", t11, t11_dummy);
1385
1386 t11 = t11_valid->lpVtbl->GetMemberTypeByName(t11_valid, NULL);
1387 ok(t11_dummy == t11, "GetMemberTypeByName failed, got %p, expected %p\n", t11, t11_dummy);
1388
1389 t11 = t11_valid->lpVtbl->GetMemberTypeByName(t11_valid, "invalid");
1390 ok(t11_dummy == t11, "GetMemberTypeByName failed, got %p, expected %p\n", t11, t11_dummy);
1391
1392 hr = t11_dummy->lpVtbl->IsEqual(t11_dummy, t11_dummy);
1393 ok(hr == E_FAIL, "IsEqual failed, got %x, expected %x\n", hr, E_FAIL);
1394
1395 hr = t11_valid->lpVtbl->IsEqual(t11_valid, t11_dummy);
1396 ok(hr == S_FALSE, "IsEqual failed, got %x, expected %x\n", hr, S_FALSE);
1397
1398 hr = t11_dummy->lpVtbl->IsEqual(t11_dummy, t11_valid);
1399 ok(hr == E_FAIL, "IsEqual failed, got %x, expected %x\n", hr, E_FAIL);
1400
1401 hr = t11_valid->lpVtbl->IsEqual(t11_valid, t11_valid);
1402 ok(hr == S_OK, "IsEqual failed, got %x, expected %x\n", hr, S_OK);
1403
1404 /* constant buffers */
1406 {
1408
1409 cb11 = ref11->lpVtbl->GetConstantBufferByIndex(ref11, i);
1410 ok(cb11_dummy != cb11, "GetConstantBufferByIndex(%u) failed\n", i);
1411
1412 hr = cb11->lpVtbl->GetDesc(cb11, &cbdesc);
1413 ok(hr == S_OK, "GetDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK);
1414
1415 ok(!strcmp(cbdesc.Name, pcbdesc->Name), "GetDesc(%u) Name failed, got \"%s\", expected \"%s\"\n",
1416 i, cbdesc.Name, pcbdesc->Name);
1417 ok(cbdesc.Type == pcbdesc->Type, "GetDesc(%u) Type failed, got %x, expected %x\n",
1418 i, cbdesc.Type, pcbdesc->Type);
1419 ok(cbdesc.Variables == pcbdesc->Variables, "GetDesc(%u) Variables failed, got %u, expected %u\n",
1420 i, cbdesc.Variables, pcbdesc->Variables);
1421 ok(cbdesc.Size == pcbdesc->Size, "GetDesc(%u) Size failed, got %u, expected %u\n",
1422 i, cbdesc.Size, pcbdesc->Size);
1423 ok(cbdesc.uFlags == pcbdesc->uFlags, "GetDesc(%u) uFlags failed, got %u, expected %u\n",
1424 i, cbdesc.uFlags, pcbdesc->uFlags);
1425 }
1426
1427 /* variables */
1429 {
1431
1432 v11 = ref11->lpVtbl->GetVariableByName(ref11, pvdesc->Name);
1433 ok(v11_dummy != v11, "GetVariableByName(%u) failed\n", i);
1434
1435 hr = v11->lpVtbl->GetDesc(v11, &vdesc);
1436 ok(hr == S_OK, "GetDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK);
1437
1438 ok(!strcmp(vdesc.Name, pvdesc->Name), "GetDesc(%u) Name failed, got \"%s\", expected \"%s\"\n",
1439 i, vdesc.Name, pvdesc->Name);
1440 ok(vdesc.StartOffset == pvdesc->StartOffset, "GetDesc(%u) StartOffset failed, got %u, expected %u\n",
1441 i, vdesc.StartOffset, pvdesc->StartOffset);
1442 ok(vdesc.Size == pvdesc->Size, "GetDesc(%u) Size failed, got %u, expected %u\n",
1443 i, vdesc.Size, pvdesc->Size);
1444 ok(vdesc.uFlags == pvdesc->uFlags, "GetDesc(%u) uFlags failed, got %u, expected %u\n",
1445 i, vdesc.uFlags, pvdesc->uFlags);
1446 ok(vdesc.DefaultValue == pvdesc->DefaultValue, "GetDesc(%u) DefaultValue failed\n", i);
1447
1448 /* types */
1450
1451 t11 = v11->lpVtbl->GetType(v11);
1452 ok(t11_dummy != t11, "GetType(%u) failed\n", i);
1453
1454 hr = t11->lpVtbl->GetDesc(t11, &tdesc);
1455 ok(hr == S_OK, "GetDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK);
1456
1457 ok(tdesc.Class == ptdesc->Class, "GetDesc(%u) Class failed, got %x, expected %x\n",
1458 i, tdesc.Class, ptdesc->Class);
1459 ok(tdesc.Type == ptdesc->Type, "GetDesc(%u) Type failed, got %x, expected %x\n",
1460 i, tdesc.Type, ptdesc->Type);
1461 ok(tdesc.Rows == ptdesc->Rows, "GetDesc(%u) Rows failed, got %x, expected %x\n",
1462 i, tdesc.Rows, ptdesc->Rows);
1463 ok(tdesc.Columns == ptdesc->Columns, "GetDesc(%u) Columns failed, got %u, expected %u\n",
1464 i, tdesc.Columns, ptdesc->Columns);
1465 ok(tdesc.Elements == ptdesc->Elements, "GetDesc(%u) Elements failed, got %u, expected %u\n",
1466 i, tdesc.Elements, ptdesc->Elements);
1467 ok(tdesc.Offset == ptdesc->Offset, "GetDesc(%u) Offset failed, got %u, expected %u\n",
1468 i, tdesc.Offset, ptdesc->Offset);
1469 ok(!strcmp(tdesc.Name, ptdesc->Name), "GetDesc(%u) Name failed, got %s, expected %s\n",
1470 i, tdesc.Name, ptdesc->Name);
1471 }
1472
1473 /* types */
1474 v11 = ref11->lpVtbl->GetVariableByName(ref11, "t");
1475 ok(v11_dummy != v11, "GetVariableByName failed\n");
1476
1477 t11 = v11->lpVtbl->GetType(v11);
1478 ok(t11 != t11_dummy, "GetType failed\n");
1479
1480 t = t11->lpVtbl->GetMemberTypeByIndex(t11, 0);
1481 ok(t != t11_dummy, "GetMemberTypeByIndex failed\n");
1482
1483 t2 = t11->lpVtbl->GetMemberTypeByName(t11, "a");
1484 ok(t == t2, "GetMemberTypeByName failed, got %p, expected %p\n", t2, t);
1485
1486 string = t11->lpVtbl->GetMemberTypeName(t11, 0);
1487 ok(!strcmp(string, "a"), "GetMemberTypeName failed, got \"%s\", expected \"%s\"\n", string, "a");
1488
1489 t = t11->lpVtbl->GetMemberTypeByIndex(t11, 1);
1490 ok(t != t11_dummy, "GetMemberTypeByIndex failed\n");
1491
1492 t2 = t11->lpVtbl->GetMemberTypeByName(t11, "b");
1493 ok(t == t2, "GetMemberTypeByName failed, got %p, expected %p\n", t2, t);
1494
1495 string = t11->lpVtbl->GetMemberTypeName(t11, 1);
1496 ok(!strcmp(string, "b"), "GetMemberTypeName failed, got \"%s\", expected \"%s\"\n", string, "b");
1497
1498 /* float vs float (in struct) */
1499 hr = t11->lpVtbl->IsEqual(t11, t11_valid);
1500 ok(hr == S_FALSE, "IsEqual failed, got %x, expected %x\n", hr, S_FALSE);
1501
1502 hr = t11_valid->lpVtbl->IsEqual(t11_valid, t11);
1503 ok(hr == S_FALSE, "IsEqual failed, got %x, expected %x\n", hr, S_FALSE);
1504
1505 /* float vs float */
1506 t = t11->lpVtbl->GetMemberTypeByIndex(t11, 0);
1507 ok(t != t11_dummy, "GetMemberTypeByIndex failed\n");
1508
1509 t2 = t11->lpVtbl->GetMemberTypeByIndex(t11, 1);
1510 ok(t2 != t11_dummy, "GetMemberTypeByIndex failed\n");
1511
1512 hr = t->lpVtbl->IsEqual(t, t2);
1513 ok(hr == S_OK, "IsEqual failed, got %x, expected %x\n", hr, S_OK);
1514
1515 count = ref11->lpVtbl->Release(ref11);
1516 ok(count == 0, "Release failed %u\n", count);
1517}
#define E_FAIL
Definition: ddrawi.h:102
GLdouble GLdouble t
Definition: gl.h:2047
char string[160]
Definition: util.h:11
static const struct @1654 test_reflection_constant_buffer_variable_result[]
static const D3D11_SHADER_TYPE_DESC test_reflection_constant_buffer_type_result[]
Definition: reflection.c:1215
static const D3D11_SHADER_BUFFER_DESC test_reflection_constant_buffer_cb_result[]
Definition: reflection.c:1197
static void **static DWORD shader_creator[]
Definition: reflection.c:46
static DWORD test_reflection_constant_buffer_blob[]
Definition: reflection.c:1149
D3D_CBUFFER_TYPE Type
Definition: d3d11shader.h:105
UINT TextureCompInstructions
Definition: d3d11shader.h:51
D3D_TESSELLATOR_PARTITIONING HSPartitioning
Definition: d3d11shader.h:70
UINT GSMaxOutputVertexCount
Definition: d3d11shader.h:64
UINT TextureGradientInstructions
Definition: d3d11shader.h:53
UINT PatchConstantParameters
Definition: d3d11shader.h:66
const char * Creator
Definition: d3d11shader.h:38
UINT TextureBiasInstructions
Definition: d3d11shader.h:52
UINT StaticFlowControlCount
Definition: d3d11shader.h:57
D3D_PRIMITIVE InputPrimitive
Definition: d3d11shader.h:65
D3D_PRIMITIVE_TOPOLOGY GSOutputTopology
Definition: d3d11shader.h:63
D3D_TESSELLATOR_DOMAIN TessellatorDomain
Definition: d3d11shader.h:71
UINT cInterlockedInstructions
Definition: d3d11shader.h:73
UINT TextureLoadInstructions
Definition: d3d11shader.h:50
UINT DynamicFlowControlCount
Definition: d3d11shader.h:58
D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive
Definition: d3d11shader.h:69
UINT cTextureStoreInstructions
Definition: d3d11shader.h:74
UINT TextureNormalInstructions
Definition: d3d11shader.h:49
UINT MacroInstructionCount
Definition: d3d11shader.h:59
UINT FloatInstructionCount
Definition: d3d11shader.h:54
UINT ArrayInstructionCount
Definition: d3d11shader.h:60
D3D_SHADER_VARIABLE_CLASS Class
Definition: d3d11shader.h:92
D3D_SHADER_VARIABLE_TYPE Type
Definition: d3d11shader.h:93
#define S_FALSE
Definition: winerror.h:2357
const char * LPCSTR
Definition: xmlstorage.h:183

Referenced by START_TEST().

◆ test_reflection_desc_ps()

static void test_reflection_desc_ps ( void  )
static

Definition at line 583 of file reflection.c.

584{
585 HRESULT hr;
586 ULONG count;
587 ID3D11ShaderReflection *ref11;
588 D3D11_SHADER_DESC sdesc11 = {0};
591 UINT ret;
592 unsigned int i;
593
594 hr = pD3DReflect(test_reflection_desc_ps_blob, test_reflection_desc_ps_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11);
595 ok(hr == S_OK, "D3DReflect failed %x\n", hr);
596
597 hr = ref11->lpVtbl->GetDesc(ref11, &sdesc11);
598 ok(hr == S_OK, "GetDesc failed %x\n", hr);
599
600 ok(sdesc11.Version == 65, "GetDesc failed, got %u, expected %u\n", sdesc11.Version, 65);
601 ok(strcmp(sdesc11.Creator, (char*) shader_creator) == 0, "GetDesc failed, got \"%s\", expected \"%s\"\n", sdesc11.Creator, (char*)shader_creator);
602 ok(sdesc11.Flags == 256, "GetDesc failed, got %u, expected %u\n", sdesc11.Flags, 256);
603 ok(sdesc11.ConstantBuffers == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.ConstantBuffers, 0);
604 ok(sdesc11.BoundResources == 4, "GetDesc failed, got %u, expected %u\n", sdesc11.BoundResources, 4);
605 ok(sdesc11.InputParameters == 8, "GetDesc failed, got %u, expected %u\n", sdesc11.InputParameters, 8);
606 ok(sdesc11.OutputParameters == 4, "GetDesc failed, got %u, expected %u\n", sdesc11.OutputParameters, 4);
607 ok(sdesc11.InstructionCount == 50, "GetDesc failed, got %u, expected %u\n", sdesc11.InstructionCount, 50);
608 ok(sdesc11.TempRegisterCount == 3, "GetDesc failed, got %u, expected %u\n", sdesc11.TempRegisterCount, 3);
609 ok(sdesc11.TempArrayCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.TempArrayCount, 0);
610 ok(sdesc11.DefCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.DefCount, 0);
611 ok(sdesc11.DclCount == 5, "GetDesc failed, got %u, expected %u\n", sdesc11.DclCount, 5);
612 ok(sdesc11.TextureNormalInstructions == 1, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureNormalInstructions, 1);
613 ok(sdesc11.TextureLoadInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureLoadInstructions, 0);
614 ok(sdesc11.TextureCompInstructions == 3, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureCompInstructions, 3);
615 ok(sdesc11.TextureBiasInstructions == 4, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureBiasInstructions, 4);
616 ok(sdesc11.TextureGradientInstructions == 5, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureGradientInstructions, 5);
617 ok(sdesc11.FloatInstructionCount == 17, "GetDesc failed, got %u, expected %u\n", sdesc11.FloatInstructionCount, 17);
618 ok(sdesc11.IntInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.IntInstructionCount, 0);
619 ok(sdesc11.UintInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.UintInstructionCount, 0);
620 ok(sdesc11.StaticFlowControlCount == 6, "GetDesc failed, got %u, expected %u\n", sdesc11.StaticFlowControlCount, 6);
621 ok(sdesc11.DynamicFlowControlCount == 5, "GetDesc failed, got %u, expected %u\n", sdesc11.DynamicFlowControlCount, 5);
622 ok(sdesc11.MacroInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.MacroInstructionCount, 0);
623 ok(sdesc11.ArrayInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.ArrayInstructionCount, 0);
624 ok(sdesc11.CutInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.CutInstructionCount, 0);
625 ok(sdesc11.EmitInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.EmitInstructionCount, 0);
626 ok(sdesc11.GSOutputTopology == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.GSOutputTopology, 0);
627 ok(sdesc11.GSMaxOutputVertexCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.GSMaxOutputVertexCount, 0);
628 ok(sdesc11.InputPrimitive == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.InputPrimitive, 0);
629 ok(sdesc11.PatchConstantParameters == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.PatchConstantParameters, 0);
630 ok(sdesc11.cGSInstanceCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cGSInstanceCount, 0);
631 ok(sdesc11.cControlPoints == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cControlPoints, 0);
632 ok(sdesc11.HSOutputPrimitive == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.HSOutputPrimitive, 0);
633 ok(sdesc11.HSPartitioning == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.HSPartitioning, 0);
634 ok(sdesc11.TessellatorDomain == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.TessellatorDomain, 0);
635 ok(sdesc11.cBarrierInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cBarrierInstructions, 0);
636 ok(sdesc11.cInterlockedInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cInterlockedInstructions, 0);
637 ok(sdesc11.cTextureStoreInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cTextureStoreInstructions, 0);
638
639 ret = ref11->lpVtbl->GetBitwiseInstructionCount(ref11);
640 ok(ret == 0, "GetBitwiseInstructionCount failed, got %u, expected %u\n", ret, 0);
641
642 ret = ref11->lpVtbl->GetConversionInstructionCount(ref11);
643 ok(ret == 0, "GetConversionInstructionCount failed, got %u, expected %u\n", ret, 0);
644
645 ret = ref11->lpVtbl->GetMovInstructionCount(ref11);
646 ok(ret == 24, "GetMovInstructionCount failed, got %u, expected %u\n", ret, 24);
647
648 ret = ref11->lpVtbl->GetMovcInstructionCount(ref11);
649 ok(ret == 0, "GetMovcInstructionCount failed, got %u, expected %u\n", ret, 0);
650
651 /* check invalid Get*ParameterDesc cases*/
652 hr = ref11->lpVtbl->GetInputParameterDesc(ref11, 0, NULL);
653 ok(hr == E_INVALIDARG, "GetInputParameterDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
654
655 hr = ref11->lpVtbl->GetInputParameterDesc(ref11, 0xffffffff, &desc);
656 ok(hr == E_INVALIDARG, "GetInputParameterDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
657
658 hr = ref11->lpVtbl->GetOutputParameterDesc(ref11, 0, NULL);
659 ok(hr == E_INVALIDARG, "GetOutputParameterDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
660
661 hr = ref11->lpVtbl->GetOutputParameterDesc(ref11, 0xffffffff, &desc);
662 ok(hr == E_INVALIDARG, "GetOutputParameterDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
663
664 hr = ref11->lpVtbl->GetPatchConstantParameterDesc(ref11, 0, &desc);
665 ok(hr == E_INVALIDARG, "GetPatchConstantParameterDesc failed, got %x, expected %x\n", hr, E_INVALIDARG);
666
667 /* GetIn/OutputParameterDesc */
669 {
671
672 hr = ref11->lpVtbl->GetInputParameterDesc(ref11, i, &desc);
673 ok(hr == S_OK, "GetInputParameterDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK);
674
675 ok(!strcmp(desc.SemanticName, pdesc->SemanticName), "GetInputParameterDesc(%u) SemanticName failed, got \"%s\", expected \"%s\"\n",
676 i, desc.SemanticName, pdesc->SemanticName);
677 ok(desc.SemanticIndex == pdesc->SemanticIndex, "GetInputParameterDesc(%u) SemanticIndex failed, got %u, expected %u\n",
678 i, desc.SemanticIndex, pdesc->SemanticIndex);
679 ok(desc.Register == pdesc->Register, "GetInputParameterDesc(%u) Register failed, got %u, expected %u\n",
680 i, desc.Register, pdesc->Register);
681 ok(desc.SystemValueType == pdesc->SystemValueType, "GetInputParameterDesc(%u) SystemValueType failed, got %x, expected %x\n",
682 i, desc.SystemValueType, pdesc->SystemValueType);
683 ok(desc.ComponentType == pdesc->ComponentType, "GetInputParameterDesc(%u) ComponentType failed, got %x, expected %x\n",
684 i, desc.ComponentType, pdesc->ComponentType);
685 ok(desc.Mask == pdesc->Mask, "GetInputParameterDesc(%u) Mask failed, got %x, expected %x\n",
686 i, desc.Mask, pdesc->Mask);
687 ok(desc.ReadWriteMask == pdesc->ReadWriteMask, "GetInputParameterDesc(%u) ReadWriteMask failed, got %x, expected %x\n",
688 i, desc.ReadWriteMask, pdesc->ReadWriteMask);
689 ok(desc.Stream == pdesc->Stream, "GetInputParameterDesc(%u) Stream failed, got %u, expected %u\n",
690 i, desc.Stream, pdesc->ReadWriteMask);
691 }
692
694 {
696
697 hr = ref11->lpVtbl->GetOutputParameterDesc(ref11, i, &desc);
698 ok(hr == S_OK, "GetOutputParameterDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK);
699
700 ok(!strcmp(desc.SemanticName, pdesc->SemanticName), "GetOutputParameterDesc(%u) SemanticName failed, got \"%s\", expected \"%s\"\n",
701 i, desc.SemanticName, pdesc->SemanticName);
702 ok(desc.SemanticIndex == pdesc->SemanticIndex, "GetOutputParameterDesc(%u) SemanticIndex failed, got %u, expected %u\n",
703 i, desc.SemanticIndex, pdesc->SemanticIndex);
704 ok(desc.Register == pdesc->Register, "GetOutputParameterDesc(%u) Register failed, got %u, expected %u\n",
705 i, desc.Register, pdesc->Register);
706 ok(desc.SystemValueType == pdesc->SystemValueType, "GetOutputParameterDesc(%u) SystemValueType failed, got %x, expected %x\n",
707 i, desc.SystemValueType, pdesc->SystemValueType);
708 ok(desc.ComponentType == pdesc->ComponentType, "GetOutputParameterDesc(%u) ComponentType failed, got %x, expected %x\n",
709 i, desc.ComponentType, pdesc->ComponentType);
710 ok(desc.Mask == pdesc->Mask, "GetOutputParameterDesc(%u) Mask failed, got %x, expected %x\n",
711 i, desc.Mask, pdesc->Mask);
712 ok(desc.ReadWriteMask == pdesc->ReadWriteMask, "GetOutputParameterDesc(%u) ReadWriteMask failed, got %x, expected %x\n",
713 i, desc.ReadWriteMask, pdesc->ReadWriteMask);
714 ok(desc.Stream == pdesc->Stream, "GetOutputParameterDesc(%u) Stream failed, got %u, expected %u\n",
715 i, desc.Stream, pdesc->ReadWriteMask);
716 }
717
718 count = ref11->lpVtbl->Release(ref11);
719 ok(count == 0, "Release failed %u\n", count);
720}
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_ps_resultin[]
Definition: reflection.c:563
static DWORD test_reflection_desc_ps_blob[]
Definition: reflection.c:489
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_ps_resultout[]
Definition: reflection.c:575
unsigned int UINT
Definition: ndis.h:50
D3D_REGISTER_COMPONENT_TYPE ComponentType
Definition: d3d11shader.h:129
int ret

Referenced by START_TEST().

◆ test_reflection_desc_ps_output()

static void test_reflection_desc_ps_output ( void  )
static

Definition at line 902 of file reflection.c.

903{
904 HRESULT hr;
905 ULONG count;
906 ID3D11ShaderReflection *ref11;
909 unsigned int i;
910
912 {
913 hr = pD3DReflect(test_reflection_desc_ps_output_blob[i], test_reflection_desc_ps_output_blob[i][6], &IID_ID3D11ShaderReflection, (void **)&ref11);
914 ok(hr == S_OK, "(%u): D3DReflect failed %x\n", i, hr);
915
917
918 hr = ref11->lpVtbl->GetOutputParameterDesc(ref11, 0, &desc);
919 ok(hr == S_OK, "(%u): GetOutputParameterDesc failed, got %x, expected %x\n", i, hr, S_OK);
920
921 ok(!strcmp(desc.SemanticName, pdesc->SemanticName), "(%u): GetOutputParameterDesc SemanticName failed, got \"%s\", expected \"%s\"\n",
922 i, desc.SemanticName, pdesc->SemanticName);
923 ok(desc.SemanticIndex == pdesc->SemanticIndex, "(%u): GetOutputParameterDesc SemanticIndex failed, got %u, expected %u\n",
924 i, desc.SemanticIndex, pdesc->SemanticIndex);
925 ok(desc.Register == pdesc->Register, "(%u): GetOutputParameterDesc Register failed, got %u, expected %u\n",
926 i, desc.Register, pdesc->Register);
927 ok(desc.SystemValueType == pdesc->SystemValueType, "(%u): GetOutputParameterDesc SystemValueType failed, got %x, expected %x\n",
928 i, desc.SystemValueType, pdesc->SystemValueType);
929 ok(desc.ComponentType == pdesc->ComponentType, "(%u): GetOutputParameterDesc ComponentType failed, got %x, expected %x\n",
930 i, desc.ComponentType, pdesc->ComponentType);
931 ok(desc.Mask == pdesc->Mask, "(%u): GetOutputParameterDesc Mask failed, got %x, expected %x\n",
932 i, desc.Mask, pdesc->Mask);
933 ok(desc.ReadWriteMask == pdesc->ReadWriteMask, "(%u): GetOutputParameterDesc ReadWriteMask failed, got %x, expected %x\n",
934 i, desc.ReadWriteMask, pdesc->ReadWriteMask);
935 ok(desc.Stream == pdesc->Stream, "(%u): GetOutputParameterDesc Stream failed, got %u, expected %u\n",
936 i, desc.Stream, pdesc->ReadWriteMask);
937
938 count = ref11->lpVtbl->Release(ref11);
939 ok(count == 0, "(%u): Release failed %u\n", i, count);
940 }
941}
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_ps_output_result[]
Definition: reflection.c:892
static const DWORD * test_reflection_desc_ps_output_blob[]
Definition: reflection.c:883

Referenced by START_TEST().

◆ test_reflection_desc_vs()

static void test_reflection_desc_vs ( void  )
static

Definition at line 296 of file reflection.c.

297{
298 HRESULT hr;
299 ULONG count;
300 ID3D11ShaderReflection *ref11;
301 D3D11_SHADER_DESC sdesc11 = {0};
304 UINT ret;
305 unsigned int i;
306
307 hr = pD3DReflect(test_reflection_desc_vs_blob, test_reflection_desc_vs_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11);
308 ok(hr == S_OK, "D3DReflect failed %x\n", hr);
309
310 hr = ref11->lpVtbl->GetDesc(ref11, NULL);
311 ok(hr == E_FAIL, "GetDesc failed %x\n", hr);
312
313 hr = ref11->lpVtbl->GetDesc(ref11, &sdesc11);
314 ok(hr == S_OK, "GetDesc failed %x\n", hr);
315
316 ok(sdesc11.Version == 65601, "GetDesc failed, got %u, expected %u\n", sdesc11.Version, 65601);
317 ok(strcmp(sdesc11.Creator, (char*) shader_creator) == 0, "GetDesc failed, got \"%s\", expected \"%s\"\n", sdesc11.Creator, (char*)shader_creator);
318 ok(sdesc11.Flags == 256, "GetDesc failed, got %u, expected %u\n", sdesc11.Flags, 256);
319 ok(sdesc11.ConstantBuffers == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.ConstantBuffers, 0);
320 ok(sdesc11.BoundResources == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.BoundResources, 0);
321 ok(sdesc11.InputParameters == 15, "GetDesc failed, got %u, expected %u\n", sdesc11.InputParameters, 15);
322 ok(sdesc11.OutputParameters == 11, "GetDesc failed, got %u, expected %u\n", sdesc11.OutputParameters, 11);
323 ok(sdesc11.InstructionCount == 21, "GetDesc failed, got %u, expected %u\n", sdesc11.InstructionCount, 21);
324 ok(sdesc11.TempRegisterCount == 1, "GetDesc failed, got %u, expected %u\n", sdesc11.TempRegisterCount, 1);
325 ok(sdesc11.TempArrayCount == 5, "GetDesc failed, got %u, expected %u\n", sdesc11.TempArrayCount, 5);
326 ok(sdesc11.DefCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.DefCount, 0);
327 ok(sdesc11.DclCount == 18, "GetDesc failed, got %u, expected %u\n", sdesc11.DclCount, 18);
328 ok(sdesc11.TextureNormalInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureNormalInstructions, 0);
329 ok(sdesc11.TextureLoadInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureLoadInstructions, 0);
330 ok(sdesc11.TextureCompInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureCompInstructions, 0);
331 ok(sdesc11.TextureBiasInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureBiasInstructions, 0);
332 ok(sdesc11.TextureGradientInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.TextureGradientInstructions, 0);
333 ok(sdesc11.FloatInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.FloatInstructionCount, 0);
334 ok(sdesc11.IntInstructionCount == 1, "GetDesc failed, got %u, expected %u\n", sdesc11.IntInstructionCount, 1);
335 ok(sdesc11.UintInstructionCount == 1, "GetDesc failed, got %u, expected %u\n", sdesc11.UintInstructionCount, 1);
336 ok(sdesc11.StaticFlowControlCount == 1, "GetDesc failed, got %u, expected %u\n", sdesc11.StaticFlowControlCount, 1);
337 ok(sdesc11.DynamicFlowControlCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.DynamicFlowControlCount, 0);
338 ok(sdesc11.MacroInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.MacroInstructionCount, 0);
339 ok(sdesc11.ArrayInstructionCount == 6, "GetDesc failed, got %u, expected %u\n", sdesc11.ArrayInstructionCount, 6);
340 ok(sdesc11.CutInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.CutInstructionCount, 0);
341 ok(sdesc11.EmitInstructionCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.EmitInstructionCount, 0);
342 ok(sdesc11.GSOutputTopology == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.GSOutputTopology, 0);
343 ok(sdesc11.GSMaxOutputVertexCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.GSMaxOutputVertexCount, 0);
344 ok(sdesc11.InputPrimitive == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.InputPrimitive, 0);
345 ok(sdesc11.PatchConstantParameters == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.PatchConstantParameters, 0);
346 ok(sdesc11.cGSInstanceCount == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cGSInstanceCount, 0);
347 ok(sdesc11.cControlPoints == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cControlPoints, 0);
348 ok(sdesc11.HSOutputPrimitive == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.HSOutputPrimitive, 0);
349 ok(sdesc11.HSPartitioning == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.HSPartitioning, 0);
350 ok(sdesc11.TessellatorDomain == 0, "GetDesc failed, got %x, expected %x\n", sdesc11.TessellatorDomain, 0);
351 ok(sdesc11.cBarrierInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cBarrierInstructions, 0);
352 ok(sdesc11.cInterlockedInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cInterlockedInstructions, 0);
353 ok(sdesc11.cTextureStoreInstructions == 0, "GetDesc failed, got %u, expected %u\n", sdesc11.cTextureStoreInstructions, 0);
354
355 ret = ref11->lpVtbl->GetBitwiseInstructionCount(ref11);
356 ok(ret == 0, "GetBitwiseInstructionCount failed, got %u, expected %u\n", ret, 0);
357
358 ret = ref11->lpVtbl->GetConversionInstructionCount(ref11);
359 ok(ret == 2, "GetConversionInstructionCount failed, got %u, expected %u\n", ret, 2);
360
361 ret = ref11->lpVtbl->GetMovInstructionCount(ref11);
362 ok(ret == 10, "GetMovInstructionCount failed, got %u, expected %u\n", ret, 10);
363
364 ret = ref11->lpVtbl->GetMovcInstructionCount(ref11);
365 ok(ret == 0, "GetMovcInstructionCount failed, got %u, expected %u\n", ret, 0);
366
367 /* GetIn/OutputParameterDesc */
369 {
371
372 hr = ref11->lpVtbl->GetInputParameterDesc(ref11, i, &desc);
373 ok(hr == S_OK, "GetInputParameterDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK);
374
375 ok(!strcmp(desc.SemanticName, pdesc->SemanticName), "GetInputParameterDesc(%u) SemanticName failed, got \"%s\", expected \"%s\"\n",
376 i, desc.SemanticName, pdesc->SemanticName);
377 ok(desc.SemanticIndex == pdesc->SemanticIndex, "GetInputParameterDesc(%u) SemanticIndex failed, got %u, expected %u\n",
378 i, desc.SemanticIndex, pdesc->SemanticIndex);
379 ok(desc.Register == pdesc->Register, "GetInputParameterDesc(%u) Register failed, got %u, expected %u\n",
380 i, desc.Register, pdesc->Register);
381 ok(desc.SystemValueType == pdesc->SystemValueType, "GetInputParameterDesc(%u) SystemValueType failed, got %x, expected %x\n",
382 i, desc.SystemValueType, pdesc->SystemValueType);
383 ok(desc.ComponentType == pdesc->ComponentType, "GetInputParameterDesc(%u) ComponentType failed, got %x, expected %x\n",
384 i, desc.ComponentType, pdesc->ComponentType);
385 ok(desc.Mask == pdesc->Mask, "GetInputParameterDesc(%u) Mask failed, got %x, expected %x\n",
386 i, desc.Mask, pdesc->Mask);
387 ok(desc.ReadWriteMask == pdesc->ReadWriteMask, "GetInputParameterDesc(%u) ReadWriteMask failed, got %x, expected %x\n",
388 i, desc.ReadWriteMask, pdesc->ReadWriteMask);
389 ok(desc.Stream == pdesc->Stream, "GetInputParameterDesc(%u) Stream failed, got %u, expected %u\n",
390 i, desc.Stream, pdesc->ReadWriteMask);
391 }
392
394 {
396
397 hr = ref11->lpVtbl->GetOutputParameterDesc(ref11, i, &desc);
398 ok(hr == S_OK, "GetOutputParameterDesc(%u) failed, got %x, expected %x\n", i, hr, S_OK);
399
400 ok(!strcmp(desc.SemanticName, pdesc->SemanticName), "GetOutputParameterDesc(%u) SemanticName failed, got \"%s\", expected \"%s\"\n",
401 i, desc.SemanticName, pdesc->SemanticName);
402 ok(desc.SemanticIndex == pdesc->SemanticIndex, "GetOutputParameterDesc(%u) SemanticIndex failed, got %u, expected %u\n",
403 i, desc.SemanticIndex, pdesc->SemanticIndex);
404 ok(desc.Register == pdesc->Register, "GetOutputParameterDesc(%u) Register failed, got %u, expected %u\n",
405 i, desc.Register, pdesc->Register);
406 ok(desc.SystemValueType == pdesc->SystemValueType, "GetOutputParameterDesc(%u) SystemValueType failed, got %x, expected %x\n",
407 i, desc.SystemValueType, pdesc->SystemValueType);
408 ok(desc.ComponentType == pdesc->ComponentType, "GetOutputParameterDesc(%u) ComponentType failed, got %x, expected %x\n",
409 i, desc.ComponentType, pdesc->ComponentType);
410 ok(desc.Mask == pdesc->Mask, "GetOutputParameterDesc(%u) Mask failed, got %x, expected %x\n",
411 i, desc.Mask, pdesc->Mask);
412 ok(desc.ReadWriteMask == pdesc->ReadWriteMask, "GetOutputParameterDesc(%u) ReadWriteMask failed, got %x, expected %x\n",
413 i, desc.ReadWriteMask, pdesc->ReadWriteMask);
414 ok(desc.Stream == pdesc->Stream, "GetOutputParameterDesc(%u) Stream failed, got %u, expected %u\n",
415 i, desc.Stream, pdesc->ReadWriteMask);
416 }
417
418 count = ref11->lpVtbl->Release(ref11);
419 ok(count == 0, "Release failed %u\n", count);
420}
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_vs_resultout[]
Definition: reflection.c:281
static DWORD test_reflection_desc_vs_blob[]
Definition: reflection.c:199
static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_vs_resultin[]
Definition: reflection.c:262

Referenced by START_TEST().

◆ test_reflection_references()

static void test_reflection_references ( void  )
static

Definition at line 81 of file reflection.c.

82{
83 HRESULT hr;
85 ID3D11ShaderReflection *ref11, *ref11_test;
86 ID3D10ShaderReflection *ref10;
87 ID3D10ShaderReflection1 *ref10_1;
88
89 hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11);
90 ok(hr == S_OK, "D3DReflect failed, got %x, expected %x\n", hr, S_OK);
91
92 hr = ref11->lpVtbl->QueryInterface(ref11, &IID_ID3D11ShaderReflection, (void **)&ref11_test);
93 ok(hr == S_OK, "QueryInterface failed, got %x, expected %x\n", hr, S_OK);
94
95 count = ref11_test->lpVtbl->Release(ref11_test);
96 ok(count == 1, "Release failed %u\n", count);
97
98 hr = ref11->lpVtbl->QueryInterface(ref11, &IID_ID3D10ShaderReflection, (void **)&ref10);
99 ok(hr == E_NOINTERFACE, "QueryInterface failed, got %x, expected %x\n", hr, E_NOINTERFACE);
100
101 hr = ref11->lpVtbl->QueryInterface(ref11, &IID_ID3D10ShaderReflection1, (void **)&ref10_1);
102 ok(hr == E_NOINTERFACE, "QueryInterface failed, got %x, expected %x\n", hr, E_NOINTERFACE);
103
104 count = ref11->lpVtbl->Release(ref11);
105 ok(count == 0, "Release failed %u\n", count);
106
107 /* check invalid cases */
108 hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6], &IID_ID3D10ShaderReflection, (void **)&ref10);
109 ok(hr == E_NOINTERFACE, "D3DReflect failed, got %x, expected %x\n", hr, E_NOINTERFACE);
110
111 hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6], &IID_ID3D10ShaderReflection1, (void **)&ref10_1);
112 ok(hr == E_NOINTERFACE, "D3DReflect failed, got %x, expected %x\n", hr, E_NOINTERFACE);
113
114 hr = pD3DReflect(NULL, test_reflection_blob[6], &IID_ID3D10ShaderReflection1, (void **)&ref10_1);
115 ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL);
116
117 hr = pD3DReflect(NULL, test_reflection_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11);
118 ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL);
119
120 /* returns different errors with different sizes */
121 hr = pD3DReflect(test_reflection_blob, 31, &IID_ID3D10ShaderReflection1, (void **)&ref10_1);
122 ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL);
123
124 hr = pD3DReflect(test_reflection_blob, 32, &IID_ID3D10ShaderReflection1, (void **)&ref10_1);
125 ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL);
126
127 hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6]-1, &IID_ID3D10ShaderReflection1, (void **)&ref10_1);
128 ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL);
129
130 hr = pD3DReflect(test_reflection_blob, 31, &IID_ID3D11ShaderReflection, (void **)&ref11);
131 ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL);
132
133 hr = pD3DReflect(test_reflection_blob, 32, &IID_ID3D11ShaderReflection, (void **)&ref11);
134 ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL);
135
136 hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6]-1, &IID_ID3D11ShaderReflection, (void **)&ref11);
137 ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL);
138}
#define D3DERR_INVALIDCALL
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
nsrefcnt Release()
static DWORD test_reflection_blob[]
Definition: reflection.c:63
#define E_NOINTERFACE
Definition: winerror.h:2364

Referenced by START_TEST().

Variable Documentation

◆ desc

Definition at line 1204 of file reflection.c.

◆ REFIID

REFIID

Definition at line 43 of file reflection.c.

◆ shader_creator

void** static DWORD shader_creator[]
static
Initial value:
= {
0x7263694d, 0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d,
0x39207265, 0x2e39322e, 0x2e323539, 0x31313133, 0xababab00,
}

Definition at line 46 of file reflection.c.

Referenced by test_reflection_constant_buffer(), test_reflection_desc_ps(), and test_reflection_desc_vs().

◆ SIZE_T

Definition at line 43 of file reflection.c.

◆ test_reflection_blob

DWORD test_reflection_blob[]
static
Initial value:
= {
0x43425844, 0x77c6324f, 0xfd27948a, 0xe6958d31, 0x53361cba, 0x00000001, 0x000001d8, 0x00000005,
0x00000034, 0x0000008c, 0x000000e4, 0x00000118, 0x0000015c, 0x46454452, 0x00000050, 0x00000000,
0x00000000, 0x00000000, 0x0000001c, 0xfffe0400, 0x00000100, 0x0000001c, 0x7263694d, 0x666f736f,
0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e39322e,
0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038,
0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x00000041, 0x00000000, 0x00000000,
0x00000003, 0x00000001, 0x0000000f, 0x49534f50, 0x4e4f4954, 0x5f565300, 0x49534f50, 0x4e4f4954,
0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000001,
0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49, 0x52444853, 0x0000003c,
0x00010040, 0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000,
0x00000001, 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, 0x54415453,
0x00000074, 0x00000002, 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000000,
0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
}

Definition at line 63 of file reflection.c.

Referenced by test_reflection_references().

◆ test_reflection_bound_resources_blob

DWORD test_reflection_bound_resources_blob[]
static

Definition at line 973 of file reflection.c.

Referenced by test_reflection_bound_resources().

◆ test_reflection_bound_resources_result

const D3D11_SHADER_INPUT_BIND_DESC test_reflection_bound_resources_result[]
static
Initial value:
=
{
{"sam", D3D_SIT_SAMPLER, 0, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0},
{"c1", D3D_SIT_CBUFFER, 0, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0},
{"c2", D3D_SIT_CBUFFER, 1, 1, 0, 0, D3D_SRV_DIMENSION_UNKNOWN, 0},
}
@ D3D_SRV_DIMENSION_TEXTURE2D
Definition: d3dcommon.idl:511
@ D3D_SRV_DIMENSION_UNKNOWN
Definition: d3dcommon.idl:507
@ D3D_RETURN_TYPE_FLOAT
Definition: d3dcommon.idl:572
@ D3D_SIT_SAMPLER
Definition: d3dcommon.idl:645
@ D3D_SIT_TEXTURE
Definition: d3dcommon.idl:644
@ D3D_SIT_CBUFFER
Definition: d3dcommon.idl:642

Definition at line 1008 of file reflection.c.

Referenced by test_reflection_bound_resources().

◆ test_reflection_constant_buffer_blob

DWORD test_reflection_constant_buffer_blob[]
static

Definition at line 1149 of file reflection.c.

Referenced by test_reflection_constant_buffer().

◆ test_reflection_constant_buffer_cb_result

const D3D11_SHADER_BUFFER_DESC test_reflection_constant_buffer_cb_result[]
static
Initial value:
=
{
{"$ThisPointer", D3D_CT_INTERFACE_POINTERS, 1, 16, 0},
{"c1", D3D_CT_CBUFFER, 4, 64, 0},
}
@ D3D_CT_CBUFFER
Definition: d3dcommon.idl:493
@ D3D_CT_INTERFACE_POINTERS
Definition: d3dcommon.idl:495

Definition at line 1197 of file reflection.c.

Referenced by test_reflection_constant_buffer().

◆ test_reflection_constant_buffer_type_result

const D3D11_SHADER_TYPE_DESC test_reflection_constant_buffer_type_result[]
static
Initial value:
=
{
{D3D_SVC_SCALAR, D3D_SVT_FLOAT, 1, 1, 0, 1, 0, "float"},
{D3D_SVC_SCALAR, D3D_SVT_FLOAT, 1, 1, 2, 1, 0, "float"},
{D3D_SVC_SCALAR, D3D_SVT_INT, 1, 1, 0, 1, 0, "int"},
{D3D_SVC_STRUCT, D3D_SVT_VOID, 1, 2, 0, 1, 0, "s"},
}
@ D3D11_SVC_INTERFACE_POINTER
Definition: d3dcommon.idl:125
@ D3D_SVC_SCALAR
Definition: d3dcommon.idl:110
@ D3D_SVC_STRUCT
Definition: d3dcommon.idl:115
@ D3D_SVT_INT
Definition: d3dcommon.idl:146
@ D3D_SVT_VOID
Definition: d3dcommon.idl:144
@ D3D_SVT_FLOAT
Definition: d3dcommon.idl:147
@ D3D11_SVT_INTERFACE_POINTER
Definition: d3dcommon.idl:233

Definition at line 1215 of file reflection.c.

Referenced by test_reflection_constant_buffer().

◆ 

const struct { ... } test_reflection_constant_buffer_variable_result[]
Initial value:
=
{
{{"g_Test", 0, 1, 6, 0}, 0},
{{"a", 0, 4, 0, 0}, 1},
{{"b", 16, 20, 0, 0}, 2},
{{"i", 36, 4, 0, 0}, 3},
{{"t", 48, 8, 2, 0}, 4},
}

Referenced by test_reflection_constant_buffer().

◆ test_reflection_desc_ps_blob

DWORD test_reflection_desc_ps_blob[]
static

Definition at line 489 of file reflection.c.

Referenced by test_reflection_desc_ps().

◆ test_reflection_desc_ps_output_blob

const DWORD* test_reflection_desc_ps_output_blob[]
static
Initial value:
= {
}
static const DWORD test_reflection_desc_ps_output_blob_4[]
Definition: reflection.c:841
static const DWORD test_reflection_desc_ps_output_blob_1[]
Definition: reflection.c:758
static const DWORD test_reflection_desc_ps_output_blob_3[]
Definition: reflection.c:814
static const DWORD test_reflection_desc_ps_output_blob_5[]
Definition: reflection.c:866
static const DWORD test_reflection_desc_ps_output_blob_0[]
Definition: reflection.c:732
static const DWORD test_reflection_desc_ps_output_blob_2[]
Definition: reflection.c:786

Definition at line 883 of file reflection.c.

Referenced by test_reflection_desc_ps_output().

◆ test_reflection_desc_ps_output_blob_0

const DWORD test_reflection_desc_ps_output_blob_0[]
static
Initial value:
= {
0x43425844, 0x3e7b77e6, 0xe4e920b7, 0x9cad0533, 0x240117cc, 0x00000001, 0x0000018c, 0x00000005,
0x00000034, 0x0000008c, 0x0000009c, 0x000000d0, 0x00000110, 0x46454452, 0x00000050, 0x00000000,
0x00000000, 0x00000000, 0x0000001c, 0xffff0400, 0x00000100, 0x0000001c, 0x7263694d, 0x666f736f,
0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e39322e,
0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000003, 0x00000000, 0x00000003, 0x00000003,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000038, 0x00000040, 0x0000000e,
0x03000065, 0x001020f2, 0x00000003, 0x08000036, 0x001020f2, 0x00000003, 0x00004002, 0x3f99999a,
0x3f800000, 0x3e4ccccd, 0x00000000, 0x0100003e, 0x54415453, 0x00000074, 0x00000002, 0x00000000,
0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000
}

Definition at line 732 of file reflection.c.

◆ test_reflection_desc_ps_output_blob_1

const DWORD test_reflection_desc_ps_output_blob_1[]
static
Initial value:
= {
0x43425844, 0xd8ead3ec, 0x61276ada, 0x70cdaa9e, 0x2cfd7f4c, 0x00000001, 0x000001c4, 0x00000005,
0x00000034, 0x000000ac, 0x000000bc, 0x000000f8, 0x00000128, 0x46454452, 0x00000070, 0x00000000,
0x00000000, 0x00000000, 0x0000003c, 0xffff0500, 0x00000100, 0x0000003c, 0x31314452, 0x0000003c,
0x00000018, 0x00000020, 0x00000028, 0x00000024, 0x0000000c, 0x00000000, 0x7263694d, 0x666f736f,
0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e39322e,
0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x00000034, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0xffffffff,
0x00000e01, 0x445f5653, 0x68747065, 0x7373654c, 0x61757145, 0xabab006c, 0x58454853, 0x00000028,
0x00000050, 0x0000000a, 0x0100086a, 0x02000065, 0x00027001, 0x04000036, 0x00027001, 0x00004001,
0x3f99999a, 0x0100003e, 0x54415453, 0x00000094, 0x00000002, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000,
}

Definition at line 758 of file reflection.c.

◆ test_reflection_desc_ps_output_blob_2

const DWORD test_reflection_desc_ps_output_blob_2[]
static
Initial value:
= {
0x43425844, 0x9f61c8df, 0x612cbb1f, 0x9e1d039e, 0xf925a074, 0x00000001, 0x000001c8, 0x00000005,
0x00000034, 0x000000ac, 0x000000bc, 0x000000fc, 0x0000012c, 0x46454452, 0x00000070, 0x00000000,
0x00000000, 0x00000000, 0x0000003c, 0xffff0500, 0x00000100, 0x0000003c, 0x31314452, 0x0000003c,
0x00000018, 0x00000020, 0x00000028, 0x00000024, 0x0000000c, 0x00000000, 0x7263694d, 0x666f736f,
0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e39322e,
0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x00000038, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0xffffffff,
0x00000e01, 0x445f5653, 0x68747065, 0x61657247, 0x45726574, 0x6c617571, 0xababab00, 0x58454853,
0x00000028, 0x00000050, 0x0000000a, 0x0100086a, 0x02000065, 0x00026001, 0x04000036, 0x00026001,
0x00004001, 0x3f99999a, 0x0100003e, 0x54415453, 0x00000094, 0x00000002, 0x00000000, 0x00000000,
0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000,
}

Definition at line 786 of file reflection.c.

◆ test_reflection_desc_ps_output_blob_3

const DWORD test_reflection_desc_ps_output_blob_3[]
static
Initial value:
= {
0x43425844, 0x32cec0e6, 0x3873ed32, 0x2e86ffd0, 0x21bb00e8, 0x00000001, 0x000001bc, 0x00000005,
0x00000034, 0x000000ac, 0x000000bc, 0x000000f0, 0x00000120, 0x46454452, 0x00000070, 0x00000000,
0x00000000, 0x00000000, 0x0000003c, 0xffff0500, 0x00000100, 0x0000003c, 0x31314452, 0x0000003c,
0x00000018, 0x00000020, 0x00000028, 0x00000024, 0x0000000c, 0x00000000, 0x7263694d, 0x666f736f,
0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e39322e,
0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0xffffffff,
0x00000e01, 0x445f5673, 0x48745065, 0xababab00, 0x58454853, 0x00000028, 0x00000050, 0x0000000a,
0x0100086a, 0x02000065, 0x0000c001, 0x04000036, 0x0000c001, 0x00004001, 0x3f99999a, 0x0100003e,
0x54415453, 0x00000094, 0x00000002, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
}

Definition at line 814 of file reflection.c.

◆ test_reflection_desc_ps_output_blob_4

const DWORD test_reflection_desc_ps_output_blob_4[]
static
Initial value:
= {
0x43425844, 0x7af34874, 0x975f09ad, 0xf6e50764, 0xdfb1255f, 0x00000001, 0x00000178, 0x00000005,
0x00000034, 0x0000008c, 0x0000009c, 0x000000d0, 0x000000fc, 0x46454452, 0x00000050, 0x00000000,
0x00000000, 0x00000000, 0x0000001c, 0xffff0400, 0x00000100, 0x0000001c, 0x7263694d, 0x666f736f,
0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e39322e,
0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0xffffffff,
0x00000e01, 0x445f5653, 0x68747065, 0xababab00, 0x52444853, 0x00000024, 0x00000040, 0x00000009,
0x02000065, 0x0000c001, 0x04000036, 0x0000c001, 0x00004001, 0x3f99999a, 0x0100003e, 0x54415453,
0x00000074, 0x00000002, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000,
0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
}

Definition at line 841 of file reflection.c.

◆ test_reflection_desc_ps_output_blob_5

const DWORD test_reflection_desc_ps_output_blob_5[]
static
Initial value:
= {
0x43425844, 0x40ae32a7, 0xe944bb1c, 0x1a2b1923, 0xea25962d, 0x00000001, 0x000001bc, 0x00000005,
0x00000034, 0x000000ac, 0x000000bc, 0x000000f0, 0x00000120, 0x46454452, 0x00000070, 0x00000000,
0x00000000, 0x00000000, 0x0000003c, 0xffff0500, 0x00000100, 0x0000003c, 0x31314452, 0x0000003c,
0x00000018, 0x00000020, 0x00000028, 0x00000024, 0x0000000c, 0x00000000, 0x7263694d, 0x666f736f,
0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x39207265, 0x2e39322e,
0x2e323539, 0x31313133, 0xababab00, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001, 0xffffffff,
0x00000e01, 0x435f5653, 0x5245564f, 0x00454741, 0x58454853, 0x00000028, 0x00000050, 0x0000000a,
0x0100086a, 0x02000065, 0x0000f000, 0x04000036, 0x0000f001, 0x00004001, 0xffffffff, 0x0100003e,
0x54415453, 0x00000094, 0x00000002, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
}

Definition at line 866 of file reflection.c.

◆ test_reflection_desc_ps_output_result

const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_ps_output_result[]
static
Initial value:
=
{
{"SV_Target", 3, 3, D3D_NAME_TARGET, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0, 0},
{"SV_DepthLessEqual", 0, 0xffffffff, D3D_NAME_DEPTH_LESS_EQUAL, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0xe, 0},
{"SV_DepthGreaterEqual", 0, 0xffffffff, D3D11_NAME_DEPTH_GREATER_EQUAL, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0xe, 0},
{"sV_DePtH", 0, 0xffffffff, D3D_NAME_DEPTH, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0xe, 0},
{"SV_Depth", 0, 0xffffffff, D3D_NAME_DEPTH, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0xe, 0},
{"SV_COVERAGE", 0, 0xffffffff, D3D_NAME_COVERAGE, D3D_REGISTER_COMPONENT_UINT32, 0x1, 0xe, 0},
}
@ D3D_NAME_TARGET
Definition: d3dcommon.idl:611
@ D3D_NAME_DEPTH_LESS_EQUAL
Definition: d3dcommon.idl:615
@ D3D11_NAME_DEPTH_GREATER_EQUAL
Definition: d3dcommon.idl:636
@ D3D_NAME_DEPTH
Definition: d3dcommon.idl:612
@ D3D_NAME_COVERAGE
Definition: d3dcommon.idl:613
@ D3D_REGISTER_COMPONENT_FLOAT32
Definition: d3dcommon.idl:559
@ D3D_REGISTER_COMPONENT_UINT32
Definition: d3dcommon.idl:557

Definition at line 892 of file reflection.c.

Referenced by test_reflection_desc_ps_output().

◆ test_reflection_desc_ps_resultin

const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_ps_resultin[]
static
Initial value:
=
{
{"SV_RenderTargetArrayIndex", 0, 0, D3D_NAME_RENDER_TARGET_ARRAY_INDEX, D3D_REGISTER_COMPONENT_UINT32, 0x1, 0x0, 0},
{"SV_InstanceID", 0, 0, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_UINT32, 0x2, 0x0, 0},
{"SV_PrimitiveID", 0, 0, D3D_NAME_PRIMITIVE_ID, D3D_REGISTER_COMPONENT_UINT32, 0x4, 0x0, 0},
{"SV_IsFrontFace", 0, 0, D3D_NAME_IS_FRONT_FACE, D3D_REGISTER_COMPONENT_UINT32, 0x8, 0x0, 0},
{"TEXCOORD", 0, 1, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x3, 0x3, 0},
{"VFACE", 0, 1, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x4, 0x0, 0},
{"COLOR", 3, 2, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"SV_position", 0, 3, D3D_NAME_POSITION, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
}
@ D3D_NAME_POSITION
Definition: d3dcommon.idl:595
@ D3D_NAME_UNDEFINED
Definition: d3dcommon.idl:594
@ D3D_NAME_IS_FRONT_FACE
Definition: d3dcommon.idl:603
@ D3D_NAME_PRIMITIVE_ID
Definition: d3dcommon.idl:601
@ D3D_NAME_RENDER_TARGET_ARRAY_INDEX
Definition: d3dcommon.idl:598

Definition at line 563 of file reflection.c.

Referenced by test_reflection_desc_ps().

◆ test_reflection_desc_ps_resultout

const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_ps_resultout[]
static
Initial value:
=
{
{"SV_Target", 0, 0, D3D_NAME_TARGET, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0xe, 0},
{"SV_Target", 1, 1, D3D_NAME_TARGET, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0xe, 0},
{"SV_Coverage", 0, 0xffffffff, D3D_NAME_COVERAGE, D3D_REGISTER_COMPONENT_UINT32, 0x1, 0xe, 0},
{"SV_Depth", 0, 0xffffffff, D3D_NAME_DEPTH, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0xe, 0},
}

Definition at line 575 of file reflection.c.

Referenced by test_reflection_desc_ps().

◆ test_reflection_desc_vs_blob

DWORD test_reflection_desc_vs_blob[]
static

Definition at line 199 of file reflection.c.

Referenced by test_reflection_desc_vs().

◆ test_reflection_desc_vs_resultin

const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_vs_resultin[]
static
Initial value:
=
{
{"SV_position", 0, 0, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x1, 0},
{"BINORMAL", 0, 1, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"BLENDINDICES", 0, 2, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_UINT32, 0x1, 0x0, 0},
{"BLENDWEIGHT", 0, 3, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0x1, 0},
{"COLOR", 0, 4, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0xf, 0},
{"COLOR", 1, 5, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"NORMAL", 0, 6, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"POSITION", 0, 7, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0xf, 0},
{"POSITIONT", 0, 8, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"PSIZE", 0, 9, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0x1, 0},
{"TANGENT", 0, 10, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"TEXCOORD", 0, 11, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0xf, 0},
{"SV_VertexID", 0, 12, D3D_NAME_VERTEX_ID, D3D_REGISTER_COMPONENT_UINT32, 0x1, 0x0, 0},
{"SV_InstanceID", 0, 13, D3D_NAME_INSTANCE_ID, D3D_REGISTER_COMPONENT_UINT32, 0x1, 0x0, 0},
{"testin", 0, 14, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0x1, 0},
}
@ D3D_NAME_INSTANCE_ID
Definition: d3dcommon.idl:602
@ D3D_NAME_VERTEX_ID
Definition: d3dcommon.idl:600

Definition at line 262 of file reflection.c.

Referenced by test_reflection_desc_vs().

◆ test_reflection_desc_vs_resultout

const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_vs_resultout[]
static
Initial value:
=
{
{"SV_position", 0, 0, D3D_NAME_POSITION, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"COLOR", 0, 1, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"FOG", 0, 2, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0xe, 0},
{"PSIZE", 0, 2, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x2, 0xd, 0},
{"TESSFACTOR", 0, 2, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x4, 0xb, 0},
{"testout", 0, 2, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x8, 0x7, 0},
{"POSITION", 0, 3, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"TEXCOORD", 0, 4, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0x0, 0},
{"SV_ClipDistance", 0, 5, D3D_NAME_CLIP_DISTANCE, D3D_REGISTER_COMPONENT_FLOAT32, 0x1, 0xe, 0},
{"SV_CullDistance", 0, 5, D3D_NAME_CULL_DISTANCE, D3D_REGISTER_COMPONENT_FLOAT32, 0x2, 0xd, 0},
{"SV_InstanceID", 0, 6, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_UINT32, 0x1, 0xe, 0},
}
@ D3D_NAME_CLIP_DISTANCE
Definition: d3dcommon.idl:596
@ D3D_NAME_CULL_DISTANCE
Definition: d3dcommon.idl:597

Definition at line 281 of file reflection.c.

Referenced by test_reflection_desc_vs().

◆ type

Definition at line 1205 of file reflection.c.