spirv: Fix asserts for pixel shader POSITION/PSIZE lengths
authorEthan Lee <flibitijibibo@flibitijibibo.com>
Wed, 24 Jun 2020 21:13:32 -0400
changeset 1268 bb945b05f9b2
parent 1267 2f441eb1c264
child 1269 5ed167069622
spirv: Fix asserts for pixel shader POSITION/PSIZE lengths
profiles/mojoshader_profile_spirv.c
--- a/profiles/mojoshader_profile_spirv.c	Wed Jun 24 21:02:33 2020 -0400
+++ b/profiles/mojoshader_profile_spirv.c	Wed Jun 24 21:13:32 2020 -0400
@@ -1710,12 +1710,12 @@
                 } // 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: