ac: add missing GLSL_TYPE_FLOAT16 to glsl_base_to_llvm_type()

Submitted by Samuel Pitoiset on Jan. 14, 2019, 12:48 p.m.

Details

Message ID 20190114124852.28953-1-samuel.pitoiset@gmail.com
State New
Headers show
Series "ac: add missing GLSL_TYPE_FLOAT16 to glsl_base_to_llvm_type()" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Samuel Pitoiset Jan. 14, 2019, 12:48 p.m.
Fix a crash with
dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.float16

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
 src/amd/common/ac_nir_to_llvm.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 5023b96f92d..6bdc617b586 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3904,6 +3904,8 @@  glsl_base_to_llvm_type(struct ac_llvm_context *ac,
 		return ac->i32;
 	case GLSL_TYPE_FLOAT: /* TODO handle mediump */
 		return ac->f32;
+	case GLSL_TYPE_FLOAT16:
+		return ac->f16;
 	case GLSL_TYPE_INT64:
 	case GLSL_TYPE_UINT64:
 		return ac->i64;

Comments

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>

On Mon, Jan 14, 2019 at 1:49 PM Samuel Pitoiset
<samuel.pitoiset@gmail.com> wrote:
>
> Fix a crash with
> dEQP-VK.spirv_assembly.instruction.compute.workgroup_memory.float16
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
> ---
>  src/amd/common/ac_nir_to_llvm.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 5023b96f92d..6bdc617b586 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3904,6 +3904,8 @@ glsl_base_to_llvm_type(struct ac_llvm_context *ac,
>                 return ac->i32;
>         case GLSL_TYPE_FLOAT: /* TODO handle mediump */
>                 return ac->f32;
> +       case GLSL_TYPE_FLOAT16:
> +               return ac->f16;
>         case GLSL_TYPE_INT64:
>         case GLSL_TYPE_UINT64:
>                 return ac->i64;
> --
> 2.20.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev