[dawn-test] On D3D12, limit the texels in a buffer to 1<<27
On D3D12, there is a limit of the number of texels in a buffer which is 1<<27. See D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP and the spec. This patch limits it according to the spec in case of D3D12 in MaxLimitTests.cpp. This fixes MaxLimitTests failure on Arm device. Bug: dawn:884 Change-Id: Ia14ebca92855ec7b7e8d81b7bd547108948da567 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133961 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Min Lee <lemi@microsoft.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
506b4f05d0
commit
e9ee094d28
|
@ -184,8 +184,9 @@ MaybeError PhysicalDevice::InitializeSupportedLimitsImpl(CombinedLimits* limits)
|
||||||
|
|
||||||
// Max number of "constants" where each constant is a 16-byte float4
|
// Max number of "constants" where each constant is a 16-byte float4
|
||||||
limits->v1.maxUniformBufferBindingSize = D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * 16;
|
limits->v1.maxUniformBufferBindingSize = D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * 16;
|
||||||
// D3D11 has no documented limit on the size of a storage buffer binding.
|
// D3D11 limit of number of texels in a buffer == (1 << 27)
|
||||||
limits->v1.maxStorageBufferBindingSize = kAssumedMaxBufferSize;
|
limits->v1.maxStorageBufferBindingSize = uint64_t(1)
|
||||||
|
<< D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP;
|
||||||
// D3D11 has no documented limit on the buffer size.
|
// D3D11 has no documented limit on the buffer size.
|
||||||
limits->v1.maxBufferSize = kAssumedMaxBufferSize;
|
limits->v1.maxBufferSize = kAssumedMaxBufferSize;
|
||||||
|
|
||||||
|
|
|
@ -307,8 +307,9 @@ MaybeError PhysicalDevice::InitializeSupportedLimitsImpl(CombinedLimits* limits)
|
||||||
|
|
||||||
// Max number of "constants" where each constant is a 16-byte float4
|
// Max number of "constants" where each constant is a 16-byte float4
|
||||||
limits->v1.maxUniformBufferBindingSize = D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * 16;
|
limits->v1.maxUniformBufferBindingSize = D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * 16;
|
||||||
// D3D12 has no documented limit on the size of a storage buffer binding.
|
// D3D12 limit of number of texels in a buffer == (1 << 27)
|
||||||
limits->v1.maxStorageBufferBindingSize = kAssumedMaxBufferSize;
|
limits->v1.maxStorageBufferBindingSize = uint64_t(1)
|
||||||
|
<< D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP;
|
||||||
// D3D12 has no documented limit on the buffer size.
|
// D3D12 has no documented limit on the buffer size.
|
||||||
limits->v1.maxBufferSize = kAssumedMaxBufferSize;
|
limits->v1.maxBufferSize = kAssumedMaxBufferSize;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue