diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-01-22 02:08:13 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-01-22 02:08:13 +0000 |
commit | 1bea6551ba344ebede0403ac0943f701707cd9af (patch) | |
tree | 004e23dfcb4eb27377a709bb774a4527c1cd5146 /lib/mesa | |
parent | b7e29d54c722d0c1ed6747b4108da9c0e9d29e26 (diff) |
Import Mesa 19.2.8
Diffstat (limited to 'lib/mesa')
-rw-r--r-- | lib/mesa/src/compiler/glsl/int64.glsl | 22 | ||||
-rw-r--r-- | lib/mesa/src/compiler/nir/nir_gather_ssa_types.c | 10 |
2 files changed, 26 insertions, 6 deletions
diff --git a/lib/mesa/src/compiler/glsl/int64.glsl b/lib/mesa/src/compiler/glsl/int64.glsl index 7b826aecd..538f56cff 100644 --- a/lib/mesa/src/compiler/glsl/int64.glsl +++ b/lib/mesa/src/compiler/glsl/int64.glsl @@ -8,6 +8,28 @@ #extension GL_ARB_gpu_shader_int64: require #extension GL_ARB_shading_language_420pack: require +uvec2 +umul64(uvec2 a, uvec2 b) +{ + uvec2 result; + + umulExtended(a.x, b.x, result.y, result.x); + result.y += a.x * b.y + a.y * b.x; + + return result; +} + +ivec2 +sign64(ivec2 a) +{ + ivec2 result; + + result.y = a.y >> 31; + result.x = result.y | int((a.x | a.y) != 0); + + return result; +} + uvec4 udivmod64(uvec2 n, uvec2 d) { diff --git a/lib/mesa/src/compiler/nir/nir_gather_ssa_types.c b/lib/mesa/src/compiler/nir/nir_gather_ssa_types.c index ed1ee8aac..a1a7df0ca 100644 --- a/lib/mesa/src/compiler/nir/nir_gather_ssa_types.c +++ b/lib/mesa/src/compiler/nir/nir_gather_ssa_types.c @@ -72,7 +72,8 @@ static void copy_types(nir_src src, nir_dest *dest, BITSET_WORD *float_types, BITSET_WORD *int_types, bool *progress) { - bool src_is_sink = nir_src_is_const(src) || nir_src_is_undef(src); + bool src_is_sink = nir_src_is_const(src) || + src.ssa->parent_instr->type == nir_instr_type_ssa_undef; copy_type(src.ssa->index, dest->ssa.index, src_is_sink, float_types, progress); copy_type(src.ssa->index, dest->ssa.index, src_is_sink, int_types, progress); } @@ -111,9 +112,6 @@ nir_gather_ssa_types(nir_function_impl *impl, case nir_op_vec2: case nir_op_vec3: case nir_op_vec4: - case nir_op_vec5: - case nir_op_vec8: - case nir_op_vec16: for (unsigned i = 0; i < info->num_inputs; i++) { copy_types(alu->src[i].src, &alu->dest.dest, float_types, int_types, &progress); @@ -186,14 +184,14 @@ nir_gather_ssa_types(nir_function_impl *impl, case nir_intrinsic_load_uniform: assert(intrin->dest.is_ssa); set_type(intrin->dest.ssa.index, - nir_intrinsic_dest_type(intrin), + nir_intrinsic_type(intrin), float_types, int_types, &progress); break; case nir_intrinsic_store_output: assert(intrin->src[0].is_ssa); set_type(intrin->src[0].ssa->index, - nir_intrinsic_src_type(intrin), + nir_intrinsic_type(intrin), float_types, int_types, &progress); break; |