Skip to content

Inconsistent enum names in HUAWEI extensions #670

@lexaknyazev

Description

@lexaknyazev

The #659 PR added two new extensions with the following update for the GL headers:

#ifndef GL_HUAWEI_program_binary
#define GL_HUAWEI_program_binary 1
#define GL_HUAWEI_PROGRAM_BINARY          0x9771
#endif /* GL_HUAWEI_program_binary */

#ifndef GL_HUAWEI_shader_binary
#define GL_HUAWEI_shader_binary 1
#define GL_HUAWEI_SHADER_BINARY           0x9770
#endif /* GL_HUAWEI_shader_binary */

The enums should have been called GL_PROGRAM_BINARY_HUAWEI and GL_SHADER_BINARY_HUAWEI or GL_HUAWEI_PROGRAM_BINARY_HUAWEI and GL_HUAWEI_SHADER_BINARY_HUAWEI because an extension vendor prefix becomes a suffix in GL symbols. Also having macros that differ only in casing is quite error-prone.

Other similar enums, for comparison:

// GL_AMD_program_binary_Z400
#define GL_Z400_BINARY_AMD                0x8740

// GL_ANGLE_program_binary
#define GL_PROGRAM_BINARY_ANGLE           0x93A6

// GL_ARM_mali_shader_binary
#define GL_MALI_SHADER_BINARY_ARM         0x8F60

// GL_ARM_mali_program_binary
#define GL_MALI_PROGRAM_BINARY_ARM        0x8F61

// GL_DMP_shader_binary
#define GL_SHADER_BINARY_DMP              0x9250

// GL_DMP_program_binary
#define GL_SMAPHS30_PROGRAM_BINARY_DMP    0x9251
#define GL_SMAPHS_PROGRAM_BINARY_DMP      0x9252

// GL_IMG_shader_binary
#define GL_SGX_BINARY_IMG                 0x8C0A

// GL_IMG_program_binary
#define GL_SGX_PROGRAM_BINARY_IMG         0x9130

// GL_MESA_program_binary_formats
#define GL_PROGRAM_BINARY_FORMAT_MESA     0x875F

// GL_FJ_shader_binary_GCCSO
#define GL_GCCSO_SHADER_BINARY_FJ         0x9260

// GL_VIV_shader_binary
#define GL_SHADER_BINARY_VIV              0x8FC4

/cc @PanGao-h @oddhack

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions