ronantakizawa/codereview-bench huggingface dataset:
Repository: google/filament
File: tools/cmgen/src/ProgressUpdater.cpp (C++)

Code before:
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "ProgressUpdater.h"

#include <algorithm>
#include <string>

#include <signal.h>

static void moveCursorUp(size_t n) {
    std::cout << "\033[" << n << "F";
}

static void showCursor() {
    struct sigaction sa;
    sa.sa_handler = SIG_DFL;
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = 0;
    sigaction(SIGINT, &sa, nullptr);
    
    const char* show_cursor_seq = "\033[?25h";
    write(STDOUT_FILENO, show_cursor_seq, 6);
}


static void showCursorFromSignal(int) {
    // Только async-signal-safe операции
    const char* show_cursor_seq = "\033[?25h";
    write(STDOUT_FILENO, show_cursor_seq, 6);
    
    struct sigaction sa;
    sa.sa_handler = SIG_DFL;
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = 0;
    sigaction(SIGINT, &sa, nullptr);
    
    raise(SIGINT);
}

static void hideCursor() {
    struct sigaction sa;
    sa.sa_handler = showCursorFromSignal;
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = 0;

Review comment (suggestion):
it seems like you could factorize all this code into a `signal_safe()` function. instead of repeating 3 times.

Code after:
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "ProgressUpdater.h"

#include <algorithm>
#include <string>

#include <signal.h>
#ifdef _WIN32
    #include <io.h>
    #include <fcntl.h>
    #include <signal.h>
    #define STDOUT_FILENO _fileno(stdout)
    #define write _write

    static void setSigintHandler(void (*handler)(int)) {
        signal(SIGINT, handler);
    }
#else
    #include <unistd.h>
    #include <signal.h>

    static void setSigintHandler(void (*handler)(int)) {
        struct sigaction sa;
        sa.sa_handler = handler;
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = 0;
        sigaction(SIGINT, &sa, nullptr);
    }
#endif

static void moveCursorUp(size_t n) {
    std::cout << "\033[" << n << "F";
}

static void write_safe(const char* seq, size_t len) {
    write(STDOUT_FILENO, seq, len);
}

static void showCursor() {
    setSigintHandler(SIG_DFL);
    const char* show_cursor_seq = "\033[?25h";
    write_safe(show_cursor_seq, 6);
}
Repository: google/filament
File: tools/cmgen/src/ProgressUpdater.cpp (C++)

Code before:
static void signal_safe(const char* seq, size_t len) {
    write(STDOUT_FILENO, seq, len);
}

static void setSigintHandler(void (*handler)(int)) {
    struct sigaction sa;
    sa.sa_handler = handler;
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = 0;
    sigaction(SIGINT, &sa, nullptr);
}

static void moveCursorUp(size_t n) {
    std::cout << "\033[" << n << "F";
}

static void showCursor() {
    const char* show_cursor_seq = "\033[?25h";
    signal_safe(show_cursor_seq, 6);
}

static void showCursorFromSignal(int) {
    const char* show_cursor_seq = "\033[?25h";
    signal_safe(show_cursor_seq, 6);

    setSigintHandler(SIG_DFL);
    raise(SIGINT);
}

static void hideCursor() {
    const char* hide_cursor_seq = "\033[?25l";
    signal_safe(hide_cursor_seq, 6);

    setSigintHandler(showCursorFromSignal);
}

static inline void printProgress(float v, size_t width) {
    size_t c = (size_t) (v * width);

    std::cout << std::setw(3) << (int) (v * 100) << "% ";
    for (size_t i = 0; i < c; i++) std::cout << "\u2588";
    std::cout << std::string(width - c, ' ');
    std::cout << "\u25C0" << std::flush;
}

void ProgressUpdater::printUpdates() {
    std::vector<Update> updates;

    std::unique_lock<std::mutex> lock(mMutex);
    std::swap(updates, mUpdates);
    lock.unlock();

Review comment (refactor):
I think you can keep the original code here to remove the duplicate code. Also the handler should be reset to `SIG_DFL` inside `showCursor` anyway.

Code after:
    #include <io.h>
    #include <fcntl.h>
    #include <signal.h>
    #define STDOUT_FILENO _fileno(stdout)
    #define write _write

    static void setSigintHandler(void (*handler)(int)) {
        signal(SIGINT, handler);
    }
#else
    #include <unistd.h>
    #include <signal.h>

    static void setSigintHandler(void (*handler)(int)) {
        struct sigaction sa;
        sa.sa_handler = handler;
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = 0;
        sigaction(SIGINT, &sa, nullptr);
    }
#endif

static void moveCursorUp(size_t n) {
    std::cout << "\033[" << n << "F";
}

static void write_safe(const char* seq, size_t len) {
    write(STDOUT_FILENO, seq, len);
}

static void showCursor() {
    setSigintHandler(SIG_DFL);
    const char* show_cursor_seq = "\033[?25h";
    write_safe(show_cursor_seq, 6);
}

static void showCursorFromSignal(int) {
    showCursor();
    raise(SIGINT);
}

static void hideCursor() {
    setSigintHandler(showCursorFromSignal);
    const char* hide_cursor_seq = "\033[?25l";
    write_safe(hide_cursor_seq, 6);
}

static inline void printProgress(float v, size_t width) {
    size_t c = (size_t) (v * width);

    std::cout << std::setw(3) << (int) (v * 100) << "% ";
Repository: google/filament
File: filament/test/filament_test_material.cpp (C++)

Code before:
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <gtest/gtest.h>

#include <filament/Engine.h>
#include <filament/Material.h>

#include "filament_test_resources.h"

using namespace filament;

TEST(MaterialTransformName, QuerySamplerWithTransform) {
    Engine* engine = Engine::create(Engine::Backend::DEFAULT);

Review comment (suggestion):
### 
```suggestion
 * Copyright (C) 2025 The Android Open Source Project
```

Code after:
/*
 * Copyright (C) 2025 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <gtest/gtest.h>

#include <filament/Engine.h>
#include <filament/Material.h>

#include "filament_test_resources.h"

using namespace filament;

TEST(MaterialTransformName, QuerySamplerWithTransform) {
    Engine* engine = Engine::create(Engine::Backend::DEFAULT);
Repository: google/filament
File: filament/backend/src/webgpu/WebGPUBufferBase.h (C/C++)

Code before:

#include "WebGPUQueueManager.h"

#include <webgpu/webgpu_cpp.h>

#include <cstdint>

namespace filament::backend {

class BufferDescriptor;

/**
  * A base class for WebGPU buffer objects, providing common functionality for creating and
  * updating GPU buffers.
  */
class WebGPUBufferBase /* intended to be extended */ {
public:
    /**
     * IMPORTANT NOTE: when reusing a buffers with command encoders in the caller logic,
     * e.g. the WebGPU driver/backend, make sure to flush (submit) pending commands (draws, etc.) to
     * the GPU prior to calling this blit, because texture updates may otherwise (unintentionally)
     * happen after draw commands encoded in the encoder. Submitting any commands up to this point
     * ensures the calls happen in the expected sequence.
     */
    void updateGPUBuffer(BufferDescriptor const&, uint32_t byteOffset, wgpu::Device const& device,
            WebGPUQueueManager& webGPUQueueManager);

    [[nodiscard]] wgpu::Buffer const& getBuffer() const { return mBuffer; }

protected:
    WebGPUBufferBase(wgpu::Device const&, wgpu::BufferUsage, uint32_t size, char const* label);

private:
    const wgpu::Buffer mBuffer;
};

} // namespace filament::backend

#endif // TNT_FILAMENT_BACKEND_WEBGPUBUFFERBASE_H


Review comment (suggestion):
You could pass by pointer `WebGPUQueueManager*` and forward declare the class.  That way your dependency on `WebGPUQueueManager.h` can be in cpp-only

Code after:

#include <webgpu/webgpu_cpp.h>

#include <cstdint>

namespace filament::backend {

class BufferDescriptor;
class WebGPUQueueManager;

/**
  * A base class for WebGPU buffer objects, providing common functionality for creating and
  * updating GPU buffers.
  */
class WebGPUBufferBase /* intended to be extended */ {
public:
    /**
     * IMPORTANT NOTE: when reusing a buffers with command encoders in the caller logic,
     * e.g. the WebGPU driver/backend, make sure to flush (submit) pending commands (draws, etc.) to
     * the GPU prior to calling this blit, because texture updates may otherwise (unintentionally)
     * happen after draw commands encoded in the encoder. Submitting any commands up to this point
     * ensures the calls happen in the expected sequence.
     */
    void updateGPUBuffer(BufferDescriptor const&, uint32_t byteOffset, wgpu::Device const& device,
            WebGPUQueueManager* const webGPUQueueManager);

    [[nodiscard]] wgpu::Buffer const& getBuffer() const { return mBuffer; }

protected:
    WebGPUBufferBase(wgpu::Device const&, wgpu::BufferUsage, uint32_t size, char const* label);

private:
    const wgpu::Buffer mBuffer;
};

} // namespace filament::backend

#endif // TNT_FILAMENT_BACKEND_WEBGPUBUFFERBASE_H
Repository: google/filament
File: libs/gltfio/include/gltfio/TextureProvider.h (C/C++)

Code before:
    virtual size_t getPoppedCount() const = 0;

    /** Total number of textures that have become ready-to-pop since the provider was created. */
    virtual size_t getDecodedCount() const = 0;

    virtual ~TextureProvider() = default;
};

/**
 * Creates a simple decoder based on stb_image that can handle "image/png" and "image/jpeg".
 * This works only if your build configuration includes STB.
 */
TextureProvider* createStbProvider(filament::Engine* engine);

/**
 * Creates a decoder that can handle certain types of "image/ktx2" content as specified in
 * the KHR_texture_basisu specification.
 */
TextureProvider* createKtx2Provider(filament::Engine* engine);

/**
 * If webp support is enabled at build time, creates a decoder that can handle "image/webp"
 * lossless and lossy content.
 * If webp support is not enabled at build time, returns nullptr.
 */
TextureProvider* createOptionalWebpProvider(filament::Engine* engine);

} // namespace filament::gltfio

template<> struct utils::EnableBitMaskOperators<filament::gltfio::TextureProvider::TextureFlags>
        : public std::true_type {};

#endif // GLTFIO_TEXTUREPROVIDER_H


Review comment (suggestion):
Curious what others think, but I'm not sure we need "Optional" in the name here: maybe simply `createWebpProvider`. Alternatively, I'm also in favor of making this function alwasy return a valid `TextureProvider*` but guarding it with `FILAMENT_SUPPORTS_WEBP_TEXTURES`.

Code after:
    virtual size_t getPoppedCount() const = 0;

    /** Total number of textures that have become ready-to-pop since the provider was created. */
    virtual size_t getDecodedCount() const = 0;

    virtual ~TextureProvider() = default;
};

