Merge remote-tracking branch 'public/master' into vulkan
[mesa.git] / src / compiler / nir / nir.h
index 2fd75ec8be57d28e77908b82357441343bd20e4c..d9e0d679c66f4d478e0d59cee75a4986a86f9e96 100644 (file)
@@ -986,8 +986,8 @@ typedef enum {
    NIR_INTRINSIC_UCP_ID = 4,
 
    /**
-    * The range of a load operation.  This specifies the maximum amount of
-    * data starting at the base offset (if any) that can be accessed.
+    * The ammount of data, starting from BASE, that this instruction may
+    * access.  This is used to provide bounds if the offset is not constant.
     */
    NIR_INTRINSIC_RANGE = 5,
 
@@ -1822,6 +1822,8 @@ nir_shader_get_entrypoint(nir_shader *shader)
    assert(exec_list_length(&shader->functions) == 1);
    struct exec_node *func_node = exec_list_get_head(&shader->functions);
    nir_function *func = exec_node_data(nir_function, func_node, node);
+   assert(func->return_type == glsl_void_type());
+   assert(func->num_params == 0);
    return func;
 }