2323
2424@ Environment (EnvType .CLIENT )
2525public record Vk11IntermediaryShaderModule (
26- String name , @ Nullable ByteBuffer spirv , List <SpvUniformBuffer > uniformBuffers , List <SpvSampler > samplers , List <SpvVariable > outputs , List <SpvVariable > inputs , long pushConstantRange
26+ String name , @ Nullable ByteBuffer spirv , List <SpvUniformBuffer > uniformBuffers , List <SpvSampler > samplers , List <SpvVariable > outputs , List <SpvVariable > inputs , int pushConstantRange
2727) implements AutoCloseable {
2828 public static final Vk11IntermediaryShaderModule INVALID = new Vk11IntermediaryShaderModule (
2929 "invalid" , null , new ArrayList <>(), new ArrayList <>(), new ArrayList <>(), new ArrayList <>(), 0
@@ -34,7 +34,7 @@ public static Vk11IntermediaryShaderModule createFromSpirv(final String filename
3434 List <SpvSampler > samplers = new ArrayList <>();
3535 List <SpvVariable > outputs = new ArrayList <>();
3636 List <SpvVariable > inputs = new ArrayList <>();
37- long pushConstantRange = 0 ;
37+ int pushConstantRange = 0 ;
3838
3939 try (MemoryStack stack = MemoryStack .stackPush ()) {
4040 PointerBuffer pointer = stack .callocPointer (1 );
@@ -108,7 +108,7 @@ public static Vk11IntermediaryShaderModule createFromSpirv(final String filename
108108 for (int i =0 ; i < spvcCount ; i ++){
109109 long type = Spvc .spvc_compiler_get_type_handle (compiler , pc .get (i ).type_id ());
110110 if (Spvc .spvc_compiler_get_declared_struct_size (compiler , type , size ) == Spvc .SPVC_SUCCESS ){
111- pushConstantRange = Math .max (pushConstantRange , size .get ());
111+ pushConstantRange = Math .toIntExact ( Math . max (pushConstantRange , size .get () ));
112112 }
113113 else {
114114 ArtVK .LOGGER .error ("Failed to get declared push constant struct size!" );
0 commit comments