/**
 * Creates a simple decoder based on stb_image that can handle "image/png" and "image/jpeg".
 * This works only if your build configuration includes STB.
 */
TextureProvider* createStbProvider(filament::Engine* engine);

/**
 * Creates a decoder that can handle certain types of "image/ktx2" content as specified in
 * the KHR_texture_basisu specification.
 */
TextureProvider* createKtx2Provider(filament::Engine* engine);

/**
 * If webp support is enabled at build time, creates a decoder that can handle "image/webp"
 * lossless and lossy content.
 * If webp support is not enabled at build time, returns nullptr.
 */
TextureProvider* createWebpProvider(filament::Engine* engine);

/**
 * Indicates if build-time webp support was included.
 * Returns true if it was and false if not.
 */
bool isWebpSupported();

} // namespace filament::gltfio

template<> struct utils::EnableBitMaskOperators<filament::gltfio::TextureProvider::TextureFlags>
        : public std::true_type {};

#endif // GLTFIO_TEXTUREPROVIDER_H
Repository: google/filament
File: filament/backend/src/metal/MetalErrorQueue.h (C/C++)

Code before:
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef TNT_FILAMENT_DRIVER_METALERRORQUEUE_H
#define TNT_FILAMENT_DRIVER_METALERRORQUEUE_H

