ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

slang_storage.h
Go to the documentation of this file.
00001 /*
00002  * Mesa 3-D graphics library
00003  * Version:  6.5
00004  *
00005  * Copyright (C) 2005-2006  Brian Paul   All Rights Reserved.
00006  *
00007  * Permission is hereby granted, free of charge, to any person obtaining a
00008  * copy of this software and associated documentation files (the "Software"),
00009  * to deal in the Software without restriction, including without limitation
00010  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00011  * and/or sell copies of the Software, and to permit persons to whom the
00012  * Software is furnished to do so, subject to the following conditions:
00013  *
00014  * The above copyright notice and this permission notice shall be included
00015  * in all copies or substantial portions of the Software.
00016  *
00017  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00018  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00019  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00020  * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00021  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00022  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00023  */
00024 
00025 #ifndef SLANG_STORAGE_H
00026 #define SLANG_STORAGE_H
00027 
00028 #include "slang_compile.h"
00029 
00030 
00031 /*
00032  * Program variable data storage is kept completely transparent to the
00033  * front-end compiler. It is up to the back-end how the data is
00034  * actually allocated. The slang_storage_type enum provides the basic
00035  * information about how the memory is interpreted. This abstract
00036  * piece of memory is called a data slot. A data slot of a particular
00037  * type has a fixed size.
00038  *
00039  * For now, only the three basic types are supported, that is bool,
00040  * int and float. Other built-in types like vector or matrix can
00041  * easily be decomposed into a series of basic types.
00042  *
00043  * If the vec4 module is enabled, 4-component vectors of floats are
00044  * used when possible. 4x4 matrices are constructed of 4 vec4 slots.
00045  */
00046 typedef enum slang_storage_type_
00047 {
00048    /* core */
00049    SLANG_STORE_AGGREGATE,
00050    SLANG_STORE_BOOL,
00051    SLANG_STORE_INT,
00052    SLANG_STORE_FLOAT,
00053    /* vec4 */
00054    SLANG_STORE_VEC4
00055 } slang_storage_type;
00056 
00057 
00072 typedef struct slang_storage_array_
00073 {
00074    slang_storage_type type;
00075    struct slang_storage_aggregate_ *aggregate;
00076    GLuint length;
00077 } slang_storage_array;
00078 
00079 GLboolean slang_storage_array_construct (slang_storage_array *);
00080 GLvoid slang_storage_array_destruct (slang_storage_array *);
00081 
00082 
00091 typedef struct slang_storage_aggregate_
00092 {
00093    slang_storage_array *arrays;
00094    GLuint count;
00095 } slang_storage_aggregate;
00096 
00097 GLboolean slang_storage_aggregate_construct (slang_storage_aggregate *);
00098 GLvoid slang_storage_aggregate_destruct (slang_storage_aggregate *);
00099 
00100 
00101 extern GLboolean
00102 _slang_aggregate_variable(slang_storage_aggregate *agg,
00103                           slang_type_specifier *spec,
00104                           GLuint array_len,
00105                           slang_function_scope *funcs,
00106                           slang_struct_scope *structs,
00107                           slang_variable_scope *vars,
00108                           slang_atom_pool *atoms);
00109 
00110 /*
00111  * Returns the size (in machine units) of the given storage type.
00112  * It is an error to pass-in SLANG_STORE_AGGREGATE.
00113  * Returns 0 on error.
00114  */
00115 extern GLuint
00116 _slang_sizeof_type (slang_storage_type);
00117 
00118 
00123 extern GLuint
00124 _slang_sizeof_aggregate (const slang_storage_aggregate *);
00125 
00126 
00127 #if 0
00128 
00133 extern GLboolean
00134 _slang_flatten_aggregate (slang_storage_aggregate *,
00135                           const slang_storage_aggregate *);
00136 
00137 #endif
00138 
00139 #endif /* SLANG_STORAGE_H */

Generated on Sun May 27 2012 04:20:41 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.