d3d11/tests: Add tests for accessing unbound 2d array textures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
79aff3067a
commit
e87d51fe5d
|
@ -4339,6 +4339,8 @@ static void test_texture(void)
|
|||
{&ps_sample_2d_array, &array_2d_texture, POINT, 0.0f, 0.0f, MIP_MAX, 3.0f, blue_colors},
|
||||
{&ps_sample_2d_array, &array_2d_texture, POINT, 0.0f, 0.0f, MIP_MAX, 3.1f, blue_colors},
|
||||
{&ps_sample_2d_array, &array_2d_texture, POINT, 0.0f, 0.0f, MIP_MAX, 9.0f, blue_colors},
|
||||
{&ps_sample_2d_array, NULL, POINT, 0.0f, 0.0f, 0.0f, 0.0f, zero_colors},
|
||||
{&ps_sample_2d_array, NULL, POINT, 0.0f, 0.0f, MIP_MAX, 0.0f, zero_colors},
|
||||
#undef POINT
|
||||
#undef POINT_LINEAR
|
||||
#undef MIP_MAX
|
||||
|
@ -4415,6 +4417,8 @@ static void test_texture(void)
|
|||
|
||||
current_texture = test->texture;
|
||||
|
||||
if (current_texture)
|
||||
{
|
||||
texture_desc.Width = current_texture->width;
|
||||
texture_desc.Height = current_texture->height;
|
||||
texture_desc.MipLevels = current_texture->miplevel_count;
|
||||
|
@ -4426,6 +4430,12 @@ static void test_texture(void)
|
|||
|
||||
hr = ID3D11Device_CreateShaderResourceView(device, (ID3D11Resource *)texture, NULL, &srv);
|
||||
ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr);
|
||||
}
|
||||
else
|
||||
{
|
||||
texture = NULL;
|
||||
srv = NULL;
|
||||
}
|
||||
|
||||
ID3D11DeviceContext_PSSetShaderResources(context, 0, 1, &srv);
|
||||
}
|
||||
|
@ -4468,8 +4478,10 @@ static void test_texture(void)
|
|||
}
|
||||
release_texture_readback(&rb);
|
||||
}
|
||||
if (srv)
|
||||
ID3D11ShaderResourceView_Release(srv);
|
||||
ID3D11SamplerState_Release(sampler);
|
||||
if (texture)
|
||||
ID3D11Texture2D_Release(texture);
|
||||
ID3D11PixelShader_Release(ps);
|
||||
|
||||
|
|
Loading…
Reference in New Issue