#import <Foundation/Foundation.h>

#include <utils/compiler.h>

#include <atomic>
#include <functional>
#include <mutex>
#include <vector>

class MetalErrorQueue {
public:
    void push(NSError* error) {
        std::lock_guard<std::mutex> lock(mMutex);
        mErrors.push_back(error);
        mHasErrors.store(true);
    }

    void flush(const std::function<void(NSError*)>& callback) {
        if (UTILS_LIKELY(!mHasErrors.load())) {
            return;
        }

        std::vector<NSError*> errors;
        {
            std::lock_guard<std::mutex> lock(mMutex);
            std::swap(mErrors, errors);
            mHasErrors.store(false);
        }

        for (const auto& error: errors) {
            callback(error);
        }
    }

private:
    std::vector<NSError*> mErrors;
    std::mutex mMutex;

    // Optimization to avoid locking the mutex at each call to flush.
    std::atomic<bool> mHasErrors;

Review comment (suggestion):
`std::memory_order_relaxed` because you're actually not "publishing" the result -- you are, but the publishing part is done with the lock.

Code after:
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef TNT_FILAMENT_DRIVER_METALERRORQUEUE_H
#define TNT_FILAMENT_DRIVER_METALERRORQUEUE_H

#import <Foundation/Foundation.h>

#include <utils/compiler.h>

#include <atomic>
#include <functional>
#include <mutex>
#include <vector>

class MetalErrorQueue {
public:
    bool isEmpty() const {
        return !mHasErrors.load(std::memory_order_relaxed);
    }

