Hash :
e9603921
Author :
Date :
2019-10-31T14:33:26
Capture/Replay: Correct a few GLenum replay issues. This change refactors the GLenum utils into a non-autogenerated and an autogenerated portion. That makes it easier to modify the non-auto- generated bits to properly output GLenums even when the gl.xml data isn't totally correct. For instance, the "GetPName" group was missing a bunch of queries. Instead of trying to fix the GL we can simply fall back to querying the "Default" group when we return invalid enum. Also corrects a missing "0x" on hex output. Also allows the capture/replay sample to specify the correct binary data directory when testing a replay. Bug: angleproject:3611 Change-Id: I8e4c690b2850bb157a8cde8b057b20603e4b177d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1891008 Reviewed-by: Cody Northrop <cnorthrop@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 "libANGLE/gl_enum_utils_autogen.h"
namespace gl
{
const char *GLbooleanToString(unsigned int value);
const char *GLenumToString(GLenumGroup enumGroup, unsigned int value);
std::string GLbitfieldToString(GLenumGroup enumGroup, unsigned int value);
void OutputGLenumString(std::ostream &out, GLenumGroup enumGroup, unsigned int value);
void OutputGLbitfieldString(std::ostream &out, GLenumGroup enumGroup, unsigned int value);
extern const char kUnknownGLenumString[];
} // namespace gl
#endif // LIBANGLE_GL_ENUM_UTILS_H_