Skip to content
Snippets Groups Projects
Commit 23d4ff53 authored by Brian Paul's avatar Brian Paul
Browse files

svga: replace out-of-temps assertion with debug warning


Signed-off-by: default avatarBrian Paul <brianp@vmware.com>
parent 76f95ba2
No related merge requests found
......@@ -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 );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment