On Tue, Apr 19, 2016 at 6:56 PM, Matteo Bruni mbruni@codeweavers.com wrote:
Signed-off-by: Matteo Bruni mbruni@codeweavers.com
dlls/d3d11/tests/d3d11.c | 232 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 713c9cf..0fafaaf 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -6569,6 +6569,237 @@ static void test_getdc(void) ok(!refcount, "Device has %u references left.\n", refcount); }
+static void test_geometry_shader(void) +{
- static const struct
- {
struct vec4 position;
unsigned int color;
- }
- vertex[] =
- {
{{0.0f, 0.0f, 1.0f, 1.0f}, 0xffffff00},
- };
- static const D3D11_INPUT_ELEMENT_DESC layout_desc[] =
- {
{"SV_POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0},
{"COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 16, D3D10_INPUT_PER_VERTEX_DATA, 0},
It would be better to use D3D11 constants.
- static const D3D_FEATURE_LEVEL feature_level = D3D_FEATURE_LEVEL_10_0;
Why should we limit this test to feature level 10_0?
- buffer_desc.ByteWidth = sizeof(vertex);
- buffer_desc.Usage = D3D11_USAGE_DEFAULT;
- buffer_desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
- buffer_desc.CPUAccessFlags = 0;
- buffer_desc.MiscFlags = 0;
The "StructureByteStride" field is uninitialized. I suppose it doesn't matter in practice because this field is used only for structured buffers.