diff options
author | Nicolai Hähnle <[email protected]> | 2017-04-26 18:34:27 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-05-06 16:40:19 +0200 |
commit | b738fae4b977fc08ddfff012e689b6a7d8a87022 (patch) | |
tree | 2a0458cf15b425e16bb7e26c32a5ce5f45b0ae1b /src/compiler/glsl/opt_tree_grafting.cpp | |
parent | d04b0f31d328af95cebec816adfe683a6095bca8 (diff) |
glsl: skip tree grafting for sampler and image types
v2: - use is_sampler()/is_image() instead (Samuel Pitoiset)
Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl/opt_tree_grafting.cpp')
-rw-r--r-- | src/compiler/glsl/opt_tree_grafting.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compiler/glsl/opt_tree_grafting.cpp b/src/compiler/glsl/opt_tree_grafting.cpp index 28b6e1856e8..b0a16041918 100644 --- a/src/compiler/glsl/opt_tree_grafting.cpp +++ b/src/compiler/glsl/opt_tree_grafting.cpp @@ -371,6 +371,17 @@ tree_grafting_basic_block(ir_instruction *bb_first, if (lhs_var->data.precise) continue; + /* Do not graft sampler and image variables. This is a workaround to + * st/glsl_to_tgsi being unable to handle expression parameters to image + * intrinsics. + * + * Note that if this is ever fixed, we still need to skip grafting when + * any image layout qualifiers (including the image format) are set, + * since we must not lose those. + */ + if (lhs_var->type->is_sampler() || lhs_var->type->is_image()) + continue; + ir_variable_refcount_entry *entry = info->refs->get_variable_entry(lhs_var); if (!entry->declaration || |