    void push(NSError* error) {
        std::lock_guard<std::mutex> lock(mMutex);
        mErrors.push_back(error);
        mHasErrors.store(true, std::memory_order_relaxed);
    }

    void flush(const std::function<void(NSError*)>& callback) {
        if (UTILS_LIKELY(isEmpty())) {
            return;
        }
        std::vector<NSError*> errors;
        {
            std::lock_guard<std::mutex> lock(mMutex);
            std::swap(mErrors, errors);
            mHasErrors.store(false, std::memory_order_relaxed);
        }

        for (const auto& error: errors) {
            callback(error);
        }
    }

private:
    std::vector<NSError*> mErrors;
    std::mutex mMutex;
Repository: google/filament
File: filament/backend/src/Platform.cpp (C++)

Code before:
}

size_t Platform::retrieveBlob(void const* key, size_t keySize, void* value, size_t valueSize) {
    if (mRetrieveBlob) {
        return mRetrieveBlob(key, keySize, value, valueSize);
    }
    return 0;
}

void Platform::setDebugUpdateStatFunc(DebugUpdateStatFunc&& debugUpdateStat) noexcept {
    mDebugUpdateStat = std::move(debugUpdateStat);
}

bool Platform::hasDebugUpdateStatFunc() const noexcept {
    return bool(mDebugUpdateStat);
}

void Platform::debugUpdateStat(const char* key, uint64_t intValue) {
    if (mDebugUpdateStat) {
        mDebugUpdateStat(key, intValue, "");
    }
}

void Platform::debugUpdateStat(const char* key, utils::CString stringValue) {
    if (mDebugUpdateStat) {
        mDebugUpdateStat(key, 0, stringValue);
    }
}

} // namespace filament::backend


Review comment (bug):
isn't there a race here with `setDebugUpdateStatFunc`?

Code after:
    std::shared_ptr<InsertBlobFunc> callback;
    {
        std::unique_lock<decltype(mMutex)> lock(mMutex);
        callback = mInsertBlob;
    }
    if (callback) {
        (*callback)(key, keySize, value, valueSize);
    }
}

size_t Platform::retrieveBlob(void const* key, size_t keySize, void* value, size_t valueSize) {
    std::shared_ptr<RetrieveBlobFunc> callback;
    {
        std::unique_lock<decltype(mMutex)> lock(mMutex);
        callback = mRetrieveBlob;
    }
    if (callback) {
        return (*callback)(key, keySize, value, valueSize);
    }
    return 0;
}

void Platform::setDebugUpdateStatFunc(DebugUpdateStatFunc&& debugUpdateStat) noexcept {
    std::lock_guard<decltype(mMutex)> lock(mMutex);
    mDebugUpdateStat = std::make_shared<DebugUpdateStatFunc>(std::move(debugUpdateStat));
}

bool Platform::hasDebugUpdateStatFunc() const noexcept {
    std::lock_guard<decltype(mMutex)> lock(mMutex);
    return mDebugUpdateStat != nullptr;
}

void Platform::debugUpdateStat(const char* key, uint64_t intValue) {
    std::shared_ptr<DebugUpdateStatFunc> callback;
    {
        std::unique_lock<decltype(mMutex)> lock(mMutex);
        callback = mDebugUpdateStat;
    }
    if (callback) {
        (*callback)(key, intValue, "");
    }
}

