mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Integrated glsl-optimizer.
This commit is contained in:
4
3rdparty/.editorconfig
vendored
4
3rdparty/.editorconfig
vendored
@@ -31,3 +31,7 @@ indent_size = 4
|
||||
[remotery/*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[glsl-optimizer/*]
|
||||
indent_style = space
|
||||
indent_size = 3
|
||||
|
||||
10
3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp
vendored
10
3rdparty/glsl-optimizer/src/glsl/ast_to_hir.cpp
vendored
@@ -3045,10 +3045,12 @@ process_initializer(ir_variable *var, ast_declaration *decl,
|
||||
/* Propagate precision qualifier for constant value */
|
||||
if (type->qualifier.flags.q.constant) {
|
||||
ir_constant *constant_value = rhs->constant_expression_value();
|
||||
constant_value->set_precision((glsl_precision)type->qualifier.precision);
|
||||
if (constant_value->type->is_array()) {
|
||||
for (unsigned i = 0; i < constant_value->type->length; i++) {
|
||||
constant_value->get_array_element(i)->set_precision((glsl_precision)type->qualifier.precision);
|
||||
if (NULL != constant_value) {
|
||||
constant_value->set_precision((glsl_precision)type->qualifier.precision);
|
||||
if (constant_value->type->is_array()) {
|
||||
for (unsigned i = 0; i < constant_value->type->length; i++) {
|
||||
constant_value->get_array_element(i)->set_precision((glsl_precision)type->qualifier.precision);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user