Closed likun123687 closed 2 years ago
No, your're right. That's an oversight. I'll start working on a fix.
Ok, this should be fixed, I tested in the sokol_samples by switching the shdfeatures-sapp sample temporarily over to sokol_impl
output. The declaration block then contains the additional function protos:
#endif
const sg_shader_desc* slm_prog_shader_desc(sg_backend backend);
int slm_prog_attr_slot(const char* attr_name);
int slm_prog_image_slot(sg_shader_stage stage, const char* img_name);
int slm_prog_uniformblock_slot(sg_shader_stage stage, const char* ub_name);
size_t slm_prog_uniformblock_size(sg_shader_stage stage, const char* ub_name);
int slm_prog_uniform_offset(sg_shader_stage stage, const char* ub_name, const char* u_name);
sg_shader_uniform_desc slm_prog_uniform_desc(sg_shader_stage stage, const char* ub_name, const char* u_name);
#define ATTR_slm_vs_position (0)
I'll start a GH Action run to build and commit the updated executables, ETA 30 minutes.
GH Action for the new binaries: https://github.com/floooh/sokol-tools/actions/runs/2282914956, once that has finished you can give it a try.
(if you're using fips, just run ./fips update
in the main project and it pulls the latest changes to the sokol-tools-bin repository).
Thank you, solve my problem
my glsl file:
i use the command:
sokol-shdc --input .\2-uniforms.glsl --output uniforms3.glsl.h --slang hlsl5 --reflection --format sokol_impl
the generate content:
the Declarations part only contain shader_desc function,the Runtime Inspection function is not found.Did i miss something?