i965/nir/vec4: Implement vector "any" operation
[mesa.git] / src / mesa / drivers / dri / common / xmlconfig.h
index d0ad42c19504e49485e10aec61c57de9621573c5..8969843bdc929182c64c06c3ac8e3ea5683a979f 100644 (file)
 #ifndef __XMLCONFIG_H
 #define __XMLCONFIG_H
 
+#define STRING_CONF_MAXLEN 25
+
 /** \brief Option data types */
 typedef enum driOptionType {
-    DRI_BOOL, DRI_ENUM, DRI_INT, DRI_FLOAT
+    DRI_BOOL, DRI_ENUM, DRI_INT, DRI_FLOAT, DRI_STRING
 } driOptionType;
 
 /** \brief Option value */
 typedef union driOptionValue {
-    GLboolean _bool; /**< \brief Boolean */
-    GLint _int;      /**< \brief Integer or Enum */
-    GLfloat _float;  /**< \brief Floating-point */
+    unsigned char _bool; /**< \brief Boolean */
+    int _int;      /**< \brief Integer or Enum */
+    float _float;  /**< \brief Floating-point */
+    char *_string;   /**< \brief String */
 } driOptionValue;
 
 /** \brief Single range of valid values
@@ -55,7 +58,7 @@ typedef struct driOptionInfo {
     char *name;             /**< \brief Name */
     driOptionType type;     /**< \brief Type */
     driOptionRange *ranges; /**< \brief Array of ranges */
-    GLuint nRanges;         /**< \brief Number of ranges */
+    unsigned int nRanges;   /**< \brief Number of ranges */
 } driOptionInfo;
 
 /** \brief Option cache
@@ -73,7 +76,7 @@ typedef struct driOptionCache {
    * \li Default values in screen
    * \li Actual values in contexts 
    */
-    GLuint tableSize;
+    unsigned int tableSize;
   /**< \brief Size of the arrays
    *
    * In the current implementation it's not actually a size but log2(size).
@@ -98,7 +101,7 @@ void driParseOptionInfo (driOptionCache *info,
  * To be called in <driver>CreateContext. screenNum and driverName select
  * device sections. */
 void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
-                         GLint screenNum, const char *driverName);
+                         int screenNum, const char *driverName);
 /** \brief Destroy option info
  *
  * To be called in <driver>DestroyScreen */
@@ -109,14 +112,16 @@ void driDestroyOptionInfo (driOptionCache *info);
 void driDestroyOptionCache (driOptionCache *cache);
 
 /** \brief Check if there exists a certain option */
-GLboolean driCheckOption (const driOptionCache *cache, const char *name,
+unsigned char driCheckOption (const driOptionCache *cache, const char *name,
                          driOptionType type);
 
 /** \brief Query a boolean option value */
-GLboolean driQueryOptionb (const driOptionCache *cache, const char *name);
+unsigned char driQueryOptionb (const driOptionCache *cache, const char *name);
 /** \brief Query an integer option value */
-GLint driQueryOptioni (const driOptionCache *cache, const char *name);
+int driQueryOptioni (const driOptionCache *cache, const char *name);
 /** \brief Query a floating-point option value */
-GLfloat driQueryOptionf (const driOptionCache *cache, const char *name);
+float driQueryOptionf (const driOptionCache *cache, const char *name);
+/** \brief Query a string option value */
+char *driQueryOptionstr (const driOptionCache *cache, const char *name);
 
 #endif