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 <eric@anholt.net> Reviewed-by: Chad Versace <chad.versace@intel.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user