X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Freflectdata.h;h=ee98634ba6fa187f6607f35caefd3bdf4e63af3a;hp=5041b5796284e2c419f143678f372ac725ac4981;hb=e1be82a4dfce8d90358c506f65be09da4dc9d5ec;hpb=f82ef715f0d7e1e7d0b93be4b7b89c8ce6bba40b diff --git a/source/core/reflectdata.h b/source/core/reflectdata.h index 5041b579..ee98634b 100644 --- a/source/core/reflectdata.h +++ b/source/core/reflectdata.h @@ -14,6 +14,14 @@ Reflection data for shader programs. */ struct ReflectData { + enum + { + DEFAULT_BLOCK = -1, + PUSH_CONSTANT = -2, + UNIFORM_BLOCK_BINDING = 0, + TEXTURE_BINDING = 0x1000000 + }; + typedef unsigned LayoutHash; struct UniformBlockInfo; @@ -38,7 +46,7 @@ struct ReflectData { std::string name; unsigned data_size = 0; - int bind_point = -1; + int bind_point = DEFAULT_BLOCK; std::vector uniforms; LayoutHash layout_hash = 0; @@ -49,18 +57,21 @@ struct ReflectData struct AttributeInfo { std::string name; - unsigned location = -1; + int location = -1; unsigned array_size = 0; DataType type = VOID; }; std::vector uniform_blocks; std::vector uniforms; - LayoutHash layout_hash; + LayoutHash layout_hash = 0; std::vector attributes; unsigned n_clip_distances = 0; + unsigned n_descriptor_sets = 0; + std::vector used_bindings; void update_layout_hash(); + void update_used_bindings(); }; } // namespace GL