#define TYPE_SPECIFIER_MAT34 30
#define TYPE_SPECIFIER_MAT43 31
+/* GL_EXT_texture_array */
+#define TYPE_SPECIFIER_SAMPLER_1D_ARRAY 32
+#define TYPE_SPECIFIER_SAMPLER_2D_ARRAY 33
+#define TYPE_SPECIFIER_SAMPLER_1D_ARRAY_SHADOW 34
+#define TYPE_SPECIFIER_SAMPLER_2D_ARRAY_SHADOW 35
+
/* type specifier array */
#define TYPE_SPECIFIER_NONARRAY 0
#define TYPE_SPECIFIER_ARRAY 1
int sampler2DShadow;
int sampler2DRect;
int sampler2DRectShadow;
+ int sampler1DArray;
+ int sampler2DArray;
+ int sampler1DArrayShadow;
+ int sampler2DArrayShadow;
int invariant;
_update(ctx, e, TYPE_SPECIFIER_SAMPLER2DRECT);
} else if (id == ctx->dict.sampler2DRectShadow) {
_update(ctx, e, TYPE_SPECIFIER_SAMPLER2DRECTSHADOW);
+ } else if (id == ctx->dict.sampler1DArray) {
+ _update(ctx, e, TYPE_SPECIFIER_SAMPLER_1D_ARRAY);
+ } else if (id == ctx->dict.sampler2DArray) {
+ /* XXX check for GL_EXT_texture_array */
+ _update(ctx, e, TYPE_SPECIFIER_SAMPLER_2D_ARRAY);
+ } else if (id == ctx->dict.sampler1DArrayShadow) {
+ _update(ctx, e, TYPE_SPECIFIER_SAMPLER_1D_ARRAY_SHADOW);
+ } else if (id == ctx->dict.sampler2DArrayShadow) {
+ _update(ctx, e, TYPE_SPECIFIER_SAMPLER_2D_ARRAY_SHADOW);
} else if (_parse_identifier(ctx, &p) == 0) {
_update(ctx, e, TYPE_SPECIFIER_TYPENAME);
*ps = p;
type = TYPE_SPECIFIER_SAMPLER2DRECT;
} else if (id == ctx->dict.sampler2DRectShadow) {
type = TYPE_SPECIFIER_SAMPLER2DRECTSHADOW;
+ } else if (id == ctx->dict.sampler1DArray) {
+ type = TYPE_SPECIFIER_SAMPLER_1D_ARRAY;
+ } else if (id == ctx->dict.sampler2DArray) {
+ type = TYPE_SPECIFIER_SAMPLER_2D_ARRAY;
+ } else if (id == ctx->dict.sampler1DArrayShadow) {
+ type = TYPE_SPECIFIER_SAMPLER_1D_ARRAY_SHADOW;
+ } else if (id == ctx->dict.sampler2DArrayShadow) {
+ type = TYPE_SPECIFIER_SAMPLER_2D_ARRAY_SHADOW;
} else {
return -1;
}
ADD_NAME(ctx, sampler2DShadow);
ADD_NAME(ctx, sampler2DRect);
ADD_NAME(ctx, sampler2DRectShadow);
+ ADD_NAME(ctx, sampler1DArray);
+ ADD_NAME(ctx, sampler2DArray);
+ ADD_NAME(ctx, sampler1DArrayShadow);
+ ADD_NAME(ctx, sampler2DArrayShadow);
ADD_NAME(ctx, invariant);
+//// GL_EXT_texture_array
+vec4 texture1DArray(const sampler1DArray sampler, const vec2 coord)
+{
+ __asm vec4_tex_1d_array __retVal, sampler, coord;
+}
+
+vec4 texture2DArray(const sampler2DArray sampler, const vec3 coord)
+{
+ __asm vec4_tex_2d_array __retVal, sampler, coord;
+}
+
+
//
// 8.9 Noise Functions
//
+//// GL_EXT_texture_array
+
+vec4 texture1DArray(const sampler1DArray sampler, const vec2 coord)
+{
+ vec4 coord4;
+ coord4.xy = coord;
+ __asm vec4_tex_1d_array __retVal, sampler, coord4;
+}
+
+vec4 texture1DArray(const sampler1DArray sampler, const vec2 coord, const float bias)
+{
+ vec4 coord4;
+ coord4.xy = coord;
+ coord4.w = bias;
+ __asm vec4_tex_1d_array_bias __retVal, sampler, coord4;
+}
+
+vec4 texure2DArray(const sampler2DArray sampler, const vec3 coord)
+{
+ vec4 coord4;
+ coord4.xyz = coord;
+ __asm vec4_tex_2d_array __retVal, sampler, coord4;
+}
+
+vec4 texture2DArray(const sampler2DArray sampler, const vec3 coord, const float bias)
+{
+ vec4 coord4;
+ coord4.xyz = coord;
+ coord4.w = bias;
+ __asm vec4_tex_2d_array_bias __retVal, sampler, coord4;
+}
+
+vec4 shadow1DArray(const sampler1DArrayShadow sampler, const vec2 coord)
+{
+ vec4 coord4;
+ coord4.xy = coord;
+ __asm vec4_tex_1d_array_shadow __retVal, sampler, coord4;
+}
+
+vec4 shadow1DArray(const sampler1DArrayShadow sampler, const vec2 coord, const float bias)
+{
+ vec4 coord4;
+ coord4.xy = coord;
+ coord4.w = bias;
+ __asm vec4_tex_1d_array_bias_shadow __retVal, sampler, coord4;
+}
+
+vec4 shadow2DArray(const sampler2DArrayShadow sampler, const vec3 coord)
+{
+ vec4 coord4;
+ coord4.xyz = coord;
+ __asm vec4_tex_2d_array_shadow __retVal, sampler, coord4;
+}
+
+vec4 shadow2DArray(const sampler2DArrayShadow sampler, const vec3 coord, const float bias)
+{
+ vec4 coord4;
+ coord4.xyz = coord;
+ coord4.w = bias;
+ __asm vec4_tex_2d_array_bias_shadow __retVal, sampler, coord4;
+}
+
+
+
//
// 8.8 Fragment Processing Functions
//
__asm vec4_tex_2d_bias_shadow __retVal, sampler, pcoord;
}
+
+//// GL_EXT_texture_array
+
+vec4 texture1DArrayLod(const sampler1DArray sampler, const vec2 coord, const float lod)
+{
+ vec4 coord4;
+ coord4.xy = coord;
+ coord4.w = lod;
+ __asm vec4_tex_1d_array_bias __retVal, sampler, coord4;
+}
+
+
+vec4 texture2DArrayLod(const sampler2DArray sampler, const vec3 coord, const float lod)
+{
+ vec4 coord4;
+ coord4.xyz = coord;
+ coord4.w = lod;
+ __asm vec4_tex_2d_array_bias __retVal, sampler, coord4;
+}
+
is_sampler_type(const slang_fully_specified_type *t)
{
switch (t->specifier.type) {
- case SLANG_SPEC_SAMPLER1D:
- case SLANG_SPEC_SAMPLER2D:
- case SLANG_SPEC_SAMPLER3D:
- case SLANG_SPEC_SAMPLERCUBE:
- case SLANG_SPEC_SAMPLER1DSHADOW:
- case SLANG_SPEC_SAMPLER2DSHADOW:
- case SLANG_SPEC_SAMPLER2DRECT:
- case SLANG_SPEC_SAMPLER2DRECTSHADOW:
+ case SLANG_SPEC_SAMPLER_1D:
+ case SLANG_SPEC_SAMPLER_2D:
+ case SLANG_SPEC_SAMPLER_3D:
+ case SLANG_SPEC_SAMPLER_CUBE:
+ case SLANG_SPEC_SAMPLER_1D_SHADOW:
+ case SLANG_SPEC_SAMPLER_2D_SHADOW:
+ case SLANG_SPEC_SAMPLER_RECT:
+ case SLANG_SPEC_SAMPLER_RECT_SHADOW:
+ case SLANG_SPEC_SAMPLER_1D_ARRAY:
+ case SLANG_SPEC_SAMPLER_2D_ARRAY:
+ case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW:
+ case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW:
return GL_TRUE;
default:
return GL_FALSE;
case SLANG_SPEC_MAT43:
sz = 4 * 4; /* 4 columns (regs) */
break;
- case SLANG_SPEC_SAMPLER1D:
- case SLANG_SPEC_SAMPLER2D:
- case SLANG_SPEC_SAMPLER3D:
- case SLANG_SPEC_SAMPLERCUBE:
- case SLANG_SPEC_SAMPLER1DSHADOW:
- case SLANG_SPEC_SAMPLER2DSHADOW:
- case SLANG_SPEC_SAMPLER2DRECT:
- case SLANG_SPEC_SAMPLER2DRECTSHADOW:
+ case SLANG_SPEC_SAMPLER_1D:
+ case SLANG_SPEC_SAMPLER_2D:
+ case SLANG_SPEC_SAMPLER_3D:
+ case SLANG_SPEC_SAMPLER_CUBE:
+ case SLANG_SPEC_SAMPLER_1D_SHADOW:
+ case SLANG_SPEC_SAMPLER_2D_SHADOW:
+ case SLANG_SPEC_SAMPLER_RECT:
+ case SLANG_SPEC_SAMPLER_RECT_SHADOW:
+ case SLANG_SPEC_SAMPLER_1D_ARRAY:
+ case SLANG_SPEC_SAMPLER_2D_ARRAY:
+ case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW:
+ case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW:
sz = 1; /* a sampler is basically just an integer index */
break;
case SLANG_SPEC_STRUCT:
sampler_to_texture_index(const slang_type_specifier_type type)
{
switch (type) {
- case SLANG_SPEC_SAMPLER1D:
+ case SLANG_SPEC_SAMPLER_1D:
return TEXTURE_1D_INDEX;
- case SLANG_SPEC_SAMPLER2D:
+ case SLANG_SPEC_SAMPLER_2D:
return TEXTURE_2D_INDEX;
- case SLANG_SPEC_SAMPLER3D:
+ case SLANG_SPEC_SAMPLER_3D:
return TEXTURE_3D_INDEX;
- case SLANG_SPEC_SAMPLERCUBE:
+ case SLANG_SPEC_SAMPLER_CUBE:
return TEXTURE_CUBE_INDEX;
- case SLANG_SPEC_SAMPLER1DSHADOW:
+ case SLANG_SPEC_SAMPLER_1D_SHADOW:
return TEXTURE_1D_INDEX; /* XXX fix */
- case SLANG_SPEC_SAMPLER2DSHADOW:
+ case SLANG_SPEC_SAMPLER_2D_SHADOW:
return TEXTURE_2D_INDEX; /* XXX fix */
- case SLANG_SPEC_SAMPLER2DRECT:
+ case SLANG_SPEC_SAMPLER_RECT:
return TEXTURE_RECT_INDEX;
- case SLANG_SPEC_SAMPLER2DRECTSHADOW:
+ case SLANG_SPEC_SAMPLER_RECT_SHADOW:
return TEXTURE_RECT_INDEX; /* XXX fix */
+ case SLANG_SPEC_SAMPLER_1D_ARRAY:
+ return TEXTURE_1D_ARRAY_INDEX;
+ case SLANG_SPEC_SAMPLER_2D_ARRAY:
+ return TEXTURE_2D_ARRAY_INDEX;
+ case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW:
+ return TEXTURE_1D_ARRAY_INDEX;
+ case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW:
+ return TEXTURE_2D_ARRAY_INDEX;
default:
return -1;
}
{ "vec4_tex_cube", IR_TEX, 1, 2 }, /* cubemap */
{ "vec4_tex_rect", IR_TEX, 1, 2 }, /* rectangle */
{ "vec4_tex_rect_bias", IR_TEX, 1, 2 }, /* rectangle w/ projection */
+ { "vec4_tex_1d_array", IR_TEX, 1, 2 },
+ { "vec4_tex_1d_array_bias", IR_TEXB, 1, 2 },
+ { "vec4_tex_1d_array_shadow", IR_TEX, 1, 2 },
+ { "vec4_tex_1d_array_bias_shadow", IR_TEXB, 1, 2 },
+ { "vec4_tex_2d_array", IR_TEX, 1, 2 },
+ { "vec4_tex_2d_array_bias", IR_TEXB, 1, 2 },
+ { "vec4_tex_2d_array_shadow", IR_TEX, 1, 2 },
+ { "vec4_tex_2d_array_bias_shadow", IR_TEXB, 1, 2 },
/* texture / sampler but with shadow comparison */
{ "vec4_tex_1d_shadow", IR_TEX_SH, 1, 2 },
while (spec->_array) {
spec = spec->_array;
}
- return spec->type == SLANG_SPEC_SAMPLER2DRECT ||
- spec->type == SLANG_SPEC_SAMPLER2DRECTSHADOW;
+ return spec->type == SLANG_SPEC_SAMPLER_RECT ||
+ spec->type == SLANG_SPEC_SAMPLER_RECT_SHADOW;
}
/** re-defined below, should be the same though */
-#define TYPE_SPECIFIER_COUNT 32
+#define TYPE_SPECIFIER_COUNT 36
/**
#define TYPE_SPECIFIER_MAT42 29
#define TYPE_SPECIFIER_MAT34 30
#define TYPE_SPECIFIER_MAT43 31
-#define TYPE_SPECIFIER_COUNT 32
+#define TYPE_SPECIFIER_SAMPLER_1D_ARRAY 32
+#define TYPE_SPECIFIER_SAMPLER_2D_ARRAY 33
+#define TYPE_SPECIFIER_SAMPLER_1D_ARRAY_SHADOW 34
+#define TYPE_SPECIFIER_SAMPLER_2D_ARRAY_SHADOW 35
+#define TYPE_SPECIFIER_COUNT 36
static int
parse_type_specifier(slang_parse_ctx * C, slang_output_ctx * O,
slang_type_specifier * spec)
{
- switch (*C->I++) {
+ int type = *C->I++;
+ switch (type) {
case TYPE_SPECIFIER_VOID:
spec->type = SLANG_SPEC_VOID;
break;
spec->type = SLANG_SPEC_MAT43;
break;
case TYPE_SPECIFIER_SAMPLER1D:
- spec->type = SLANG_SPEC_SAMPLER1D;
+ spec->type = SLANG_SPEC_SAMPLER_1D;
break;
case TYPE_SPECIFIER_SAMPLER2D:
- spec->type = SLANG_SPEC_SAMPLER2D;
+ spec->type = SLANG_SPEC_SAMPLER_2D;
break;
case TYPE_SPECIFIER_SAMPLER3D:
- spec->type = SLANG_SPEC_SAMPLER3D;
+ spec->type = SLANG_SPEC_SAMPLER_3D;
break;
case TYPE_SPECIFIER_SAMPLERCUBE:
- spec->type = SLANG_SPEC_SAMPLERCUBE;
+ spec->type = SLANG_SPEC_SAMPLER_CUBE;
break;
case TYPE_SPECIFIER_SAMPLER2DRECT:
- spec->type = SLANG_SPEC_SAMPLER2DRECT;
+ spec->type = SLANG_SPEC_SAMPLER_RECT;
break;
case TYPE_SPECIFIER_SAMPLER1DSHADOW:
- spec->type = SLANG_SPEC_SAMPLER1DSHADOW;
+ spec->type = SLANG_SPEC_SAMPLER_1D_SHADOW;
break;
case TYPE_SPECIFIER_SAMPLER2DSHADOW:
- spec->type = SLANG_SPEC_SAMPLER2DSHADOW;
+ spec->type = SLANG_SPEC_SAMPLER_2D_SHADOW;
break;
case TYPE_SPECIFIER_SAMPLER2DRECTSHADOW:
- spec->type = SLANG_SPEC_SAMPLER2DRECTSHADOW;
+ spec->type = SLANG_SPEC_SAMPLER_RECT_SHADOW;
+ break;
+ case TYPE_SPECIFIER_SAMPLER_1D_ARRAY:
+ spec->type = SLANG_SPEC_SAMPLER_1D_ARRAY;
+ break;
+ case TYPE_SPECIFIER_SAMPLER_2D_ARRAY:
+ spec->type = SLANG_SPEC_SAMPLER_2D_ARRAY;
+ break;
+ case TYPE_SPECIFIER_SAMPLER_1D_ARRAY_SHADOW:
+ spec->type = SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW;
+ break;
+ case TYPE_SPECIFIER_SAMPLER_2D_ARRAY_SHADOW:
+ spec->type = SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW;
break;
case TYPE_SPECIFIER_STRUCT:
spec->type = SLANG_SPEC_STRUCT;
var->type.qualifier = type->qualifier;
var->type.centroid = type->centroid;
var->type.precision = type->precision;
+ var->type.specifier = type->specifier;/*new*/
var->type.variant = type->variant;
var->type.layout = type->layout;
var->type.array_len = type->array_len;
case TYPE_SPECIFIER_SAMPLER2DSHADOW:
case TYPE_SPECIFIER_SAMPLER2DRECT:
case TYPE_SPECIFIER_SAMPLER2DRECTSHADOW:
+ case TYPE_SPECIFIER_SAMPLER_1D_ARRAY:
+ case TYPE_SPECIFIER_SAMPLER_2D_ARRAY:
+ case TYPE_SPECIFIER_SAMPLER_1D_ARRAY_SHADOW:
+ case TYPE_SPECIFIER_SAMPLER_2D_ARRAY_SHADOW:
/* OK */
break;
default:
case SLANG_SPEC_MAT43:
printf("mat4x3");
break;
- case SLANG_SPEC_SAMPLER1D:
+ case SLANG_SPEC_SAMPLER_1D:
printf("sampler1D");
break;
- case SLANG_SPEC_SAMPLER2D:
+ case SLANG_SPEC_SAMPLER_2D:
printf("sampler2D");
break;
- case SLANG_SPEC_SAMPLER3D:
+ case SLANG_SPEC_SAMPLER_3D:
printf("sampler3D");
break;
- case SLANG_SPEC_SAMPLERCUBE:
+ case SLANG_SPEC_SAMPLER_CUBE:
printf("samplerCube");
break;
- case SLANG_SPEC_SAMPLER1DSHADOW:
+ case SLANG_SPEC_SAMPLER_1D_SHADOW:
printf("sampler1DShadow");
break;
- case SLANG_SPEC_SAMPLER2DSHADOW:
+ case SLANG_SPEC_SAMPLER_2D_SHADOW:
printf("sampler2DShadow");
break;
case SLANG_SPEC_STRUCT:
return "mat3";
case SLANG_SPEC_MAT4:
return "mat4";
- case SLANG_SPEC_SAMPLER1D:
+ case SLANG_SPEC_SAMPLER_1D:
return "sampler1D";
- case SLANG_SPEC_SAMPLER2D:
+ case SLANG_SPEC_SAMPLER_2D:
return "sampler2D";
- case SLANG_SPEC_SAMPLER3D:
+ case SLANG_SPEC_SAMPLER_3D:
return "sampler3D";
- case SLANG_SPEC_SAMPLERCUBE:
+ case SLANG_SPEC_SAMPLER_CUBE:
return "samplerCube";
- case SLANG_SPEC_SAMPLER1DSHADOW:
+ case SLANG_SPEC_SAMPLER_1D_SHADOW:
return "sampler1DShadow";
- case SLANG_SPEC_SAMPLER2DSHADOW:
+ case SLANG_SPEC_SAMPLER_2D_SHADOW:
return "sampler2DShadow";
- case SLANG_SPEC_SAMPLER2DRECT:
+ case SLANG_SPEC_SAMPLER_RECT:
return "sampler2DRect";
- case SLANG_SPEC_SAMPLER2DRECTSHADOW:
+ case SLANG_SPEC_SAMPLER_RECT_SHADOW:
return "sampler2DRectShadow";
case SLANG_SPEC_STRUCT:
return "struct";
case SLANG_SPEC_MAT43:
return aggregate_matrix(agg, SLANG_STORE_FLOAT, 4, 3);
- case SLANG_SPEC_SAMPLER1D:
- case SLANG_SPEC_SAMPLER2D:
- case SLANG_SPEC_SAMPLER3D:
- case SLANG_SPEC_SAMPLERCUBE:
- case SLANG_SPEC_SAMPLER1DSHADOW:
- case SLANG_SPEC_SAMPLER2DSHADOW:
- case SLANG_SPEC_SAMPLER2DRECT:
- case SLANG_SPEC_SAMPLER2DRECTSHADOW:
+ case SLANG_SPEC_SAMPLER_1D:
+ case SLANG_SPEC_SAMPLER_2D:
+ case SLANG_SPEC_SAMPLER_3D:
+ case SLANG_SPEC_SAMPLER_CUBE:
+ case SLANG_SPEC_SAMPLER_1D_SHADOW:
+ case SLANG_SPEC_SAMPLER_2D_SHADOW:
+ case SLANG_SPEC_SAMPLER_RECT:
+ case SLANG_SPEC_SAMPLER_RECT_SHADOW:
+ case SLANG_SPEC_SAMPLER_1D_ARRAY:
+ case SLANG_SPEC_SAMPLER_2D_ARRAY:
+ case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW:
+ case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW:
+
return aggregate_vector(agg, SLANG_STORE_INT, 1);
case SLANG_SPEC_STRUCT:
return aggregate_variables(agg, spec->_struct->fields, funcs, structs,
{"mat4x2", SLANG_SPEC_MAT42},
{"mat3x4", SLANG_SPEC_MAT34},
{"mat4x3", SLANG_SPEC_MAT43},
- {"sampler1D", SLANG_SPEC_SAMPLER1D},
- {"sampler2D", SLANG_SPEC_SAMPLER2D},
- {"sampler3D", SLANG_SPEC_SAMPLER3D},
- {"samplerCube", SLANG_SPEC_SAMPLERCUBE},
- {"sampler1DShadow", SLANG_SPEC_SAMPLER1DSHADOW},
- {"sampler2DShadow", SLANG_SPEC_SAMPLER2DSHADOW},
- {"sampler2DRect", SLANG_SPEC_SAMPLER2DRECT},
- {"sampler2DRectShadow", SLANG_SPEC_SAMPLER2DRECTSHADOW},
+ {"sampler1D", SLANG_SPEC_SAMPLER_1D},
+ {"sampler2D", SLANG_SPEC_SAMPLER_2D},
+ {"sampler3D", SLANG_SPEC_SAMPLER_3D},
+ {"samplerCube", SLANG_SPEC_SAMPLER_CUBE},
+ {"sampler1DShadow", SLANG_SPEC_SAMPLER_1D_SHADOW},
+ {"sampler2DShadow", SLANG_SPEC_SAMPLER_2D_SHADOW},
+ {"sampler2DRect", SLANG_SPEC_SAMPLER_RECT},
+ {"sampler2DRectShadow", SLANG_SPEC_SAMPLER_RECT_SHADOW},
+ {"sampler1DArray", SLANG_SPEC_SAMPLER_1D_ARRAY},
+ {"sampler2DArray", SLANG_SPEC_SAMPLER_2D_ARRAY},
+ {"sampler1DArrayShadow", SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW},
+ {"sampler2DArrayShadow", SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW},
{NULL, SLANG_SPEC_VOID}
};
return GL_FLOAT_MAT3x4;
case SLANG_SPEC_MAT43:
return GL_FLOAT_MAT4x3;
- case SLANG_SPEC_SAMPLER1D:
+ case SLANG_SPEC_SAMPLER_1D:
return GL_SAMPLER_1D;
- case SLANG_SPEC_SAMPLER2D:
+ case SLANG_SPEC_SAMPLER_2D:
return GL_SAMPLER_2D;
- case SLANG_SPEC_SAMPLER3D:
+ case SLANG_SPEC_SAMPLER_3D:
return GL_SAMPLER_3D;
- case SLANG_SPEC_SAMPLERCUBE:
+ case SLANG_SPEC_SAMPLER_CUBE:
return GL_SAMPLER_CUBE;
- case SLANG_SPEC_SAMPLER1DSHADOW:
+ case SLANG_SPEC_SAMPLER_1D_SHADOW:
return GL_SAMPLER_1D_SHADOW;
- case SLANG_SPEC_SAMPLER2DSHADOW:
+ case SLANG_SPEC_SAMPLER_2D_SHADOW:
return GL_SAMPLER_2D_SHADOW;
- case SLANG_SPEC_SAMPLER2DRECT:
+ case SLANG_SPEC_SAMPLER_RECT:
return GL_SAMPLER_2D_RECT_ARB;
- case SLANG_SPEC_SAMPLER2DRECTSHADOW:
+ case SLANG_SPEC_SAMPLER_RECT_SHADOW:
return GL_SAMPLER_2D_RECT_SHADOW_ARB;
+ case SLANG_SPEC_SAMPLER_1D_ARRAY:
+ return GL_SAMPLER_1D_ARRAY_EXT;
+ case SLANG_SPEC_SAMPLER_2D_ARRAY:
+ return GL_SAMPLER_2D_ARRAY_EXT;
+ case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW:
+ return GL_SAMPLER_1D_ARRAY_SHADOW_EXT;
+ case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW:
+ return GL_SAMPLER_2D_ARRAY_SHADOW_EXT;
case SLANG_SPEC_ARRAY:
return _slang_gltype_from_specifier(type->_array);
case SLANG_SPEC_STRUCT:
SLANG_SPEC_MAT42,
SLANG_SPEC_MAT34,
SLANG_SPEC_MAT43,
- SLANG_SPEC_SAMPLER1D,
- SLANG_SPEC_SAMPLER2D,
- SLANG_SPEC_SAMPLER3D,
- SLANG_SPEC_SAMPLERCUBE,
- SLANG_SPEC_SAMPLER2DRECT,
- SLANG_SPEC_SAMPLER1DSHADOW,
- SLANG_SPEC_SAMPLER2DSHADOW,
- SLANG_SPEC_SAMPLER2DRECTSHADOW,
+ SLANG_SPEC_SAMPLER_1D,
+ SLANG_SPEC_SAMPLER_2D,
+ SLANG_SPEC_SAMPLER_3D,
+ SLANG_SPEC_SAMPLER_CUBE,
+ SLANG_SPEC_SAMPLER_RECT,
+ SLANG_SPEC_SAMPLER_1D_SHADOW,
+ SLANG_SPEC_SAMPLER_2D_SHADOW,
+ SLANG_SPEC_SAMPLER_RECT_SHADOW,
+ SLANG_SPEC_SAMPLER_1D_ARRAY,
+ SLANG_SPEC_SAMPLER_2D_ARRAY,
+ SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW,
+ SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW,
SLANG_SPEC_STRUCT,
SLANG_SPEC_ARRAY
} slang_type_specifier_type;