From: Connor Abbott Date: Fri, 26 Jun 2015 19:14:05 +0000 (-0700) Subject: Merge branch 'wip/nir-vtn' into vulkan X-Git-Tag: upstream/17.1.0~11012^2~1828 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ee082718fca884fbda73001e0ecb32095409549;p=platform%2Fupstream%2Fmesa.git Merge branch 'wip/nir-vtn' into vulkan Adds composites and matrix multiplication, plus some control flow fixes. --- 6ee082718fca884fbda73001e0ecb32095409549 diff --cc src/glsl/nir/spirv_to_nir.c index d8523fd,a5e9c4a..a47c683 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@@ -804,13 -930,15 +1023,16 @@@ vtn_handle_texture(struct vtn_builder * case SpvOpTextureGather: case SpvOpTextureGatherOffset: case SpvOpTextureGatherOffsets: - case SpvOpTextureQueryLod: + case SpvOpTextureQueryLod: { /* All these types have the coordinate as their first real argument */ - coord_components = glsl_get_vector_elements(b->values[w[4]].type); - p->src = nir_src_for_ssa(vtn_ssa_value(b, w[4])); - struct vtn_value *coord = vtn_value(b, w[4], vtn_value_type_ssa); ++ struct vtn_ssa_value *coord = vtn_ssa_value(b, w[4]); + coord_components = glsl_get_vector_elements(coord->type); - p->src = nir_src_for_ssa(coord->ssa->def); ++ p->src = nir_src_for_ssa(coord->def); p->src_type = nir_tex_src_coord; p++; break; + } ++ default: break; } @@@ -874,10 -1002,11 +1096,11 @@@ instr->is_array = glsl_sampler_type_is_array(sampler_type); instr->is_shadow = glsl_sampler_type_is_shadow(sampler_type); - instr->sampler = sampler; + instr->sampler = nir_deref_as_var(nir_copy_deref(instr, &sampler->deref)); nir_ssa_dest_init(&instr->instr, &instr->dest, 4, NULL); - val->ssa = &instr->dest.ssa; + val->ssa->def = &instr->dest.ssa; + val->ssa->type = val->type; nir_builder_instr_insert(&b->nb, &instr->instr); }