[virglrenderer-devel] [PATCH 2/4] scan: add ability to find dimension files
Dave Airlie
airlied at gmail.com
Thu May 10 03:44:32 UTC 2018
From: Dave Airlie <airlied at redhat.com>
This adds the ability for the scanner to locate files
that need dimensions.
---
src/gallium/auxiliary/tgsi/tgsi_scan.c | 5 +++++
src/gallium/auxiliary/tgsi/tgsi_scan.h | 2 ++
2 files changed, 7 insertions(+)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index e04f407..40f3db8 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -203,6 +203,9 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
info->indirect_files_read |= (1 << src->Register.File);
}
+ if (src->Register.Dimension && src->Dimension.Indirect) {
+ info->dimension_indirect_files |= (1 << src->Register.File);
+ }
/* MSAA samplers */
if (src->Register.File == TGSI_FILE_SAMPLER) {
assert(fullinst->Instruction.Texture);
@@ -223,6 +226,8 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
info->indirect_files |= (1 << dst->Register.File);
info->indirect_files_written |= (1 << dst->Register.File);
}
+ if (dst->Register.Dimension && dst->Dimension.Indirect)
+ info->dimension_indirect_files |= (1 << dst->Register.File);
}
info->num_instructions++;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
index 7e9a559..0849add 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -125,6 +125,8 @@ struct tgsi_shader_info
unsigned indirect_files_read;
unsigned indirect_files_written;
+ unsigned dimension_indirect_files;
+
unsigned properties[TGSI_PROPERTY_COUNT]; /* index with TGSI_PROPERTY_ */
/**
--
2.14.3
More information about the virglrenderer-devel
mailing list