Mesa (master): gallium/tgsi: shuffle ureg_src structure to work around gcc4 .6.0 issue
Jerome Glisse
glisse at kemper.freedesktop.org
Fri Feb 25 17:44:54 UTC 2011
Module: Mesa
Branch: master
Commit: b0e8aec5ab7f0e81dc0ea6c79ac7db2cca4788ed
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b0e8aec5ab7f0e81dc0ea6c79ac7db2cca4788ed
Author: Jerome Glisse <jglisse at redhat.com>
Date: Fri Feb 25 11:56:29 2011 -0500
gallium/tgsi: shuffle ureg_src structure to work around gcc4.6.0 issue
There is an issue with gcc 4.6.0 that leads to segfault/assert with mesa
due to ureg_src size, reshuffling the structure member to better better
alignment work around the issue.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47893
7.9 + 7.10 candidate
Signed-off-by: Jerome Glisse <jglisse at redhat.com>
---
src/gallium/auxiliary/tgsi/tgsi_ureg.h | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index b8d193f..9d5553f 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -43,24 +43,24 @@ struct ureg_program;
*/
struct ureg_src
{
- unsigned File : 4; /* TGSI_FILE_ */
- unsigned SwizzleX : 2; /* TGSI_SWIZZLE_ */
- unsigned SwizzleY : 2; /* TGSI_SWIZZLE_ */
- unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_ */
- unsigned SwizzleW : 2; /* TGSI_SWIZZLE_ */
- unsigned Indirect : 1; /* BOOL */
- unsigned DimIndirect : 1; /* BOOL */
- unsigned Dimension : 1; /* BOOL */
- unsigned Absolute : 1; /* BOOL */
- unsigned Negate : 1; /* BOOL */
- int Index : 16; /* SINT */
+ unsigned File : 4; /* TGSI_FILE_ */
+ unsigned SwizzleX : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleY : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_ */
+ unsigned SwizzleW : 2; /* TGSI_SWIZZLE_ */
+ unsigned Indirect : 1; /* BOOL */
+ unsigned DimIndirect : 1; /* BOOL */
+ unsigned Dimension : 1; /* BOOL */
+ unsigned Absolute : 1; /* BOOL */
+ unsigned Negate : 1; /* BOOL */
unsigned IndirectFile : 4; /* TGSI_FILE_ */
- int IndirectIndex : 16; /* SINT */
unsigned IndirectSwizzle : 2; /* TGSI_SWIZZLE_ */
- int DimensionIndex : 16; /* SINT */
unsigned DimIndFile : 4; /* TGSI_FILE_ */
- int DimIndIndex : 16; /* SINT */
unsigned DimIndSwizzle : 2; /* TGSI_SWIZZLE_ */
+ int Index : 16; /* SINT */
+ int IndirectIndex : 16; /* SINT */
+ int DimensionIndex : 16; /* SINT */
+ int DimIndIndex : 16; /* SINT */
};
/* Very similar to a tgsi_dst_register, removing unsupported fields
More information about the mesa-commit
mailing list