Hash :
cd10b6d2
Author :
Date :
2022-10-10T21:00:07
Enum Utils: Add method to return enum value from string. We'll use this in the trace interpreter to parse enum values. Bug: angleproject:7752 Change-Id: I232a00baac2f74c9618029929bbb3e5822654046 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3963366 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
//
// 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.
//
// gl_enum_utils.h:
// Utility functions for converting GLenums to string.
#ifndef LIBANGLE_GL_ENUM_UTILS_H_
#define LIBANGLE_GL_ENUM_UTILS_H_
#include <ostream>
#include <string>
#include "common/gl_enum_utils_autogen.h"
namespace gl
{
const char *GLbooleanToString(unsigned int value);
const char *GLenumToString(GLESEnum enumGroup, unsigned int value);
const char *GLenumToString(BigGLEnum enumGroup, unsigned int value);
std::string GLbitfieldToString(GLESEnum enumGroup, unsigned int value);
std::string GLbitfieldToString(BigGLEnum enumGroup, unsigned int value);
void OutputGLenumString(std::ostream &out, GLESEnum enumGroup, unsigned int value);
void OutputGLenumString(std::ostream &out, BigGLEnum enumGroup, unsigned int value);
void OutputGLbitfieldString(std::ostream &out, GLESEnum enumGroup, unsigned int value);
const char *GLinternalFormatToString(unsigned int format);
unsigned int StringToGLenum(const char *str);
unsigned int StringToGLbitfield(const char *str);
extern const char kUnknownGLenumString[];
} // namespace gl
#endif // LIBANGLE_GL_ENUM_UTILS_H_