Lines Matching refs:validated_shader
155 record_texture_sample(struct vc4_validated_shader_info *validated_shader, in record_texture_sample() argument
159 uint32_t s = validated_shader->num_texture_samples; in record_texture_sample()
163 temp_samples = krealloc(validated_shader->texture_samples, in record_texture_sample()
173 validated_shader->num_texture_samples = s + 1; in record_texture_sample()
174 validated_shader->texture_samples = temp_samples; in record_texture_sample()
183 check_tmu_write(struct vc4_validated_shader_info *validated_shader, in check_tmu_write() argument
261 validated_shader->uniforms_size; in check_tmu_write()
272 validated_shader->uniforms_size += 4; in check_tmu_write()
276 if (!record_texture_sample(validated_shader, in check_tmu_write()
287 static bool require_uniform_address_uniform(struct vc4_validated_shader_info *validated_shader) in require_uniform_address_uniform() argument
289 uint32_t o = validated_shader->num_uniform_addr_offsets; in require_uniform_address_uniform()
290 uint32_t num_uniforms = validated_shader->uniforms_size / 4; in require_uniform_address_uniform()
292 validated_shader->uniform_addr_offsets = in require_uniform_address_uniform()
293 krealloc(validated_shader->uniform_addr_offsets, in require_uniform_address_uniform()
295 sizeof(*validated_shader->uniform_addr_offsets), in require_uniform_address_uniform()
297 if (!validated_shader->uniform_addr_offsets) in require_uniform_address_uniform()
300 validated_shader->uniform_addr_offsets[o] = num_uniforms; in require_uniform_address_uniform()
301 validated_shader->num_uniform_addr_offsets++; in require_uniform_address_uniform()
307 validate_uniform_address_write(struct vc4_validated_shader_info *validated_shader, in validate_uniform_address_write() argument
319 u32 expected_offset = validated_shader->uniforms_size + 4; in validate_uniform_address_write()
382 return require_uniform_address_uniform(validated_shader); in validate_uniform_address_write()
386 check_reg_write(struct vc4_validated_shader_info *validated_shader, in check_reg_write() argument
425 return validate_uniform_address_write(validated_shader, in check_reg_write()
445 return check_tmu_write(validated_shader, validation_state, in check_reg_write()
478 track_live_clamps(struct vc4_validated_shader_info *validated_shader, in track_live_clamps() argument
548 validated_shader->uniforms_size; in track_live_clamps()
553 check_instruction_writes(struct vc4_validated_shader_info *validated_shader, in check_instruction_writes() argument
566 ok = (check_reg_write(validated_shader, validation_state, false) && in check_instruction_writes()
567 check_reg_write(validated_shader, validation_state, true)); in check_instruction_writes()
569 track_live_clamps(validated_shader, validation_state); in check_instruction_writes()
576 struct vc4_validated_shader_info *validated_shader, in check_branch() argument
600 check_instruction_reads(struct vc4_validated_shader_info *validated_shader, in check_instruction_reads() argument
614 validated_shader->uniforms_size += 4; in check_instruction_reads()
786 struct vc4_validated_shader_info *validated_shader = NULL; in vc4_validate_shader() local
804 validated_shader = kcalloc(1, sizeof(*validated_shader), GFP_KERNEL); in vc4_validate_shader()
805 if (!validated_shader) in vc4_validate_shader()
842 if (!check_instruction_writes(validated_shader, in vc4_validate_shader()
848 if (!check_instruction_reads(validated_shader, in vc4_validate_shader()
859 validated_shader->is_threaded = true; in vc4_validate_shader()
872 if (!check_instruction_writes(validated_shader, in vc4_validate_shader()
880 if (!check_branch(inst, validated_shader, in vc4_validate_shader()
912 if (validated_shader->is_threaded && in vc4_validate_shader()
929 if (!require_uniform_address_uniform(validated_shader)) in vc4_validate_shader()
931 validated_shader->uniforms_size += 4; in vc4_validate_shader()
938 validated_shader->uniforms_src_size = in vc4_validate_shader()
939 (validated_shader->uniforms_size + in vc4_validate_shader()
940 4 * validated_shader->num_texture_samples); in vc4_validate_shader()
944 return validated_shader; in vc4_validate_shader()
948 if (validated_shader) { in vc4_validate_shader()
949 kfree(validated_shader->uniform_addr_offsets); in vc4_validate_shader()
950 kfree(validated_shader->texture_samples); in vc4_validate_shader()
951 kfree(validated_shader); in vc4_validate_shader()