new feature level API for backends (#5784)

* new feature level API for backends

backend can now return a "feature level", each level corresponds to a
"bundle" of features.
Level1: ES3.0 capabilities
Level2: ES3.1 capabilities + 31 textures + cubemap arrays

Currently metal always returns level 1, GL and Vulkan return level 2
if 31 textures or more are supported.

* Add public APIs for feature levels

* Add infrastructure to check feature levels in materials

* validate material feature level on use

The validation is done when creating a renderable. If the engine doesn't
support the material's feature level, an exception is thrown (or assert
if exceptions are not enabled).

* material documentation

* activate ESSL 3.10 for feature level 2

also generate #defines to identify available feature levels

* support for cubemap arrays in the public API


if feature level 2 is supported, cubemap arrays can be used from the
public API.

* add release notes
This commit is contained in:
Mathias Agopian
2022-08-17 10:14:26 -07:00
committed by GitHub
parent 7c092a8714
commit b2ec57776d
40 changed files with 513 additions and 114 deletions

View File

@@ -86,6 +86,7 @@ static void printStringChunk(ostream& json, const ChunkContainer& container,
static bool printMaterial(ostream& json, const ChunkContainer& container) {
printStringChunk(json, container, MaterialName, "name");
printUint32Chunk(json, container, MaterialVersion, "version");
printUint32Chunk(json, container, MaterialFeatureLevel, "feature_level");
json << "\"shading\": {\n";
printChunk<Shading, uint8_t>(json, container, MaterialShading, "model");
printChunk<MaterialDomain, uint8_t>(json, container, ChunkType::MaterialDomain, "material_domain");