On Wed, Jul 25, 2018 at 3:25 PM, Samuel Pitoiset <samuel.pitoi...@gmail.com> wrote: > > > On 07/25/2018 02:55 PM, Bas Nieuwenhuizen wrote: >> >> hmm, not sure why that did not fail on my CTS runs ... > > > Because 16bit is only enabled on Polaris? Wait what, it should be enabled on Vega too right?
> > >> >> Reviewed-by: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl> >> >> On Wed, Jul 25, 2018 at 2:55 PM, Samuel Pitoiset >> <samuel.pitoi...@gmail.com> wrote: >>> >>> Move the integer conversion after the fixup. >>> >>> This fixes some regressions with >>> dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10* >>> >>> Fixes: b722b29f10 ("radv: add support for 16bit input/output") >>> Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> >>> --- >>> src/amd/vulkan/radv_nir_to_llvm.c | 7 ++++--- >>> 1 file changed, 4 insertions(+), 3 deletions(-) >>> >>> diff --git a/src/amd/vulkan/radv_nir_to_llvm.c >>> b/src/amd/vulkan/radv_nir_to_llvm.c >>> index 9f9dc0d4fe..64b6522cd9 100644 >>> --- a/src/amd/vulkan/radv_nir_to_llvm.c >>> +++ b/src/amd/vulkan/radv_nir_to_llvm.c >>> @@ -2030,15 +2030,16 @@ handle_vs_input_decl(struct radv_shader_context >>> *ctx, >>> output[chan] = >>> LLVMBuildBitCast(ctx->ac.builder, output[chan], ctx->ac.f32, ""); >>> output[chan] = >>> LLVMBuildFPTrunc(ctx->ac.builder, output[chan], ctx->ac.f16, ""); >>> } >>> - output[chan] = ac_to_integer(&ctx->ac, >>> output[chan]); >>> - if (type == GLSL_TYPE_UINT16 || type == >>> GLSL_TYPE_INT16) >>> - output[chan] = >>> LLVMBuildTrunc(ctx->ac.builder, output[chan], ctx->ac.i16, ""); >>> } >>> >>> unsigned alpha_adjust = >>> (ctx->options->key.vs.alpha_adjust >> (attrib_index * 2)) & 3; >>> output[3] = adjust_vertex_fetch_alpha(ctx, alpha_adjust, >>> output[3]); >>> >>> for (unsigned chan = 0; chan < 4; chan++) { >>> + output[chan] = ac_to_integer(&ctx->ac, >>> output[chan]); >>> + if (type == GLSL_TYPE_UINT16 || type == >>> GLSL_TYPE_INT16) >>> + output[chan] = >>> LLVMBuildTrunc(ctx->ac.builder, output[chan], ctx->ac.i16, ""); >>> + >>> >>> ctx->inputs[ac_llvm_reg_index_soa(variable->data.location + i, chan)] = >>> output[chan]; >>> } >>> } >>> -- >>> 2.18.0 >>> >>> _______________________________________________ >>> mesa-dev mailing list >>> mesa-dev@lists.freedesktop.org >>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev