diff options
author | Ian Romanick <[email protected]> | 2011-01-25 10:41:20 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-03-29 13:21:08 -0700 |
commit | 89d81ab16c05818b290ed735c1343d3abde449bf (patch) | |
tree | 256104ebb7bdcc721ff0d70178047acb8c83ed21 /src/glsl/ir_clone.cpp | |
parent | 92e412e788931ad464125113a64eec8a8223cda3 (diff) |
glsl: Calcluate Mesa state slots in front-end instead of back-end
This should be the last bit of infrastructure changes before
generating GLSL IR for assembly shaders.
This commit leaves some odd code formatting in ir_to_mesa and brw_fs.
This was done to minimize whitespace changes / reindentation in some
loops. The following commit will restore formatting sanity.
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/glsl/ir_clone.cpp')
-rw-r--r-- | src/glsl/ir_clone.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index 2c0574dc6bf..069bb85e8de 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -53,6 +53,18 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const var->origin_upper_left = this->origin_upper_left; var->pixel_center_integer = this->pixel_center_integer; var->explicit_location = this->explicit_location; + + var->num_state_slots = this->num_state_slots; + if (this->state_slots) { + /* FINISHME: This really wants to use something like talloc_reference, but + * FINISHME: ralloc doesn't have any similar function. + */ + var->state_slots = ralloc_array(var, ir_state_slot, + this->num_state_slots); + memcpy(var->state_slots, this->state_slots, + sizeof(this->state_slots[0]) * var->num_state_slots); + } + if (this->explicit_location) var->location = this->location; |