From 6c1ec6aa79f83c030e85ab99d8c376711c64f151 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 24 Jun 2020 21:13:32 -0400 Subject: [PATCH] spirv: Fix asserts for pixel shader POSITION/PSIZE lengths --- profiles/mojoshader_profile_spirv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profiles/mojoshader_profile_spirv.c b/profiles/mojoshader_profile_spirv.c index f148b168..2e03fade 100644 --- a/profiles/mojoshader_profile_spirv.c +++ b/profiles/mojoshader_profile_spirv.c @@ -1710,12 +1710,12 @@ static void spv_link_ps_attributes(Context *ctx, uint32 id, RegisterType regtype } // case case MOJOSHADER_USAGE_POSITION: { - assert(index < SPV_LENGTH_POSITION); + assert(index <= SPV_LENGTH_POSITION); spv_output_location(ctx, id, SPV_OFFSET_POSITION + (index - 1)); } // case case MOJOSHADER_USAGE_POINTSIZE: { - assert(index < SPV_LENGTH_PSIZE); + assert(index <= SPV_LENGTH_PSIZE); spv_output_location(ctx, id, SPV_OFFSET_PSIZE + (index - 1)); } // case default: