Mesa (gallium-0.1): tgsi: Ensure ureg inputs match the processor.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu Aug 27 14:07:23 UTC 2009


Module: Mesa
Branch: gallium-0.1
Commit: b5fa9ddd0f3fb861305dc9c4265ee8183c4b538d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b5fa9ddd0f3fb861305dc9c4265ee8183c4b538d

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu Aug 27 15:07:21 2009 +0100

tgsi: Ensure ureg inputs match the processor.

---

 src/gallium/auxiliary/tgsi/tgsi_ureg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 3dc0fec..11d9aaa 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -254,6 +254,7 @@ ureg_DECL_fs_input( struct ureg_program *ureg,
                     unsigned index,
                     unsigned interp )
 {
+   assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT);
    return ureg_DECL_input( ureg, name, index, interp );
 }
 
@@ -263,6 +264,7 @@ ureg_DECL_vs_input( struct ureg_program *ureg,
                     unsigned name,
                     unsigned index )
 {
+   assert(ureg->processor == TGSI_PROCESSOR_VERTEX);
    return ureg_DECL_input( ureg, name, index, TGSI_INTERPOLATE_CONSTANT );
 }
 




More information about the mesa-commit mailing list