Various warning fixes for i965 driver.

vertex/fragment programs provided as const.
bmSetFenceLock should return bmSetFence value.
This commit is contained in:
Keith Packard 2007-01-06 17:13:45 -08:00
parent 9311c29558
commit 62db3cc349
5 changed files with 9 additions and 8 deletions

View file

@ -505,8 +505,8 @@ struct brw_context
/* Active vertex program:
*/
struct gl_vertex_program *vertex_program;
struct gl_fragment_program *fragment_program;
const struct gl_vertex_program *vertex_program;
const struct gl_fragment_program *fragment_program;
/* For populating the gtt:

View file

@ -492,8 +492,7 @@ static void meta_draw_quad(struct intel_context *intel,
}
static void install_meta_state( struct intel_context *intel,
GLenum state )
static void install_meta_state( struct intel_context *intel )
{
GLcontext *ctx = &intel->ctx;
struct brw_context *brw = brw_context(ctx);

View file

@ -114,7 +114,7 @@ static GLuint translate_texgen( GLboolean enabled, GLenum mode )
static void make_state_key( GLcontext *ctx, struct state_key *key )
{
struct brw_context *brw = brw_context(ctx);
struct gl_fragment_program *fp = brw->fragment_program;
const struct gl_fragment_program *fp = brw->fragment_program;
GLuint i;
/* This now relies on texenvprogram.c being active:
@ -1628,7 +1628,7 @@ const struct brw_tracked_state brw_tnl_vertprog = {
static void update_active_vertprog( struct brw_context *brw )
{
struct gl_vertex_program *prev = brw->vertex_program;
const struct gl_vertex_program *prev = brw->vertex_program;
/* NEW_PROGRAM */
if (brw->attribs.VertexProgram->_Enabled) {

View file

@ -122,7 +122,7 @@ static void upload_wm_unit(struct brw_context *brw )
/* BRW_NEW_FRAGMENT_PROGRAM */
{
struct gl_fragment_program *fp = brw->fragment_program;
const struct gl_fragment_program *fp = brw->fragment_program;
if (fp->Base.InputsRead & (1<<FRAG_ATTRIB_WPOS))
wm.wm5.program_uses_depth = 1; /* as far as we can tell */

View file

@ -1329,9 +1329,11 @@ unsigned bmSetFence( struct intel_context *intel )
unsigned bmSetFenceLock( struct intel_context *intel )
{
unsigned last;
LOCK(intel->bm);
bmSetFence(intel);
last = bmSetFence(intel);
UNLOCK(intel->bm);
return last;
}
unsigned bmLockAndFence( struct intel_context *intel )
{