Hash :
2e7cfa9b
Author :
Date :
2022-02-22T13:10:12
Metal: Fix WebGL CTS fbomultisample tests failing in Metal These tests were failing in Metal: deqp/functional/gles3/fbomultisample.2_samples.html deqp/functional/gles3/fbomultisample.4_samples.html deqp/functional/gles3/fbomultisample.8_samples.html This CL only fixed the tests failing on AMD. Intel still fails. See: https://anglebug.com/7079 Bug: angleproject:7049 Change-Id: I745672bba2e9b8b1d34c7a81e07410889eddd35f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3482157 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// FeaturesMtl.h: Optional features for the Metal renderer.
//
#ifndef ANGLE_PLATFORM_FEATURESMTL_H_
#define ANGLE_PLATFORM_FEATURESMTL_H_
#include "platform/Feature.h"
namespace angle
{
struct FeaturesMtl : FeatureSetBase
{
// BaseVertex/Instanced draw support:
Feature hasBaseVertexInstancedDraw = {
"has_base_vertex_instanced_draw", FeatureCategory::MetalFeatures,
"The renderer supports base vertex instanced draw", &members};
// Support explicit memory barrier
Feature hasExplicitMemBarrier = {"has_explicit_mem_barrier_mtl", FeatureCategory::MetalFeatures,
"The renderer supports explicit memory barrier", &members};
// Some renderer can break render pass cheaply, i.e. desktop class GPUs.
Feature hasCheapRenderPass = {"has_cheap_render_pass_mtl", FeatureCategory::MetalFeatures,
"The renderer can cheaply break a render pass.", &members};
// Non-uniform compute shader dispatch support, i.e. Group size is not necessarily to be fixed:
Feature hasNonUniformDispatch = {
"has_non_uniform_dispatch", FeatureCategory::MetalFeatures,
"The renderer supports non uniform compute shader dispatch's group size", &members};
// fragment stencil output support
Feature hasStencilOutput = {"has_shader_stencil_output", FeatureCategory::MetalFeatures,
"The renderer supports stencil output from fragment shader",
&members};
// Texture swizzle support:
Feature hasTextureSwizzle = {"has_texture_swizzle", FeatureCategory::MetalFeatures,
"The renderer supports texture swizzle", &members};
Feature hasDepthAutoResolve = {
"has_msaa_depth_auto_resolve", FeatureCategory::MetalFeatures,
"The renderer supports MSAA depth auto resolve at the end of render pass", &members};
Feature hasStencilAutoResolve = {
"has_msaa_stencil_auto_resolve", FeatureCategory::MetalFeatures,
"The renderer supports MSAA stencil auto resolve at the end of render pass", &members};
Feature hasEvents = {"has_mtl_events", FeatureCategory::MetalFeatures,
"The renderer supports MTL(Shared)Event", &members};
Feature allowInlineConstVertexData = {
"allow_inline_const_vertex_data", FeatureCategory::MetalFeatures,
"The renderer supports using inline constant data for small client vertex data", &members};
// On macos, separate depth & stencil buffers are not supproted. However, on iOS devices,
// they are supproted:
Feature allowSeparatedDepthStencilBuffers = {
"allow_separate_depth_stencil_buffers", FeatureCategory::MetalFeatures,
"Some Apple platforms such as iOS allows separate depth & stencil buffers, "
"whereas others such as macOS don't",
&members};
Feature allowRuntimeSamplerCompareMode = {
"allow_runtime_sampler_compare_mode", FeatureCategory::MetalFeatures,
"The renderer supports changing sampler's compare mode outside shaders", &members};
Feature allowSamplerCompareGradient = {
"allow_sampler_compare_gradient", FeatureCategory::MetalFeatures,
"The renderer supports sample_compare with gradients", &members};
Feature allowSamplerCompareLod = {"allow_sampler_compare_lod", FeatureCategory::MetalFeatures,
"The renderer supports sample_compare with lod", &members};
Feature allowBufferReadWrite = {"allow_buffer_read_write", FeatureCategory::MetalFeatures,
"The renderer supports buffer read & write in the same shader",
&members};
Feature allowMultisampleStoreAndResolve = {
"allow_msaa_store_and_resolve", FeatureCategory::MetalFeatures,
"The renderer supports MSAA store and resolve in the same pass", &members};
Feature allowGenMultipleMipsPerPass = {
"gen_multiple_mips_per_pass", FeatureCategory::MetalFeatures,
"The renderer supports generating multiple mipmaps per pass", &members};
Feature forceD24S8AsUnsupported = {"force_d24s8_as_unsupported", FeatureCategory::MetalFeatures,
"Force Depth24Stencil8 format as unsupported.", &members};
Feature forceBufferGPUStorage = {
"force_buffer_gpu_storage", FeatureCategory::MetalFeatures,
"On systems that support both buffer' memory allocation on GPU and shared memory (such as "
"macOS), force using GPU memory allocation for buffers everytime or not.",
&members};
// Generate Metal directly instead of generating SPIR-V and then using SPIR-V Cross. Transitory
// feature until the work is complete.
Feature directMetalGeneration = {"directMetalGeneration", FeatureCategory::MetalFeatures,
"Direct translation to Metal.", &members,
"http://anglebug.com/5505"};
Feature forceNonCSBaseMipmapGeneration = {
"force_non_cs_mipmap_gen", FeatureCategory::MetalFeatures,
"Turn this feature on to disallow Compute Shader based mipmap generation. Compute Shader "
"based mipmap generation might cause GPU hang on some older iOS devices.",
&members};
Feature emulateTransformFeedback = {
"emulate_transform_feedback", FeatureCategory::MetalFeatures,
"Turn this on to allow transform feedback in Metal using a 2-pass VS for GLES3.", &members};
// Rewrite row-major matrices as column-major
Feature rewriteRowMajorMatrices = {"rewrite_row_major_matrices", FeatureCategory::MetalFeatures,
"Rewrite row major matrices in shaders as column major.",
&members};
Feature intelExplicitBoolCastWorkaround = {
"intel_explicit_bool_cast_workaround", FeatureCategory::MetalWorkarounds,
"Insert explicit casts for float/double/unsigned/signed int on macOS 10.15 with Intel "
"driver",
&members};
Feature intelDisableFastMath = {
"intel_disable_fast_math", FeatureCategory::MetalWorkarounds,
"Disable fast math in atan and invariance cases when running below macOS 12.0", &members};
Feature multisampleColorFormatShaderReadWorkaround = {
"multisample_color_format_shader_read_workaround", FeatureCategory::MetalWorkarounds,
"Add shaderRead usage to some multisampled texture formats", &members,
"http://anglebug.com/7049"};
};
} // namespace angle
#endif // ANGLE_PLATFORM_FEATURESMTL_H_