Commit b8cff9e9 by Qin Jiajia Committed by Commit Bot

ES31: Add MAX_COMPUTE_SHARED_MEMORY_SIZE

Bug: angleproject:2682 Change-Id: If9100bee246dfb99fca3f0470742a337a126c9a5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1476951Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@google.com> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
parent b36f7a25
...@@ -893,6 +893,21 @@ size_t GetMaxComputeWorkGroupInvocations(D3D_FEATURE_LEVEL featureLevel) ...@@ -893,6 +893,21 @@ size_t GetMaxComputeWorkGroupInvocations(D3D_FEATURE_LEVEL featureLevel)
} }
} }
unsigned int GetMaxComputeSharedMemorySize(D3D_FEATURE_LEVEL featureLevel)
{
switch (featureLevel)
{
// In D3D11 the maximum total size of all variables with the groupshared storage class is
// 32kb.
// https://docs.microsoft.com/en-us/windows/desktop/direct3dhlsl/dx-graphics-hlsl-variable-syntax
case D3D_FEATURE_LEVEL_11_1:
case D3D_FEATURE_LEVEL_11_0:
return 32768u;
default:
return 0u;
}
}
size_t GetMaximumComputeUniformVectors(D3D_FEATURE_LEVEL featureLevel) size_t GetMaximumComputeUniformVectors(D3D_FEATURE_LEVEL featureLevel)
{ {
switch (featureLevel) switch (featureLevel)
...@@ -1491,6 +1506,7 @@ void GenerateCaps(ID3D11Device *device, ...@@ -1491,6 +1506,7 @@ void GenerateCaps(ID3D11Device *device,
caps->maxComputeWorkGroupSize = GetMaxComputeWorkGroupSize(featureLevel); caps->maxComputeWorkGroupSize = GetMaxComputeWorkGroupSize(featureLevel);
caps->maxComputeWorkGroupInvocations = caps->maxComputeWorkGroupInvocations =
static_cast<GLuint>(GetMaxComputeWorkGroupInvocations(featureLevel)); static_cast<GLuint>(GetMaxComputeWorkGroupInvocations(featureLevel));
caps->maxComputeSharedMemorySize = GetMaxComputeSharedMemorySize(featureLevel);
caps->maxShaderUniformComponents[gl::ShaderType::Compute] = caps->maxShaderUniformComponents[gl::ShaderType::Compute] =
static_cast<GLuint>(GetMaximumComputeUniformVectors(featureLevel)) * 4; static_cast<GLuint>(GetMaximumComputeUniformVectors(featureLevel)) * 4;
caps->maxShaderUniformBlocks[gl::ShaderType::Compute] = caps->maxShaderUniformBlocks[gl::ShaderType::Compute] =
......
...@@ -70,7 +70,6 @@ ...@@ -70,7 +70,6 @@
3032 D3D11 : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.13 = FAIL 3032 D3D11 : dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.13 = FAIL
3032 D3D11 : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer* = FAIL 3032 D3D11 : dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer* = FAIL
1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_compute_shared_memory_size_* = FAIL
1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_compute_atomic_counters_* = FAIL 1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_compute_atomic_counters_* = FAIL
1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_atomic_counter_buffer_size_* = FAIL 1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_atomic_counter_buffer_size_* = FAIL
1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_combined_atomic_counters* = FAIL 1442 D3D11 : dEQP-GLES31.functional.state_query.integer.max_combined_atomic_counters* = FAIL
......
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