Commit fdd64782 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3d11/tests: Use more aligned offsets in test_clear_buffer_unordered_access_view().

Creating a view with an unaligned offset is legal in d3d and apparently works, both on Windows and Linux, but may violate the Vulkan specification: VUID-VkBufferViewCreateInfo-offset-00926(ERROR / SPEC): msgNum: -833749292 - Validation Error: [ VUID-VkBufferViewCreateInfo-offset-00926 ] Object 0: handle = 0x3c000000003c, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xce4dfed4 | vkCreateBufferView(): VkBufferViewCreateInfo offset (36) must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment (16). The Vulkan spec states: offset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment (https://www.khronos.org/registry/vulkan/specs/1.2-khr-extensions/html/vkspec.html#VUID-VkBufferViewCreateInfo-offset-00926) Without any reason to test unaligned buffer views here, just resolve this by changing the test.
parent 1e21e828
......@@ -16638,8 +16638,8 @@ static void test_clear_buffer_unordered_access_view(void)
U(uav_desc).Buffer.Flags = 0;
hr = ID3D11Device_CreateUnorderedAccessView(device, (ID3D11Resource *)buffer, &uav_desc, &uav);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
U(uav_desc).Buffer.FirstElement = 9;
U(uav_desc).Buffer.NumElements = 7;
U(uav_desc).Buffer.FirstElement = 8;
U(uav_desc).Buffer.NumElements = 8;
hr = ID3D11Device_CreateUnorderedAccessView(device, (ID3D11Resource *)buffer, &uav_desc, &uav2);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment