projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nir/builder: Use nir_after_instr to advance the cursor
[mesa.git]
/
src
/
glsl
/
lower_vector.cpp
diff --git
a/src/glsl/lower_vector.cpp
b/src/glsl/lower_vector.cpp
index 93c37638bbd4eb7397cbcc61a49b65ac45169ce0..a658410ae6fd20e0a894b35ad3658fb3db59faf3 100644
(file)
--- a/
src/glsl/lower_vector.cpp
+++ b/
src/glsl/lower_vector.cpp
@@
-31,9
+31,11
@@
#include "ir.h"
#include "ir_rvalue_visitor.h"
#include "ir.h"
#include "ir_rvalue_visitor.h"
+namespace {
+
class lower_vector_visitor : public ir_rvalue_visitor {
public:
class lower_vector_visitor : public ir_rvalue_visitor {
public:
- lower_vector_visitor() : progress(false)
+ lower_vector_visitor() :
dont_lower_swz(false),
progress(false)
{
/* empty */
}
{
/* empty */
}
@@
-48,6
+50,8
@@
public:
bool progress;
};
bool progress;
};
+} /* anonymous namespace */
+
/**
* Determine if an IR expression tree looks like an extended swizzle
*
/**
* Determine if an IR expression tree looks like an extended swizzle
*
@@
-125,7
+129,7
@@
lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue)
if (this->dont_lower_swz && is_extended_swizzle(expr))
return;
if (this->dont_lower_swz && is_extended_swizzle(expr))
return;
- /* FINISHME: Is this the right thing to use for the
t
alloc context?
+ /* FINISHME: Is this the right thing to use for the
r
alloc context?
*/
void *const mem_ctx = expr;
*/
void *const mem_ctx = expr;
@@
-183,7
+187,7
@@
lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue)
if (assigned > 0) {
ir_constant *const c =
new(mem_ctx) ir_constant(glsl_type::get_instance(expr->type->base_type,
if (assigned > 0) {
ir_constant *const c =
new(mem_ctx) ir_constant(glsl_type::get_instance(expr->type->base_type,
- assigned,
0
),
+ assigned,
1
),
&d);
ir_dereference *const lhs = new(mem_ctx) ir_dereference_variable(temp);
ir_assignment *const assign =
&d);
ir_dereference *const lhs = new(mem_ctx) ir_dereference_variable(temp);
ir_assignment *const assign =