slang: Handle OOM condition in new_instruction().
[mesa.git] / src / mesa / shader / slang / slang_compile_variable.h
index 09ff686b6de2bec8e65fd262d54436a978c413a7..b4585599f248219d1efb33e207a3f09eed3d957e 100644 (file)
 #ifndef SLANG_COMPILE_VARIABLE_H
 #define SLANG_COMPILE_VARIABLE_H
 
-#if defined __cplusplus
-extern "C" {
-#endif
 
-
-typedef enum slang_type_variant_
-{
-   SLANG_VARIANT,    /* the default */
-   SLANG_INVARIANT   /* indicates the "invariant" keyword */
-} slang_type_variant;
-
-
-typedef enum slang_type_qualifier_
-{
-   SLANG_QUAL_NONE,
-   SLANG_QUAL_CONST,
-   SLANG_QUAL_ATTRIBUTE,
-   SLANG_QUAL_VARYING,
-   SLANG_QUAL_UNIFORM,
-   SLANG_QUAL_OUT,
-   SLANG_QUAL_INOUT,
-   SLANG_QUAL_FIXEDOUTPUT,      /* internal */
-   SLANG_QUAL_FIXEDINPUT        /* internal */
-} slang_type_qualifier;
-
-extern slang_type_specifier_type
-slang_type_specifier_type_from_string(const char *);
-
-extern const char *
-slang_type_specifier_type_to_string(slang_type_specifier_type);
-
-
-
-typedef enum slang_type_precision_
-{
-   SLANG_PREC_DEFAULT,
-   SLANG_PREC_LOW,
-   SLANG_PREC_MEDIUM,
-   SLANG_PREC_HIGH
-} slang_type_precision;
-
-
-typedef struct slang_fully_specified_type_
-{
-   slang_type_qualifier qualifier;
-   slang_type_specifier specifier;
-   slang_type_precision precision;
-   slang_type_variant variant;
-} slang_fully_specified_type;
-
-extern int
-slang_fully_specified_type_construct(slang_fully_specified_type *);
-
-extern void
-slang_fully_specified_type_destruct(slang_fully_specified_type *);
-
-extern int
-slang_fully_specified_type_copy(slang_fully_specified_type *,
-                               const slang_fully_specified_type *);
+struct slang_ir_storage_;
 
 
 /**
@@ -95,11 +38,11 @@ typedef struct slang_variable_
    slang_atom a_name;               /**< The variable's name (char *) */
    GLuint array_len;                /**< only if type == SLANG_SPEC_ARRAy */
    struct slang_operation_ *initializer; /**< Optional initializer code */
-   GLuint address;                  /**< Storage location */
    GLuint size;                     /**< Variable's size in bytes */
+   GLboolean is_global;
    GLboolean isTemp;                /**< a named temporary (__resultTmp) */
    GLboolean declared;              /**< for debug */
-   void *aux;                       /**< Used during code gen */
+   struct slang_ir_storage_ *store; /**< Storage for this var */
 } slang_variable;
 
 
@@ -140,12 +83,8 @@ extern int
 slang_variable_copy(slang_variable *, const slang_variable *);
 
 extern slang_variable *
-_slang_locate_variable(const slang_variable_scope *, const slang_atom a_name,
+_slang_variable_locate(const slang_variable_scope *, const slang_atom a_name,
                        GLboolean all);
 
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* SLANG_COMPILE_VARIABLE_H */