struct tgsi_declaration_sampler_view dsv;
dsv.Resource = TGSI_TEXTURE_BUFFER;
- dsv.ReturnTypeX = PIPE_TYPE_UNORM;
- dsv.ReturnTypeY = PIPE_TYPE_UNORM;
- dsv.ReturnTypeZ = PIPE_TYPE_UNORM;
- dsv.ReturnTypeW = PIPE_TYPE_UNORM;
+ dsv.ReturnTypeX = TGSI_RETURN_TYPE_UNORM;
+ dsv.ReturnTypeY = TGSI_RETURN_TYPE_UNORM;
+ dsv.ReturnTypeZ = TGSI_RETURN_TYPE_UNORM;
+ dsv.ReturnTypeW = TGSI_RETURN_TYPE_UNORM;
return dsv;
}
if ((decl->SamplerView.ReturnTypeX == decl->SamplerView.ReturnTypeY) &&
(decl->SamplerView.ReturnTypeX == decl->SamplerView.ReturnTypeZ) &&
(decl->SamplerView.ReturnTypeX == decl->SamplerView.ReturnTypeW)) {
- ENM(decl->SamplerView.ReturnTypeX, tgsi_type_names);
+ ENM(decl->SamplerView.ReturnTypeX, tgsi_return_type_names);
} else {
- ENM(decl->SamplerView.ReturnTypeX, tgsi_type_names);
+ ENM(decl->SamplerView.ReturnTypeX, tgsi_return_type_names);
TXT(", ");
- ENM(decl->SamplerView.ReturnTypeY, tgsi_type_names);
+ ENM(decl->SamplerView.ReturnTypeY, tgsi_return_type_names);
TXT(", ");
- ENM(decl->SamplerView.ReturnTypeZ, tgsi_type_names);
+ ENM(decl->SamplerView.ReturnTypeZ, tgsi_return_type_names);
TXT(", ");
- ENM(decl->SamplerView.ReturnTypeW, tgsi_type_names);
+ ENM(decl->SamplerView.ReturnTypeW, tgsi_return_type_names);
}
}
"VS_POSITION_WINDOW_SPACE"
};
-const char *tgsi_type_names[5] =
+const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT] =
{
"UNORM",
"SNORM",
STATIC_ASSERT(Elements(tgsi_property_names) == TGSI_PROPERTY_COUNT);
STATIC_ASSERT(Elements(tgsi_primitive_names) == PIPE_PRIM_MAX);
STATIC_ASSERT(Elements(tgsi_interpolate_names) == TGSI_INTERPOLATE_COUNT);
+ STATIC_ASSERT(Elements(tgsi_return_type_names) == TGSI_RETURN_TYPE_COUNT);
(void) tgsi_processor_type_names;
- (void) tgsi_type_names;
+ (void) tgsi_return_type_names;
(void) tgsi_immediate_type_names;
(void) tgsi_fs_coord_origin_names;
(void) tgsi_fs_coord_pixel_center_names;
extern const char *tgsi_property_names[TGSI_PROPERTY_COUNT];
-extern const char *tgsi_type_names[5];
+extern const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT];
extern const char *tgsi_interpolate_names[TGSI_INTERPOLATE_COUNT];
++cur;
eat_opt_white( &cur );
for (j = 0; j < 4; ++j) {
- for (i = 0; i < PIPE_TYPE_COUNT; ++i) {
- if (str_match_nocase_whole(&cur, tgsi_type_names[i])) {
+ for (i = 0; i < TGSI_RETURN_TYPE_COUNT; ++i) {
+ if (str_match_nocase_whole(&cur, tgsi_return_type_names[i])) {
switch (j) {
case 0:
decl.SamplerView.ReturnTypeX = i;
break;
}
}
- if (i == PIPE_TYPE_COUNT) {
+ if (i == TGSI_RETURN_TYPE_COUNT) {
if (j == 0 || j > 2) {
report_error(ctx, "Expected type name");
return FALSE;
#include "p_config.h"
-enum pipe_type {
- PIPE_TYPE_UNORM = 0,
- PIPE_TYPE_SNORM,
- PIPE_TYPE_SINT,
- PIPE_TYPE_UINT,
- PIPE_TYPE_FLOAT,
- PIPE_TYPE_COUNT
-};
-
/**
* Texture/surface image formats (preliminary)
*/
unsigned Padding : 22;
};
+enum tgsi_return_type {
+ TGSI_RETURN_TYPE_UNORM = 0,
+ TGSI_RETURN_TYPE_SNORM,
+ TGSI_RETURN_TYPE_SINT,
+ TGSI_RETURN_TYPE_UINT,
+ TGSI_RETURN_TYPE_FLOAT,
+ TGSI_RETURN_TYPE_COUNT
+};
+
struct tgsi_declaration_sampler_view {
unsigned Resource : 8; /**< one of TGSI_TEXTURE_ */
- unsigned ReturnTypeX : 6; /**< one of enum pipe_type */
- unsigned ReturnTypeY : 6; /**< one of enum pipe_type */
- unsigned ReturnTypeZ : 6; /**< one of enum pipe_type */
- unsigned ReturnTypeW : 6; /**< one of enum pipe_type */
+ unsigned ReturnTypeX : 6; /**< one of enum tgsi_return_type */
+ unsigned ReturnTypeY : 6; /**< one of enum tgsi_return_type */
+ unsigned ReturnTypeZ : 6; /**< one of enum tgsi_return_type */
+ unsigned ReturnTypeW : 6; /**< one of enum tgsi_return_type */
};
struct tgsi_declaration_array {