void Platform::debugUpdateStat(const char* key, utils::CString stringValue) {
    std::shared_ptr<DebugUpdateStatFunc> callback;
    {
        std::unique_lock<decltype(mMutex)> lock(mMutex);
        callback = mDebugUpdateStat;
    }
    if (callback) {
        (*callback)(key, 0, stringValue);
Repository: google/filament
File: libs/filamat/src/eiff/CompressedStringChunk.cpp (C++)

Code before:
/*
* Copyright (C) 2025 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "CompressedStringChunk.h"

namespace filamat {

void CompressedStringChunk::flatten(filamat::Flattener& f) {
    if (mCompression == Compression::NONE) {
        // use zstd to compress??
    } else {
        f.writeString(mString);
    }
}

} // namespace filamat

Review comment (suggestion):
```suggestion
    if (mCompression != Compression::NONE) {
```

Code after:
/*
* Copyright (C) 2025 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "CompressedStringChunk.h"

#include <zstd.h>

namespace filamat {

namespace {
int toZstdCompressionLevel(CompressedStringChunk::CompressionLevel compressionLevel) {
    switch (compressionLevel) {
        case CompressedStringChunk::CompressionLevel::MIN:
            return ZSTD_minCLevel();
        case CompressedStringChunk::CompressionLevel::MAX:
            return ZSTD_maxCLevel();
        case CompressedStringChunk::CompressionLevel::DEFAULT:
            return ZSTD_defaultCLevel();
    }
}
} // namespace

void CompressedStringChunk::flatten(filamat::Flattener& f) {
    const size_t bufferBound = ZSTD_compressBound(mString.size());
    std::vector<std::uint8_t> compressed(bufferBound);

    const size_t compressedSize = ZSTD_compress(
            compressed.data(), compressed.size(),
            mString.data(), mString.size(),
            toZstdCompressionLevel(mCompressionLevel));

    if (ZSTD_isError(compressedSize)) {
        utils::slog.e << "Error compressing the input string." << utils::io::endl;
        return;
Repository: google/filament
File: libs/filabridge/include/filament/MaterialChunkType.h (C/C++)

Code before:
    MaterialRequiredAttributes = charTo64bitNum("MAT_REQA"),
    MaterialDoubleSidedSet = charTo64bitNum("MAT_DOSS"),
    MaterialDoubleSided = charTo64bitNum("MAT_DOSI"),

    MaterialColorWrite = charTo64bitNum("MAT_CWRIT"),
    MaterialDepthWriteSet = charTo64bitNum("MAT_DEWS"),
    MaterialDepthWrite = charTo64bitNum("MAT_DWRIT"),
    MaterialDepthTest = charTo64bitNum("MAT_DTEST"),
    MaterialInstanced = charTo64bitNum("MAT_INSTA"),
    MaterialCullingMode = charTo64bitNum("MAT_CUMO"),
    MaterialAlphaToCoverageSet = charTo64bitNum("MAT_A2CS"),
    MaterialAlphaToCoverage = charTo64bitNum("MAT_A2CO"),

    MaterialHasCustomDepthShader =charTo64bitNum("MAT_CSDP"),

    MaterialVertexDomain = charTo64bitNum("MAT_VEDO"),
    MaterialInterpolation = charTo64bitNum("MAT_INTR"),
    MaterialStereoscopicType = charTo64bitNum("MAT_STER"),

    DictionaryText = charTo64bitNum("DIC_TEXT"),
    DictionarySpirv = charTo64bitNum("DIC_SPIR"),
    DictionaryMetalLibrary = charTo64bitNum("DIC_MLIB"),

    MaterialCrc32 = charTo64bitNum("MAT_CRC "),

    MaterialSource = charTo64bitNum("MAT_SRC"),
};

} // namespace filamat

#endif // TNT_FILAMAT_MATERIAL_CHUNK_TYPES_H


Review comment (suggestion):
I think these chunk types need to be 8 chars long (see `MAT_CRC `) above. So we need a space at the end.

```suggestion
    MaterialSource = charTo64bitNum("MAT_SRC "),
```

Code after:
    MaterialRequiredAttributes = charTo64bitNum("MAT_REQA"),
    MaterialDoubleSidedSet = charTo64bitNum("MAT_DOSS"),
    MaterialDoubleSided = charTo64bitNum("MAT_DOSI"),

    MaterialColorWrite = charTo64bitNum("MAT_CWRIT"),
    MaterialDepthWriteSet = charTo64bitNum("MAT_DEWS"),
    MaterialDepthWrite = charTo64bitNum("MAT_DWRIT"),
    MaterialDepthTest = charTo64bitNum("MAT_DTEST"),
    MaterialInstanced = charTo64bitNum("MAT_INSTA"),
    MaterialCullingMode = charTo64bitNum("MAT_CUMO"),
    MaterialAlphaToCoverageSet = charTo64bitNum("MAT_A2CS"),
    MaterialAlphaToCoverage = charTo64bitNum("MAT_A2CO"),

    MaterialHasCustomDepthShader =charTo64bitNum("MAT_CSDP"),

    MaterialVertexDomain = charTo64bitNum("MAT_VEDO"),
    MaterialInterpolation = charTo64bitNum("MAT_INTR"),
    MaterialStereoscopicType = charTo64bitNum("MAT_STER"),

    DictionaryText = charTo64bitNum("DIC_TEXT"),
    DictionarySpirv = charTo64bitNum("DIC_SPIR"),
    DictionaryMetalLibrary = charTo64bitNum("DIC_MLIB"),

    MaterialCrc32 = charTo64bitNum("MAT_CRC "),

    MaterialSource = charTo64bitNum("MAT_SRC "),
};

} // namespace filamat

#endif // TNT_FILAMAT_MATERIAL_CHUNK_TYPES_H