diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_build.c | 4 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_dump.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_text.c | 20 |
3 files changed, 24 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c index 1bcdef2e2f2..2945a0d63e7 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_build.c +++ b/src/gallium/auxiliary/tgsi/tgsi_build.c @@ -257,12 +257,14 @@ tgsi_default_declaration_resource(void) struct tgsi_declaration_resource dr; dr.Resource = TGSI_BUFFER; + dr.Raw = 0; return dr; } static struct tgsi_declaration_resource tgsi_build_declaration_resource(unsigned texture, + unsigned raw, struct tgsi_declaration *declaration, struct tgsi_header *header) { @@ -270,6 +272,7 @@ tgsi_build_declaration_resource(unsigned texture, dr = tgsi_default_declaration_resource(); dr.Resource = texture; + dr.Raw = raw; declaration_grow(declaration, header); @@ -439,6 +442,7 @@ tgsi_build_full_declaration( size++; *dr = tgsi_build_declaration_resource(full_decl->Resource.Resource, + full_decl->Resource.Raw, declaration, header); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index 328dfb14f6d..f48e3907c31 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -285,6 +285,8 @@ iter_declaration( if (decl->Declaration.File == TGSI_FILE_RESOURCE) { TXT(", "); ENM(decl->Resource.Resource, tgsi_texture_names); + if (decl->Resource.Raw) + TXT(", RAW"); } if (decl->Declaration.File == TGSI_FILE_SAMPLER_VIEW) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index 04862759b7f..ad9b304f090 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -1015,7 +1015,7 @@ static boolean parse_declaration( struct translate_ctx *ctx ) struct parsed_dcl_bracket brackets[2]; int num_brackets; uint writemask; - const char *cur; + const char *cur, *cur2; uint advance; boolean is_vs_input; boolean is_imm_array; @@ -1069,6 +1069,22 @@ static boolean parse_declaration( struct translate_ctx *ctx ) return FALSE; } + cur2 = cur; + eat_opt_white(&cur2); + while (*cur2 == ',') { + cur2++; + eat_opt_white(&cur2); + if (str_match_no_case(&cur2, "RAW") && + !is_digit_alpha_underscore(cur2)) { + decl.Resource.Raw = 1; + + } else { + break; + } + cur = cur2; + eat_opt_white(&cur2); + } + ctx->cur = cur; } else if (file == TGSI_FILE_SAMPLER_VIEW) { @@ -1122,7 +1138,7 @@ static boolean parse_declaration( struct translate_ctx *ctx ) } break; } else { - const char *cur2 = cur; + cur2 = cur; eat_opt_white( &cur2 ); if (*cur2 == ',') { cur2++; |