This allows us to drop the duplicate gl_uniform_block_packing enum.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
blocks[i].Binding = (b->has_binding) ? b->binding + *binding_offset : 0;
blocks[i].UniformBufferSize = 0;
- blocks[i]._Packing = gl_uniform_block_packing(type->interface_packing);
+ blocks[i]._Packing = glsl_interface_packing(type->interface_packing);
blocks[i]._RowMajor = type->get_interface_row_major();
blocks[i].linearized_array_index = linearized_index;
*/
ubo_visitor parcel(blocks, variables, num_variables, prog);
- STATIC_ASSERT(unsigned(GLSL_INTERFACE_PACKING_STD140)
- == unsigned(ubo_packing_std140));
- STATIC_ASSERT(unsigned(GLSL_INTERFACE_PACKING_SHARED)
- == unsigned(ubo_packing_shared));
- STATIC_ASSERT(unsigned(GLSL_INTERFACE_PACKING_PACKED)
- == unsigned(ubo_packing_packed));
- STATIC_ASSERT(unsigned(GLSL_INTERFACE_PACKING_STD430)
- == unsigned(ubo_packing_std430));
-
unsigned i = 0;
struct hash_entry *entry;
hash_table_foreach (block_hash, entry) {
#include <string.h>
#include <assert.h>
+#include "shader_enums.h"
+
#ifdef __cplusplus
extern "C" {
#endif
GLSL_SAMPLER_DIM_SUBPASS_MS, /* for multisampled vulkan input attachments */
};
-enum glsl_interface_packing {
- GLSL_INTERFACE_PACKING_STD140,
- GLSL_INTERFACE_PACKING_SHARED,
- GLSL_INTERFACE_PACKING_PACKED,
- GLSL_INTERFACE_PACKING_STD430
-};
-
enum glsl_matrix_layout {
/**
* The layout of the matrix is inherited from the object containing the
INTERP_MODE_COUNT /**< Number of interpolation qualifiers */
};
+enum glsl_interface_packing {
+ GLSL_INTERFACE_PACKING_STD140,
+ GLSL_INTERFACE_PACKING_SHARED,
+ GLSL_INTERFACE_PACKING_PACKED,
+ GLSL_INTERFACE_PACKING_STD430
+};
+
const char *glsl_interp_mode_name(enum glsl_interp_mode qual);
/**
};
-enum gl_uniform_block_packing
-{
- ubo_packing_std140,
- ubo_packing_shared,
- ubo_packing_packed,
- ubo_packing_std430
-};
-
-
struct gl_uniform_block
{
/** Declared name of the uniform block */
* This isn't accessible through the API, but it is used while
* cross-validating uniform blocks.
*/
- enum gl_uniform_block_packing _Packing;
+ enum glsl_interface_packing _Packing;
GLboolean _RowMajor;
};