[Mesa-dev] [PATCH 02/11] tgsi/ureg: allow any register file in address operands

Marek Olšák maraeo at gmail.com
Fri Sep 29 12:25:25 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/auxiliary/tgsi/tgsi_ureg.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index ed8c177..e88c2c1 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -898,33 +898,31 @@ ureg_saturate( struct ureg_dst reg )
 {
    assert(reg.File != TGSI_FILE_NULL);
    reg.Saturate = 1;
    return reg;
 }
 
 static inline struct ureg_dst 
 ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr )
 {
    assert(reg.File != TGSI_FILE_NULL);
-   assert(addr.File == TGSI_FILE_ADDRESS || addr.File == TGSI_FILE_TEMPORARY);
    reg.Indirect = 1;
    reg.IndirectFile = addr.File;
    reg.IndirectIndex = addr.Index;
    reg.IndirectSwizzle = addr.SwizzleX;
    return reg;
 }
 
 static inline struct ureg_src 
 ureg_src_indirect( struct ureg_src reg, struct ureg_src addr )
 {
    assert(reg.File != TGSI_FILE_NULL);
-   assert(addr.File == TGSI_FILE_ADDRESS || addr.File == TGSI_FILE_TEMPORARY);
    reg.Indirect = 1;
    reg.IndirectFile = addr.File;
    reg.IndirectIndex = addr.Index;
    reg.IndirectSwizzle = addr.SwizzleX;
    return reg;
 }
 
 static inline struct ureg_dst
 ureg_dst_dimension( struct ureg_dst reg, int index )
 {
@@ -1018,24 +1016,20 @@ ureg_dst_register(unsigned file,
                   unsigned index)
 {
    return ureg_dst_array_register(file, index, 0);
 }
 
 static inline struct ureg_dst
 ureg_dst( struct ureg_src src )
 {
    struct ureg_dst dst;
 
-   assert(!src.Indirect ||
-          (src.IndirectFile == TGSI_FILE_ADDRESS ||
-           src.IndirectFile == TGSI_FILE_TEMPORARY));
-
    dst.File      = src.File;
    dst.WriteMask = TGSI_WRITEMASK_XYZW;
    dst.IndirectFile = src.IndirectFile;
    dst.Indirect  = src.Indirect;
    dst.IndirectIndex = src.IndirectIndex;
    dst.IndirectSwizzle = src.IndirectSwizzle;
    dst.Saturate  = 0;
    dst.Index     = src.Index;
    dst.Dimension = src.Dimension;
    dst.DimensionIndex = src.DimensionIndex;
-- 
2.7.4



More information about the mesa-dev mailing list