aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-03-05 15:05:52 +1100
committerTimothy Arceri <[email protected]>2019-03-06 13:10:02 +1100
commit81ee2cd8ba5a0145520e849e20c1a8e43f78c6fa (patch)
treee48654b4aa6bd70eda71e17eedbe5e1a20143dfa /src/compiler/glsl/ir.cpp
parent272e927d0e9fed6e791d706ff5d895b6c2036fc0 (diff)
glsl: rename is_record() -> is_struct()
Replace was done using: find ./src -type f -exec sed -i -- \ 's/is_record(/is_struct(/g' {} \; Acked-by: Karol Herbst <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir.cpp')
-rw-r--r--src/compiler/glsl/ir.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
index 77e37161b74..060bd3ae7f5 100644
--- a/src/compiler/glsl/ir.cpp
+++ b/src/compiler/glsl/ir.cpp
@@ -754,14 +754,14 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
this->type = type;
assert(type->is_scalar() || type->is_vector() || type->is_matrix()
- || type->is_record() || type->is_array());
+ || type->is_struct() || type->is_array());
/* If the constant is a record, the types of each of the entries in
* value_list must be a 1-for-1 match with the structure components. Each
* entry must also be a constant. Just move the nodes from the value_list
* to the list in the ir_constant.
*/
- if (type->is_array() || type->is_record()) {
+ if (type->is_array() || type->is_struct()) {
this->const_elements = ralloc_array(this, ir_constant *, type->length);
unsigned i = 0;
foreach_in_list(ir_constant, value, value_list) {
@@ -909,7 +909,7 @@ ir_constant *
ir_constant::zero(void *mem_ctx, const glsl_type *type)
{
assert(type->is_scalar() || type->is_vector() || type->is_matrix()
- || type->is_record() || type->is_array());
+ || type->is_struct() || type->is_array());
ir_constant *c = new(mem_ctx) ir_constant;
c->type = type;
@@ -922,7 +922,7 @@ ir_constant::zero(void *mem_ctx, const glsl_type *type)
c->const_elements[i] = ir_constant::zero(c, type->fields.array);
}
- if (type->is_record()) {
+ if (type->is_struct()) {
c->const_elements = ralloc_array(c, ir_constant *, type->length);
for (unsigned i = 0; i < type->length; i++) {
@@ -1114,7 +1114,7 @@ ir_constant::get_array_element(unsigned i) const
ir_constant *
ir_constant::get_record_field(int idx)
{
- assert(this->type->is_record());
+ assert(this->type->is_struct());
assert(idx >= 0 && (unsigned) idx < this->type->length);
return const_elements[idx];
@@ -1185,7 +1185,7 @@ ir_constant::copy_offset(ir_constant *src, int offset)
void
ir_constant::copy_masked_offset(ir_constant *src, int offset, unsigned int mask)
{
- assert (!type->is_array() && !type->is_record());
+ assert (!type->is_array() && !type->is_struct());
if (!type->is_vector() && !type->is_matrix()) {
offset = 0;
@@ -1233,7 +1233,7 @@ ir_constant::has_value(const ir_constant *c) const
if (this->type != c->type)
return false;
- if (this->type->is_array() || this->type->is_record()) {
+ if (this->type->is_array() || this->type->is_struct()) {
for (unsigned i = 0; i < this->type->length; i++) {
if (!this->const_elements[i]->has_value(c->const_elements[i]))
return false;
@@ -1944,7 +1944,7 @@ steal_memory(ir_instruction *ir, void *new_ctx)
* visitor, so steal their values by hand.
*/
if (constant != NULL &&
- (constant->type->is_array() || constant->type->is_record())) {
+ (constant->type->is_array() || constant->type->is_struct())) {
for (unsigned int i = 0; i < constant->type->length; i++) {
steal_memory(constant->const_elements[i], ir);
}