Merge commit 'origin/master' into gallium-0.2
Conflicts: src/mesa/glapi/glapi_getproc.c src/mesa/main/image.c src/mesa/shader/slang/slang_link.c
This commit is contained in:
commit
2cb3d2b7a0
|
@ -557,6 +557,11 @@ struct brw_context
|
||||||
|
|
||||||
GLfloat *last_buf;
|
GLfloat *last_buf;
|
||||||
GLuint last_bufsz;
|
GLuint last_bufsz;
|
||||||
|
/**
|
||||||
|
* Whether we should create a new bo instead of reusing the old one
|
||||||
|
* (if we just dispatch the batch pointing at the old one.
|
||||||
|
*/
|
||||||
|
GLboolean need_new_bo;
|
||||||
} curbe;
|
} curbe;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -282,7 +282,8 @@ static void prepare_constant_buffer(struct brw_context *brw)
|
||||||
brw->curbe.last_bufsz = bufsz;
|
brw->curbe.last_bufsz = bufsz;
|
||||||
|
|
||||||
if (brw->curbe.curbe_bo != NULL &&
|
if (brw->curbe.curbe_bo != NULL &&
|
||||||
brw->curbe.curbe_next_offset + bufsz > brw->curbe.curbe_bo->size)
|
(brw->curbe.need_new_bo ||
|
||||||
|
brw->curbe.curbe_next_offset + bufsz > brw->curbe.curbe_bo->size))
|
||||||
{
|
{
|
||||||
dri_bo_unreference(brw->curbe.curbe_bo);
|
dri_bo_unreference(brw->curbe.curbe_bo);
|
||||||
brw->curbe.curbe_bo = NULL;
|
brw->curbe.curbe_bo = NULL;
|
||||||
|
|
|
@ -156,11 +156,13 @@ static void brw_emit_prim( struct brw_context *brw,
|
||||||
static void brw_merge_inputs( struct brw_context *brw,
|
static void brw_merge_inputs( struct brw_context *brw,
|
||||||
const struct gl_client_array *arrays[])
|
const struct gl_client_array *arrays[])
|
||||||
{
|
{
|
||||||
struct brw_vertex_element *inputs = brw->vb.inputs;
|
|
||||||
struct brw_vertex_info old = brw->vb.info;
|
struct brw_vertex_info old = brw->vb.info;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
memset(inputs, 0, sizeof(*inputs));
|
for (i = 0; i < VERT_ATTRIB_MAX; i++)
|
||||||
|
dri_bo_unreference(brw->vb.inputs[i].bo);
|
||||||
|
|
||||||
|
memset(&brw->vb.inputs, 0, sizeof(brw->vb.inputs));
|
||||||
memset(&brw->vb.info, 0, sizeof(brw->vb.info));
|
memset(&brw->vb.info, 0, sizeof(brw->vb.info));
|
||||||
|
|
||||||
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
|
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
|
||||||
|
@ -171,7 +173,8 @@ static void brw_merge_inputs( struct brw_context *brw,
|
||||||
if (arrays[i]->StrideB != 0)
|
if (arrays[i]->StrideB != 0)
|
||||||
brw->vb.info.varying |= 1 << i;
|
brw->vb.info.varying |= 1 << i;
|
||||||
|
|
||||||
brw->vb.info.sizes[i/16] |= (inputs[i].glarray->Size - 1) << ((i%16) * 2);
|
brw->vb.info.sizes[i/16] |= (brw->vb.inputs[i].glarray->Size - 1) <<
|
||||||
|
((i%16) * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -455,12 +455,6 @@ static void brw_emit_vertices(struct brw_context *brw)
|
||||||
input->offset);
|
input->offset);
|
||||||
OUT_BATCH(brw->vb.max_index);
|
OUT_BATCH(brw->vb.max_index);
|
||||||
OUT_BATCH(0); /* Instance data step rate */
|
OUT_BATCH(0); /* Instance data step rate */
|
||||||
|
|
||||||
/* Unreference the buffer so it can get freed, now that we won't
|
|
||||||
* touch it any more.
|
|
||||||
*/
|
|
||||||
dri_bo_unreference(input->bo);
|
|
||||||
input->bo = NULL;
|
|
||||||
}
|
}
|
||||||
ADVANCE_BATCH();
|
ADVANCE_BATCH();
|
||||||
|
|
||||||
|
|
|
@ -97,8 +97,7 @@ static void brw_new_batch( struct intel_context *intel )
|
||||||
/* Check that we didn't just wrap our batchbuffer at a bad time. */
|
/* Check that we didn't just wrap our batchbuffer at a bad time. */
|
||||||
assert(!brw->no_batch_wrap);
|
assert(!brw->no_batch_wrap);
|
||||||
|
|
||||||
dri_bo_unreference(brw->curbe.curbe_bo);
|
brw->curbe.need_new_bo = GL_TRUE;
|
||||||
brw->curbe.curbe_bo = NULL;
|
|
||||||
|
|
||||||
/* Mark all context state as needing to be re-emitted.
|
/* Mark all context state as needing to be re-emitted.
|
||||||
* This is probably not as severe as on 915, since almost all of our state
|
* This is probably not as severe as on 915, since almost all of our state
|
||||||
|
|
|
@ -32,8 +32,10 @@
|
||||||
#include "main/macros.h"
|
#include "main/macros.h"
|
||||||
#include "main/bufferobj.h"
|
#include "main/bufferobj.h"
|
||||||
#include "main/teximage.h"
|
#include "main/teximage.h"
|
||||||
|
#include "main/texenv.h"
|
||||||
#include "main/texobj.h"
|
#include "main/texobj.h"
|
||||||
#include "main/texstate.h"
|
#include "main/texstate.h"
|
||||||
|
#include "main/texparam.h"
|
||||||
#include "main/matrix.h"
|
#include "main/matrix.h"
|
||||||
#include "main/varray.h"
|
#include "main/varray.h"
|
||||||
#include "main/attrib.h"
|
#include "main/attrib.h"
|
||||||
|
|
Loading…
Reference in New Issue