Mesa (9.0): draw: fix assertion failure in draw_emit_vertex_attr
Marek Olšák
mareko at kemper.freedesktop.org
Fri Nov 23 01:01:35 UTC 2012
Module: Mesa
Branch: 9.0
Commit: de5e3774d04da66dbf85ca0705de38b7942943fe
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=de5e3774d04da66dbf85ca0705de38b7942943fe
Author: Marek Olšák <maraeo at gmail.com>
Date: Tue Oct 30 01:07:17 2012 +0100
draw: fix assertion failure in draw_emit_vertex_attr
This is a regression since b3921e1f53833420e0a0fd581f7417.
The array stores VS outputs, not FS inputs.
Now llvmpipe can do 32 varyings too.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit 183e122bdfe27f875c3c121964484dae9587c051)
---
src/gallium/auxiliary/draw/draw_vertex.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/draw/draw_vertex.h b/src/gallium/auxiliary/draw/draw_vertex.h
index e63cf5f..c87c3d8 100644
--- a/src/gallium/auxiliary/draw/draw_vertex.h
+++ b/src/gallium/auxiliary/draw/draw_vertex.h
@@ -42,6 +42,7 @@
#include "pipe/p_compiler.h"
#include "pipe/p_state.h"
#include "util/u_debug.h"
+#include "util/u_memory.h"
/**
@@ -87,7 +88,7 @@ struct vertex_info
unsigned interp_mode:4; /**< INTERP_x */
unsigned emit:4; /**< EMIT_x */
unsigned src_index:8; /**< map to post-xform attribs */
- } attrib[PIPE_MAX_SHADER_INPUTS];
+ } attrib[PIPE_MAX_SHADER_OUTPUTS];
};
static INLINE size_t
@@ -127,7 +128,7 @@ draw_emit_vertex_attr(struct vertex_info *vinfo,
uint src_index)
{
const uint n = vinfo->num_attribs;
- assert(n < PIPE_MAX_SHADER_INPUTS);
+ assert(n < Elements(vinfo->attrib));
vinfo->attrib[n].emit = emit;
vinfo->attrib[n].interp_mode = interp;
vinfo->attrib[n].src_index = src_index;
More information about the mesa-commit
mailing list