X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Freflectdata.h;h=981f45f000f7b02d926af39d64dd19efaf990508;hb=cebf1330ef6773b7b4496dc279ec02a7ca4351bb;hp=33ef1799ea469805832af7d9752a8888cf555036;hpb=ba55832910f04b90695da360b5889fa85e83c1e1;p=libs%2Fgl.git diff --git a/source/core/reflectdata.h b/source/core/reflectdata.h index 33ef1799..981f45f0 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,7 +57,7 @@ struct ReflectData struct AttributeInfo { std::string name; - unsigned location = -1; + int location = -1; unsigned array_size = 0; DataType type = VOID; }; @@ -59,8 +67,13 @@ struct ReflectData LayoutHash layout_hash = 0; std::vector attributes; unsigned n_clip_distances = 0; + unsigned n_descriptor_sets = 0; + unsigned push_constants_size = 0; + std::vector used_bindings; + LinAl::Vector compute_wg_size; void update_layout_hash(); + void update_used_bindings(); }; } // namespace GL