Comments (3)
Any update on this? Did you have any luck plynkus?
from glsl-optimizer.
With some local, dirty, probably use case specific hacks to _mesa_print_ir_glsl() within ir_print_glsl_visitor.cpp, as I recall. I haven't looked at it in a while, but this is a good reminder to pull anew / retest / consider something more clean.
from glsl-optimizer.
Same issue. Yes, UBO are parsed but no printed in the glsl output.
Indeed, a quick modifications can be done in the function _mesa_print_ir_glsl (file ir_print_glsl_visitor.cpp), especially in the ir_print_glsl_visitor visitor for variable :
void ir_print_glsl_visitor::visit(ir_variable *ir)
After the line :
buffer.asprintf_append ("%s%s%s%s", cent, inv, interp[ir->data.interpolation], mode[decormode][ir->data.mode]);
we can add a ubo printer like :
buffer.asprintf_append ("%s%s%s%s", cent, inv, interp[ir->data.interpolation], mode[decormode][ir->data.mode]);
print_precision (ir, ir->type);
print_type(buffer, ir->type, false);
if (ir->type->base_type == GLSL_TYPE_INTERFACE)
{
buffer.asprintf_append("\n{\n");
for (auto pid = 0u; pid < ir->type->length; ++pid)
{
const auto &structField = ir->type->fields.structure[pid];
buffer.asprintf_append("\t");
print_precision(ir, structField.type);
print_type(buffer, structField.type, false);
buffer.asprintf_append(" ");
buffer.asprintf_append(structField.name);
if (structField.type->base_type == GLSL_TYPE_ARRAY)
{
buffer.asprintf_append("[%u]", structField.type->length);
}
buffer.asprintf_append(";\n");
}
buffer.asprintf_append("\n}");
}
buffer.asprintf_append (" ");
print_var_name (ir);
from glsl-optimizer.
Related Issues (20)
- Crash in ``void ir_print_glsl_visitor::visit(ir_texture *ir)`` HOT 3
- Can't build on Ubuntu 15.10 HOT 1
- Link fails on Mac OS X w/clang HOT 1
- switch statements not functioning? HOT 2
- GLSL printer doesn't output MSAA texelFetch correctly HOT 1
- Building for android HOT 7
- Metal and framebuffer fetch
- required preprocessor conditionals are optimized out. HOT 5
- cmake options to disable glsl_test, etc
- Why are there no releases? HOT 1
- Emscripten build with -O2 or -O3 causes optimizer to hang indefinitely HOT 1
- disable optimization for expression/line HOT 1
- Precision not output for sampler2DArray
- [Android] artifacts with large shaders
- Support for storage buffers
- Crash on const variable initialization.
- Add support for GameMaker Studio constants HOT 2
- error C7011: implicit cast from "mediump vec3" to "mediump vec2" es 3.0
- Broken version check for support of sampler arrays in GLSL ES leads to incorrect error
- doesn't compile in xcode 13.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glsl-optimizer.