projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76f95ba
)
svga: replace out-of-temps assertion with debug warning
author
Brian Paul
<brianp@vmware.com>
Mon, 10 Feb 2014 23:12:32 +0000
(16:12 -0700)
committer
Brian Paul
<brianp@vmware.com>
Wed, 12 Feb 2014 18:21:46 +0000
(11:21 -0700)
Signed-off-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/svga/svga_tgsi_insn.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/svga/svga_tgsi_insn.c
b/src/gallium/drivers/svga/svga_tgsi_insn.c
index 4d78e96375cf756282913affb988caf6854b77d0..73303e352225ebb84518dcfacac327985736258b 100644
(file)
--- a/
src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/
src/gallium/drivers/svga/svga_tgsi_insn.c
@@
-287,8
+287,10
@@
static SVGA3dShaderDestToken
get_temp( struct svga_shader_emitter *emit )
{
int i = emit->nr_hw_temp + emit->internal_temp_count++;
- assert(i < SVGA3D_TEMPREG_MAX);
- i = MIN2(i, SVGA3D_TEMPREG_MAX - 1);
+ if (i >= SVGA3D_TEMPREG_MAX) {
+ debug_warn_once("svga: Too many temporary registers used in shader\n");
+ i = SVGA3D_TEMPREG_MAX - 1;
+ }
return dst_register( SVGA3DREG_TEMP, i );
}