r600: fix blender picking.
This fixes the sw fallback for GL_SELECT picking modes. Fixes object picking blender + depthpick test http://bugs.freedesktop.org/show_bug.cgi?id=26419 Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
80f3cc36c5
commit
8bf5c229f3
|
@ -829,11 +829,10 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
|
||||||
|
|
||||||
#if MESA_BIG_ENDIAN
|
#if MESA_BIG_ENDIAN
|
||||||
if (mesa_ind_buf->type == GL_UNSIGNED_INT)
|
if (mesa_ind_buf->type == GL_UNSIGNED_INT)
|
||||||
{
|
|
||||||
#else
|
#else
|
||||||
if (mesa_ind_buf->type != GL_UNSIGNED_BYTE)
|
if (mesa_ind_buf->type != GL_UNSIGNED_BYTE)
|
||||||
{
|
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
const GLvoid *src_ptr;
|
const GLvoid *src_ptr;
|
||||||
GLvoid *dst_ptr;
|
GLvoid *dst_ptr;
|
||||||
GLboolean mapped_named_bo = GL_FALSE;
|
GLboolean mapped_named_bo = GL_FALSE;
|
||||||
|
@ -872,6 +871,14 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GLboolean check_fallbacks(GLcontext *ctx)
|
||||||
|
{
|
||||||
|
if (ctx->RenderMode != GL_RENDER)
|
||||||
|
return GL_TRUE;
|
||||||
|
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static GLboolean r700TryDrawPrims(GLcontext *ctx,
|
static GLboolean r700TryDrawPrims(GLcontext *ctx,
|
||||||
const struct gl_client_array *arrays[],
|
const struct gl_client_array *arrays[],
|
||||||
const struct _mesa_prim *prim,
|
const struct _mesa_prim *prim,
|
||||||
|
@ -888,6 +895,9 @@ static GLboolean r700TryDrawPrims(GLcontext *ctx,
|
||||||
if (ctx->NewState)
|
if (ctx->NewState)
|
||||||
_mesa_update_state( ctx );
|
_mesa_update_state( ctx );
|
||||||
|
|
||||||
|
if (check_fallbacks(ctx))
|
||||||
|
return GL_FALSE;
|
||||||
|
|
||||||
_tnl_UpdateFixedFunctionProgram(ctx);
|
_tnl_UpdateFixedFunctionProgram(ctx);
|
||||||
r700SetVertexFormat(ctx, arrays, max_index + 1);
|
r700SetVertexFormat(ctx, arrays, max_index + 1);
|
||||||
/* shaders need to be updated before buffers are validated */
|
/* shaders need to be updated before buffers are validated */
|
||||||
|
@ -983,8 +993,10 @@ static void r700DrawPrims(GLcontext *ctx,
|
||||||
retval = r700TryDrawPrims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
|
retval = r700TryDrawPrims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
|
||||||
|
|
||||||
/* If failed run tnl pipeline - it should take care of fallbacks */
|
/* If failed run tnl pipeline - it should take care of fallbacks */
|
||||||
if (!retval)
|
if (!retval) {
|
||||||
|
_swsetup_Wakeup(ctx);
|
||||||
_tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
|
_tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void r700InitDraw(GLcontext *ctx)
|
void r700InitDraw(GLcontext *ctx)
|
||||||
|
|
Loading…
Reference in New Issue