From cd3ef7592cc9e2c83b175a8652c0153c578fb46b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 16 Jul 2010 04:21:11 +0800 Subject: gallium: Use unified pipe_context::draw_vbo. Update u_draw_quad, st/vega, and st/mesa to use pipe_context::draw_vbo. --- src/mesa/state_tracker/st_draw.c | 169 ++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 100 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 5821da4889..5b05489270 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -58,6 +58,7 @@ #include "util/u_inlines.h" #include "util/u_format.h" #include "util/u_prim.h" +#include "util/u_draw_quad.h" #include "draw/draw_context.h" #include "cso_cache/cso_context.h" @@ -494,6 +495,49 @@ setup_non_interleaved_attribs(GLcontext *ctx, } +static void +setup_index_buffer(GLcontext *ctx, + const struct _mesa_index_buffer *ib, + struct pipe_index_buffer *ibuffer) +{ + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; + + memset(ibuffer, 0, sizeof(*ibuffer)); + if (ib) { + struct gl_buffer_object *bufobj = ib->obj; + + switch (ib->type) { + case GL_UNSIGNED_INT: + ibuffer->index_size = 4; + break; + case GL_UNSIGNED_SHORT: + ibuffer->index_size = 2; + break; + case GL_UNSIGNED_BYTE: + ibuffer->index_size = 1; + break; + default: + assert(0); + return; + } + + /* get/create the index buffer object */ + if (bufobj && bufobj->Name) { + /* elements/indexes are in a real VBO */ + struct st_buffer_object *stobj = st_buffer_object(bufobj); + pipe_resource_reference(&ibuffer->buffer, stobj->buffer); + ibuffer->offset = pointer_to_offset(ib->ptr); + } + else { + /* element/indicies are in user space memory */ + ibuffer->buffer = + pipe_user_buffer_create(pipe->screen, (void *) ib->ptr, + ib->count * ibuffer->index_size, + PIPE_BIND_INDEX_BUFFER); + } + } +} /** * Prior to drawing, check that any uniforms referenced by the @@ -568,8 +612,11 @@ st_draw_vbo(GLcontext *ctx, GLuint attr; struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS]; unsigned num_vbuffers, num_velements; + struct pipe_index_buffer ibuffer; GLboolean userSpace = GL_FALSE; GLboolean vertDataEdgeFlags; + struct pipe_draw_info info; + unsigned i; /* Mesa core state should have been validated already */ assert(ctx->NewState == 0x0); @@ -647,113 +694,35 @@ st_draw_vbo(GLcontext *ctx, if (num_vbuffers == 0 || num_velements == 0) return; - /* do actual drawing */ - if (ib) { - /* indexed primitive */ - struct gl_buffer_object *bufobj = ib->obj; - struct pipe_resource *indexBuf = NULL; - unsigned indexSize, indexOffset, i; + setup_index_buffer(ctx, ib, &ibuffer); + pipe->set_index_buffer(pipe, &ibuffer); - switch (ib->type) { - case GL_UNSIGNED_INT: - indexSize = 4; - break; - case GL_UNSIGNED_SHORT: - indexSize = 2; - break; - case GL_UNSIGNED_BYTE: - indexSize = 1; - break; - default: - assert(0); - return; - } - - /* get/create the index buffer object */ - if (bufobj && bufobj->Name) { - /* elements/indexes are in a real VBO */ - struct st_buffer_object *stobj = st_buffer_object(bufobj); - pipe_resource_reference(&indexBuf, stobj->buffer); - indexOffset = pointer_to_offset(ib->ptr) / indexSize; - } - else { - /* element/indicies are in user space memory */ - indexBuf = pipe_user_buffer_create(pipe->screen, (void *) ib->ptr, - ib->count * indexSize, - PIPE_BIND_INDEX_BUFFER); - indexOffset = 0; + util_draw_init_info(&info); + if (ib) { + info.indexed = TRUE; + if (min_index != ~0 && max_index != ~0) { + info.min_index = min_index; + info.max_index = max_index; } + } - /* draw */ - if (pipe->draw_range_elements && min_index != ~0 && max_index != ~0) { - /* XXX: exercise temporary path to pass min/max directly - * through to driver & draw module. These interfaces still - * need a bit of work... - */ - for (i = 0; i < nr_prims; i++) { - unsigned vcount = prims[i].count; - unsigned prim = translate_prim(ctx, prims[i].mode); - - if (u_trim_pipe_prim(prims[i].mode, &vcount)) { - pipe->draw_range_elements(pipe, indexBuf, indexSize, - prims[i].basevertex, - min_index, max_index, prim, - prims[i].start + indexOffset, vcount); - } - } - } - else { - for (i = 0; i < nr_prims; i++) { - unsigned vcount = prims[i].count; - unsigned prim = translate_prim(ctx, prims[i].mode); - - if (u_trim_pipe_prim(prims[i].mode, &vcount)) { - if (prims[i].num_instances == 1) { - pipe->draw_elements(pipe, indexBuf, - indexSize, - prims[i].basevertex, - prim, - prims[i].start + indexOffset, - vcount); - } - else { - pipe->draw_elements_instanced(pipe, indexBuf, - indexSize, - prims[i].basevertex, - prim, - prims[i].start + indexOffset, - vcount, - 0, /* startInstance */ - prims[i].num_instances); - } - } - } + /* do actual drawing */ + for (i = 0; i < nr_prims; i++) { + info.mode = translate_prim( ctx, prims[i].mode ); + info.start = prims[i].start; + info.count = prims[i].count; + info.instance_count = prims[i].num_instances; + info.index_bias = prims[i].basevertex; + if (!ib) { + info.min_index = info.start; + info.max_index = info.start + info.count - 1; } - pipe_resource_reference(&indexBuf, NULL); + if (u_trim_pipe_prim(info.mode, &info.count)) + pipe->draw_vbo(pipe, &info); } - else { - /* non-indexed */ - GLuint i; - - for (i = 0; i < nr_prims; i++) { - unsigned vcount = prims[i].count; - unsigned prim = translate_prim(ctx, prims[i].mode); - if (u_trim_pipe_prim(prims[i].mode, &vcount)) { - if (prims[i].num_instances == 1) { - pipe->draw_arrays(pipe, prim, prims[i].start, vcount); - } - else { - pipe->draw_arrays_instanced(pipe, prim, - prims[i].start, - vcount, - 0, /* startInstance */ - prims[i].num_instances); - } - } - } - } + pipe_resource_reference(&ibuffer.buffer, NULL); /* unreference buffers (frees wrapped user-space buffer objects) */ for (attr = 0; attr < num_vbuffers; attr++) { -- cgit v1.2.3 From 1a537b639ee7f2d35230c68ba89491711919656d Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 30 Jul 2010 12:13:17 -0700 Subject: mesa: Remove unnecessary headers. --- src/mesa/main/texstore.c | 1 - src/mesa/math/m_translate.c | 1 - src/mesa/state_tracker/st_cb_drawtex.c | 1 - src/mesa/swrast/s_context.c | 1 - src/mesa/swrast/s_readpix.c | 1 - src/mesa/vbo/vbo_exec_draw.c | 1 - 6 files changed, 6 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 0f21395af3..2989fdb72e 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -55,7 +55,6 @@ #include "glheader.h" #include "bufferobj.h" #include "colormac.h" -#include "context.h" #include "convolve.h" #include "image.h" #include "macros.h" diff --git a/src/mesa/math/m_translate.c b/src/mesa/math/m_translate.c index 1d26fa147d..51daf7bfd3 100644 --- a/src/mesa/math/m_translate.c +++ b/src/mesa/math/m_translate.c @@ -31,7 +31,6 @@ #include "main/glheader.h" #include "main/macros.h" #include "main/mtypes.h" /* GLchan hack */ -#include "main/colormac.h" #include "m_translate.h" diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c index b191a7f890..c99a8d792e 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.c +++ b/src/mesa/state_tracker/st_cb_drawtex.c @@ -14,7 +14,6 @@ #include "main/imports.h" #include "main/image.h" -#include "main/bufferobj.h" #include "main/macros.h" #include "program/program.h" #include "program/prog_print.h" diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 6d2d17c61d..d8d8a80b7d 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -28,7 +28,6 @@ #include "main/imports.h" #include "main/bufferobj.h" -#include "main/context.h" #include "main/colormac.h" #include "main/mtypes.h" #include "main/teximage.h" diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 6ad9aceec7..553fd9a76d 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -27,7 +27,6 @@ #include "main/bufferobj.h" #include "main/colormac.h" #include "main/convolve.h" -#include "main/context.h" #include "main/feedback.h" #include "main/formats.h" #include "main/image.h" diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 045af46da8..be2b646ee3 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -27,7 +27,6 @@ #include "main/glheader.h" #include "main/bufferobj.h" -#include "main/context.h" #include "main/enums.h" #include "main/state.h" -- cgit v1.2.3 From b3e3d0da586812c61f7bd3933a9a3c2511b8d55b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 30 Jul 2010 14:27:03 -0600 Subject: st/mesa: better handling of indirect addressing of temp/const register files With gl_program::IndirectRegisterFiles we can distinguish between indirect addressing of constants vs. temporaries. In the case of temporaries, declare all temps up front sequentially. Fixes fd.o bug 29305. --- src/mesa/state_tracker/st_mesa_to_tgsi.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 97186f8dad..1a499e66d0 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -44,6 +44,15 @@ #include "util/u_math.h" #include "util/u_memory.h" + +#define PROGRAM_ANY_CONST ((1 << PROGRAM_LOCAL_PARAM) | \ + (1 << PROGRAM_ENV_PARAM) | \ + (1 << PROGRAM_STATE_VAR) | \ + (1 << PROGRAM_NAMED_PARAM) | \ + (1 << PROGRAM_CONSTANT) | \ + (1 << PROGRAM_UNIFORM)) + + struct label { unsigned branch_target; unsigned token; @@ -1059,6 +1068,16 @@ st_translate_mesa_program( t->address[0] = ureg_DECL_address( ureg ); } + if (program->IndirectRegisterFiles & (1 << PROGRAM_TEMPORARY)) { + /* If temps are accessed with indirect addressing, declare temporaries + * in sequential order. Else, we declare them on demand elsewhere. + */ + for (i = 0; i < program->NumTemporaries; i++) { + /* XXX use TGSI_FILE_TEMPORARY_ARRAY when it's supported by ureg */ + t->temps[i] = ureg_DECL_temporary( t->ureg ); + } + } + /* Emit constants and immediates. Mesa uses a single index space * for these, so we put all the translated regs in t->constants. */ @@ -1069,7 +1088,7 @@ st_translate_mesa_program( ret = PIPE_ERROR_OUT_OF_MEMORY; goto out; } - + for (i = 0; i < program->Parameters->NumParameters; i++) { switch (program->Parameters->Parameters[i].Type) { case PROGRAM_ENV_PARAM: @@ -1080,13 +1099,14 @@ st_translate_mesa_program( t->constants[i] = ureg_DECL_constant( ureg, i ); break; - /* Emit immediates only when there is no address register - * in use. FIXME: Be smarter and recognize param arrays: + /* Emit immediates only when there's no indirect addressing of + * the const buffer. + * FIXME: Be smarter and recognize param arrays: * indirect addressing is only valid within the referenced * array. */ case PROGRAM_CONSTANT: - if (program->NumAddressRegs > 0) + if (program->IndirectRegisterFiles & PROGRAM_ANY_CONST) t->constants[i] = ureg_DECL_constant( ureg, i ); else t->constants[i] = -- cgit v1.2.3 From 9846b0627149e221c9fbd7c3379e33fb68e68511 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 31 Jul 2010 23:04:41 -0700 Subject: mesa: Remove inclusion of compiler.h from mtypes.h. mtypes.h does not use any symbols from compiler.h. Also add the required headers for files that depended on symbols from compiler.h but were indirectly including compiler.h through mtypes.h. --- src/mesa/drivers/dri/i965/brw_util.c | 2 ++ src/mesa/drivers/dri/mach64/mach64_ioctl.h | 3 +++ src/mesa/main/mtypes.h | 1 - src/mesa/main/texstate.h | 1 + src/mesa/program/prog_parameter_layout.c | 1 + src/mesa/state_tracker/st_atom_depth.c | 2 ++ src/mesa/state_tracker/st_atom_stipple.c | 2 ++ src/mesa/state_tracker/st_mesa_to_tgsi.c | 4 ++-- src/mesa/state_tracker/st_texture.c | 4 ++-- src/mesa/vbo/vbo_exec_draw.c | 1 + 10 files changed, 16 insertions(+), 5 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/drivers/dri/i965/brw_util.c b/src/mesa/drivers/dri/i965/brw_util.c index 1db2a210d4..e878da3850 100644 --- a/src/mesa/drivers/dri/i965/brw_util.c +++ b/src/mesa/drivers/dri/i965/brw_util.c @@ -30,6 +30,8 @@ */ +#include + #include "main/mtypes.h" #include "program/prog_parameter.h" #include "brw_util.h" diff --git a/src/mesa/drivers/dri/mach64/mach64_ioctl.h b/src/mesa/drivers/dri/mach64/mach64_ioctl.h index 1ffda1932f..9145ee6e6c 100644 --- a/src/mesa/drivers/dri/mach64/mach64_ioctl.h +++ b/src/mesa/drivers/dri/mach64/mach64_ioctl.h @@ -32,6 +32,9 @@ #ifndef __MACH64_IOCTL_H__ #define __MACH64_IOCTL_H__ +#include +#include + #include "mach64_dri.h" #include "mach64_reg.h" #include "mach64_lock.h" diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 7bb554d519..3c2addb3a3 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -36,7 +36,6 @@ #include "main/glheader.h" #include "main/config.h" -#include "main/compiler.h" #include "main/mfeatures.h" #include "glapi/glapi.h" #include "math/m_matrix.h" /* GLmatrix */ diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h index 17ac68000c..912cb67798 100644 --- a/src/mesa/main/texstate.h +++ b/src/mesa/main/texstate.h @@ -32,6 +32,7 @@ #define TEXSTATE_H +#include "compiler.h" #include "mtypes.h" diff --git a/src/mesa/program/prog_parameter_layout.c b/src/mesa/program/prog_parameter_layout.c index a888573832..d7dc97edbf 100644 --- a/src/mesa/program/prog_parameter_layout.c +++ b/src/mesa/program/prog_parameter_layout.c @@ -28,6 +28,7 @@ * \author Ian Romanick */ +#include "main/compiler.h" #include "main/mtypes.h" #include "prog_parameter.h" #include "prog_parameter_layout.h" diff --git a/src/mesa/state_tracker/st_atom_depth.c b/src/mesa/state_tracker/st_atom_depth.c index 3c07afba9a..1616e945fe 100644 --- a/src/mesa/state_tracker/st_atom_depth.c +++ b/src/mesa/state_tracker/st_atom_depth.c @@ -33,6 +33,8 @@ */ +#include + #include "st_context.h" #include "st_atom.h" #include "pipe/p_context.h" diff --git a/src/mesa/state_tracker/st_atom_stipple.c b/src/mesa/state_tracker/st_atom_stipple.c index 31e124b329..ecdd9f06f6 100644 --- a/src/mesa/state_tracker/st_atom_stipple.c +++ b/src/mesa/state_tracker/st_atom_stipple.c @@ -33,6 +33,8 @@ */ +#include + #include "st_context.h" #include "st_atom.h" #include "pipe/p_context.h" diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 1a499e66d0..a19dcc9253 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -214,7 +214,7 @@ src_register( struct st_translate *t, return ureg_src_undef(); case PROGRAM_TEMPORARY: - ASSERT(index >= 0); + assert(index >= 0); if (ureg_dst_is_undef(t->temps[index])) t->temps[index] = ureg_DECL_temporary( t->ureg ); assert(index < Elements(t->temps)); @@ -224,7 +224,7 @@ src_register( struct st_translate *t, case PROGRAM_ENV_PARAM: case PROGRAM_LOCAL_PARAM: case PROGRAM_UNIFORM: - ASSERT(index >= 0); + assert(index >= 0); return t->constants[index]; case PROGRAM_STATE_VAR: case PROGRAM_CONSTANT: /* ie, immediate */ diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index dbdf1ea1ad..add6e949df 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -25,14 +25,14 @@ * **************************************************************************/ +#include + #include "st_context.h" #include "st_format.h" #include "st_texture.h" #include "st_cb_fbo.h" #include "main/enums.h" -#undef Elements /* fix re-defined macro warning */ - #include "pipe/p_state.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index be2b646ee3..84ae1b87f9 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -27,6 +27,7 @@ #include "main/glheader.h" #include "main/bufferobj.h" +#include "main/compiler.h" #include "main/enums.h" #include "main/state.h" -- cgit v1.2.3 From df66c641e34b87fdb1fae5cae544203e36ca12d3 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 3 Aug 2010 01:14:37 -0700 Subject: st/mesa: Include glheader.h in st_atom.h. Include glheader.h for GLenum symbol. --- src/mesa/state_tracker/st_atom.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_atom.h b/src/mesa/state_tracker/st_atom.h index 1f0fef63df..c7a04951bf 100644 --- a/src/mesa/state_tracker/st_atom.h +++ b/src/mesa/state_tracker/st_atom.h @@ -34,6 +34,8 @@ #ifndef ST_ATOM_H #define ST_ATOM_H +#include "main/glheader.h" + struct st_context; struct st_tracked_state; -- cgit v1.2.3 From 9c6b5a4407cf794f3e5274cd25cac59e85bcf47d Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 3 Aug 2010 01:20:13 -0700 Subject: st/mesa: Add forward declarations in st_atom_constbuf.h. --- src/mesa/state_tracker/st_atom_constbuf.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_atom_constbuf.h b/src/mesa/state_tracker/st_atom_constbuf.h index f707534e2c..97b076629e 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.h +++ b/src/mesa/state_tracker/st_atom_constbuf.h @@ -29,6 +29,9 @@ #ifndef ST_ATOM_CONSTBUF_H #define ST_ATOM_CONSTBUF_H +struct gl_program_parameter_list; +struct st_context; + void st_upload_constants( struct st_context *st, struct gl_program_parameter_list *params, -- cgit v1.2.3 From 279926859e60d63941d7a437803376c8154e8c8e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 3 Aug 2010 17:35:29 -0700 Subject: st/mesa: Add forward declarations in st_atom_shader.h. --- src/mesa/state_tracker/st_atom_shader.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_atom_shader.h b/src/mesa/state_tracker/st_atom_shader.h index 8403bc66c9..56d4c68f4f 100644 --- a/src/mesa/state_tracker/st_atom_shader.h +++ b/src/mesa/state_tracker/st_atom_shader.h @@ -30,6 +30,9 @@ #define ST_ATOM_SHADER_H +struct st_context; +struct translated_vertex_program; + extern void st_free_translated_vertex_programs(struct st_context *st, struct translated_vertex_program *xvp); -- cgit v1.2.3 From a3ff6c269729597dd1318df2a10fb2a7dba093d6 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 3 Aug 2010 17:55:53 -0700 Subject: st/mesa: Clean up header file inclusion in st_cache.h. --- src/mesa/state_tracker/st_cache.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cache.h b/src/mesa/state_tracker/st_cache.h index b81de316ec..6d5de7b13a 100644 --- a/src/mesa/state_tracker/st_cache.h +++ b/src/mesa/state_tracker/st_cache.h @@ -33,10 +33,11 @@ #ifndef ST_CACHE_H #define ST_CACHE_H -#include "cso_cache/cso_cache.h" - struct pipe_blend_state; +struct pipe_depth_stencil_alpha_state; +struct pipe_rasterizer_state; struct pipe_sampler_state; +struct pipe_shader_state; struct st_context; -- cgit v1.2.3 From e6902afeee522494f1787cc7c79415f55dce2eb4 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 12:00:19 -0700 Subject: st/mesa: Clean up header file inclusion in st_cb_bitmap.h. Removed mtypes.h. Include compiler.h for INLINE symbol. Added forward declarations. --- src/mesa/state_tracker/st_cb_bitmap.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_bitmap.h b/src/mesa/state_tracker/st_cb_bitmap.h index 8af975b74f..d04b2b6779 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.h +++ b/src/mesa/state_tracker/st_cb_bitmap.h @@ -30,7 +30,10 @@ #define ST_CB_BITMAP_H -#include "main/mtypes.h" +#include "main/compiler.h" + +struct dd_function_table; +struct st_context; #if FEATURE_drawpix -- cgit v1.2.3 From eb4f2d4b0264e180f818230fa69a420793423eb7 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 12:07:12 -0700 Subject: st/mesa: Clean up header file inclusion in st_cb_blit.h. Replaced mtypes.h and st_context.h with forward declarations. Added compiler.h for INLINE symbol. --- src/mesa/state_tracker/st_cb_blit.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_blit.h b/src/mesa/state_tracker/st_cb_blit.h index 7ab9a54df9..c230652cef 100644 --- a/src/mesa/state_tracker/st_cb_blit.h +++ b/src/mesa/state_tracker/st_cb_blit.h @@ -29,8 +29,10 @@ #define ST_CB_BLIT_H -#include "main/mtypes.h" -#include "st_context.h" +#include "main/compiler.h" + +struct dd_function_table; +struct st_context; extern void -- cgit v1.2.3 From 6bc17324da6e9d90ea2586c59c162a72f900a0fc Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 12:13:29 -0700 Subject: st/mesa: Include missing headers in st_cb_bufferobjects.h. Include compiler.h for INLINE symbol. Include mtypes.h for gl_buffer_object symbol. --- src/mesa/state_tracker/st_cb_bufferobjects.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.h b/src/mesa/state_tracker/st_cb_bufferobjects.h index a27daac2bf..1c991d2083 100644 --- a/src/mesa/state_tracker/st_cb_bufferobjects.h +++ b/src/mesa/state_tracker/st_cb_bufferobjects.h @@ -28,9 +28,12 @@ #ifndef ST_CB_BUFFEROBJECTS_H #define ST_CB_BUFFEROBJECTS_H -struct st_context; -struct gl_buffer_object; +#include "main/compiler.h" +#include "main/mtypes.h" + +struct dd_function_table; struct pipe_resource; +struct st_context; /** * State_tracker vertex/pixel buffer object, derived from Mesa's -- cgit v1.2.3 From ed810ba7243f0b19999c35f21e7be5708446962a Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 12:22:31 -0700 Subject: st/mesa: Add forward declarations in st_cb_clear.h. --- src/mesa/state_tracker/st_cb_clear.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_clear.h b/src/mesa/state_tracker/st_cb_clear.h index bc035ac25c..b27c09d10e 100644 --- a/src/mesa/state_tracker/st_cb_clear.h +++ b/src/mesa/state_tracker/st_cb_clear.h @@ -30,6 +30,9 @@ #define ST_CB_CLEAR_H +struct dd_function_table; +struct st_context; + extern void st_init_clear(struct st_context *st); -- cgit v1.2.3 From 7fdf6d5c28293e169b7874d95632ec0bba9da78a Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 12:24:51 -0700 Subject: st/mesa: Add forward declaration in st_cb_condrender.h. --- src/mesa/state_tracker/st_cb_condrender.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_condrender.h b/src/mesa/state_tracker/st_cb_condrender.h index 891f1cbcd8..79d0db8d08 100644 --- a/src/mesa/state_tracker/st_cb_condrender.h +++ b/src/mesa/state_tracker/st_cb_condrender.h @@ -29,6 +29,8 @@ #define ST_CB_CONDRENDER_H +struct dd_function_table; + extern void st_init_cond_render_functions(struct dd_function_table *functions); -- cgit v1.2.3 From dce63cf431177594f1267406276f441391701f70 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 12:29:26 -0700 Subject: st/mesa: Clean up header file inclusion in st_cb_drawpixels.h. Replace mtypes.h with forward declarations. Include compiler.h for INLINE symbol. --- src/mesa/state_tracker/st_cb_drawpixels.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_drawpixels.h b/src/mesa/state_tracker/st_cb_drawpixels.h index 7d5e901ccc..575f169e08 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.h +++ b/src/mesa/state_tracker/st_cb_drawpixels.h @@ -30,7 +30,10 @@ #define ST_CB_DRAWPIXELS_H -#include "main/mtypes.h" +#include "main/compiler.h" + +struct dd_function_table; +struct st_context; #if FEATURE_drawpix -- cgit v1.2.3 From 137c510097503e590cf8b30d2b97e617b9a1543b Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 12:46:38 -0700 Subject: st/mesa: Clean up header file inclusion in st_cb_drawtex.h. Replace mtypes.h with forward declarations. Include compiler.h for INLINE symbol. --- src/mesa/state_tracker/st_cb_drawtex.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_drawtex.h b/src/mesa/state_tracker/st_cb_drawtex.h index a3f54a349c..d21262f897 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.h +++ b/src/mesa/state_tracker/st_cb_drawtex.h @@ -10,7 +10,10 @@ #define ST_CB_DRAWTEX_H -#include "main/mtypes.h" +#include "main/compiler.h" + +struct dd_function_table; +struct st_context; #if FEATURE_OES_draw_texture -- cgit v1.2.3 From 19bfb55fb54447b322d3aefecf6e0dbb81d8f812 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 13:04:36 -0700 Subject: st/mesa: Clean up header file inclusion in st_cb_eglimage.h. Replace dd.h and mtypes.h with a forward declaration. Include compiler.h for INLINE symbol. --- src/mesa/state_tracker/st_cb_eglimage.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_eglimage.h b/src/mesa/state_tracker/st_cb_eglimage.h index d6953e99f6..b6e44d5aff 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.h +++ b/src/mesa/state_tracker/st_cb_eglimage.h @@ -29,8 +29,9 @@ #ifndef ST_CB_EGLIMAGE_H #define ST_CB_EGLIMAGE_H -#include "main/mtypes.h" -#include "main/dd.h" +#include "main/compiler.h" + +struct dd_function_table; #if FEATURE_OES_EGL_image -- cgit v1.2.3 From 2e85117b5f8909b8737e0c0e479360640e405192 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 13:17:57 -0700 Subject: st/mesa: Add missing headers to st_cb_fbo.h. --- src/mesa/state_tracker/st_cb_fbo.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_fbo.h b/src/mesa/state_tracker/st_cb_fbo.h index 43b6c1e75f..62a9bbcb25 100644 --- a/src/mesa/state_tracker/st_cb_fbo.h +++ b/src/mesa/state_tracker/st_cb_fbo.h @@ -29,6 +29,15 @@ #ifndef ST_CB_FBO_H #define ST_CB_FBO_H +#include "main/compiler.h" +#include "main/glheader.h" +#include "main/mtypes.h" + +#include "pipe/p_compiler.h" +#include "pipe/p_format.h" + +struct dd_function_table; +struct pipe_context; /** * Derived renderbuffer class. Just need to add a pointer to the -- cgit v1.2.3 From 85dbb2904bbcab5bad65cc267daafd6ebcf32ded Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 15:26:37 -0700 Subject: st/mesa: Clean up header inclusion in st_cb_feedback.h. Replace mtypes.h with forward declaration. Include compiler.h for INLINE symbol. --- src/mesa/state_tracker/st_cb_feedback.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_feedback.h b/src/mesa/state_tracker/st_cb_feedback.h index 706d84960f..f2342f5823 100644 --- a/src/mesa/state_tracker/st_cb_feedback.h +++ b/src/mesa/state_tracker/st_cb_feedback.h @@ -30,7 +30,9 @@ #define ST_CB_FEEDBACK_H -#include "main/mtypes.h" +#include "main/compiler.h" + +struct dd_function_table; #if FEATURE_feedback -- cgit v1.2.3 From 9f7e7ce7572d1ab370def14db8be7059869cda29 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 15:32:53 -0700 Subject: st/mesa: Add missing headers in st_cb_flush.h. Add forward declarations. Include p_compiler.h for uint symbol. --- src/mesa/state_tracker/st_cb_flush.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_flush.h b/src/mesa/state_tracker/st_cb_flush.h index 7fca0176a3..7672b4cf1d 100644 --- a/src/mesa/state_tracker/st_cb_flush.h +++ b/src/mesa/state_tracker/st_cb_flush.h @@ -30,6 +30,12 @@ #define ST_CB_FLUSH_H +#include "pipe/p_compiler.h" + +struct dd_function_table; +struct pipe_fence_handle; +struct st_context; + extern void st_init_flush_functions(struct dd_function_table *functions); -- cgit v1.2.3 From 2bb3bfa943d3250d036673dbdea215b19d70c21e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 16:13:15 -0700 Subject: st/mesa: Add missing header in st_cb_program.h. Include mtypes.h for GLcontext symbol. --- src/mesa/state_tracker/st_cb_program.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_program.h b/src/mesa/state_tracker/st_cb_program.h index 0de96f2fd2..0fd179ef3d 100644 --- a/src/mesa/state_tracker/st_cb_program.h +++ b/src/mesa/state_tracker/st_cb_program.h @@ -29,6 +29,10 @@ #define ST_CB_PROGRAM_H +#include "main/mtypes.h" + +struct dd_function_table; + extern void st_init_program_functions(struct dd_function_table *functions); -- cgit v1.2.3 From a25ac9b5266c1f6820b073108555140c631454e1 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 16:33:10 -0700 Subject: st/mesa: Clean up header file inclusion in st_cb_rasterpos.h. --- src/mesa/state_tracker/st_cb_rasterpos.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_rasterpos.h b/src/mesa/state_tracker/st_cb_rasterpos.h index d2ed7297f1..2dc109bb18 100644 --- a/src/mesa/state_tracker/st_cb_rasterpos.h +++ b/src/mesa/state_tracker/st_cb_rasterpos.h @@ -29,7 +29,9 @@ #define ST_CB_RASTERPOS_H -#include "main/mtypes.h" +#include "main/compiler.h" + +struct dd_function_table; #if FEATURE_rastpos -- cgit v1.2.3 From e9d6f2fc8a88cd18a9914ee7c8f947c869ed3e50 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 16:40:04 -0700 Subject: st/mesa: Add missing header in st_cb_readpixels.h. Include mtypes.h for GLcontext symbol. --- src/mesa/state_tracker/st_cb_readpixels.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_readpixels.h b/src/mesa/state_tracker/st_cb_readpixels.h index c90ef02906..9e1f7b4925 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.h +++ b/src/mesa/state_tracker/st_cb_readpixels.h @@ -29,6 +29,10 @@ #ifndef ST_CB_READPIXELS_H #define ST_CB_READPIXELS_H +#include "main/mtypes.h" + +struct dd_function_table; + extern struct st_renderbuffer * st_get_color_read_renderbuffer(GLcontext *ctx); -- cgit v1.2.3 From 060a95c3a942daca936d421400b7327f038d6f27 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 16:46:42 -0700 Subject: st/mesa: Add forward declaration in st_cb_strings.h. --- src/mesa/state_tracker/st_cb_strings.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_strings.h b/src/mesa/state_tracker/st_cb_strings.h index 3b765aaa59..92d5d2d9ba 100644 --- a/src/mesa/state_tracker/st_cb_strings.h +++ b/src/mesa/state_tracker/st_cb_strings.h @@ -30,6 +30,8 @@ #define ST_CB_STRINGS_H +struct dd_function_table; + extern void st_init_string_functions(struct dd_function_table *functions); -- cgit v1.2.3 From e857293299c5bc38de683f199fe1ec7833aff61c Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 16:59:12 -0700 Subject: st/mesa: Add missing headers in st_cb_texture.h. --- src/mesa/state_tracker/st_cb_texture.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_texture.h b/src/mesa/state_tracker/st_cb_texture.h index 1cd9fc3a50..6942478e81 100644 --- a/src/mesa/state_tracker/st_cb_texture.h +++ b/src/mesa/state_tracker/st_cb_texture.h @@ -30,6 +30,13 @@ #define ST_CB_TEXTURE_H +#include "main/glheader.h" +#include "main/mtypes.h" + +struct dd_function_table; +struct pipe_context; +struct st_context; + extern GLboolean st_finalize_texture(GLcontext *ctx, struct pipe_context *pipe, -- cgit v1.2.3 From cb7638579e22a8854d13d58c435c90b2e596e946 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 17:04:38 -0700 Subject: st/mesa: Clean up st_cb_viewport.h. Add inclusion guard. Add forward declaration. --- src/mesa/state_tracker/st_cb_viewport.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_viewport.h b/src/mesa/state_tracker/st_cb_viewport.h index db7dd6eab8..bcfd7cb68a 100644 --- a/src/mesa/state_tracker/st_cb_viewport.h +++ b/src/mesa/state_tracker/st_cb_viewport.h @@ -25,5 +25,12 @@ * **************************************************************************/ +#ifndef ST_CB_VIEWPORT_H +#define ST_CB_VIEWPORT_H + +struct dd_function_table; + extern void st_init_viewport_functions(struct dd_function_table *functions); + +#endif /* ST_CB_VIEW_PORT_H */ -- cgit v1.2.3 From 6f8b6661ce3af17d3cfe4f28ff15f82caf6755b5 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 20:58:22 -0700 Subject: st/mesa: Add missing header in st_cb_xformfb.h. --- src/mesa/state_tracker/st_cb_xformfb.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_xformfb.h b/src/mesa/state_tracker/st_cb_xformfb.h index 50efcb9293..574cf481e1 100644 --- a/src/mesa/state_tracker/st_cb_xformfb.h +++ b/src/mesa/state_tracker/st_cb_xformfb.h @@ -29,6 +29,10 @@ #define ST_CB_XFORMFB_H +#include "main/compiler.h" + +struct dd_function_table; + #if FEATURE_EXT_transform_feedback extern void -- cgit v1.2.3 From 1525fb4afec0adc164948b4060ec1c0359441cd3 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 21:09:27 -0700 Subject: st/mesa: Clean up header file inclusion in st_context.h. --- src/mesa/state_tracker/st_context.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index a147a02117..60c25fb8f0 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -1,3 +1,4 @@ +//struct dd_function_table; /************************************************************************** * * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. @@ -29,21 +30,17 @@ #define ST_CONTEXT_H #include "main/mtypes.h" -#include "program/prog_cache.h" #include "pipe/p_state.h" #include "state_tracker/st_api.h" - -struct st_context; -struct st_texture_object; -struct st_fragment_program; +struct bitmap_cache; +struct blit_state; +struct dd_function_table; struct draw_context; struct draw_stage; -struct cso_cache; -struct cso_blend; struct gen_mipmap_state; -struct blit_state; -struct bitmap_cache; +struct st_context; +struct st_fragment_program; #define ST_NEW_MESA 0x1 /* Mesa state has changed */ -- cgit v1.2.3 From a0989e94374a678fb6c2d0974255a178361c47a7 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 21:13:33 -0700 Subject: st/mesa: Add missing header in st_atom_pixeltransfer.c. --- src/mesa/state_tracker/st_atom_pixeltransfer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c index b88c74fa03..8a8d17599e 100644 --- a/src/mesa/state_tracker/st_atom_pixeltransfer.c +++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c @@ -37,6 +37,7 @@ #include "main/image.h" #include "main/macros.h" #include "program/program.h" +#include "program/prog_cache.h" #include "program/prog_instruction.h" #include "program/prog_parameter.h" #include "program/prog_print.h" -- cgit v1.2.3 From 9c98e9e6b5b5f5508b67b3650dbaf00db407b5eb Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 4 Aug 2010 21:17:13 -0700 Subject: st/mesa: Add missing header in st_context.c. --- src/mesa/state_tracker/st_context.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 7eb5f32611..820f584797 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -28,6 +28,7 @@ #include "main/imports.h" #include "main/context.h" #include "main/shaderobj.h" +#include "program/prog_cache.h" #include "vbo/vbo.h" #include "glapi/glapi.h" #include "st_context.h" -- cgit v1.2.3 From 4f9ca250d6172176263ef7415fce7140986bc0bc Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 5 Aug 2010 00:52:30 -0700 Subject: st/mesa: Add missing headers to st_draw.h. --- src/mesa/state_tracker/st_draw.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h index 3e0face656..f36184487a 100644 --- a/src/mesa/state_tracker/st_draw.h +++ b/src/mesa/state_tracker/st_draw.h @@ -34,8 +34,13 @@ #ifndef ST_DRAW_H #define ST_DRAW_H -struct _mesa_prim; +#include "main/compiler.h" +#include "main/glheader.h" +#include "main/mtypes.h" + struct _mesa_index_buffer; +struct _mesa_prim; +struct st_context; void st_init_draw( struct st_context *st ); -- cgit v1.2.3 From 2febc491bc7f5539e1e91c5b0f4be4eb4df919f8 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 5 Aug 2010 00:54:27 -0700 Subject: st/mesa: Add forward delcaration in st_extensions.h. --- src/mesa/state_tracker/st_extensions.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_extensions.h b/src/mesa/state_tracker/st_extensions.h index 2994f16dd3..aa9b2b2b91 100644 --- a/src/mesa/state_tracker/st_extensions.h +++ b/src/mesa/state_tracker/st_extensions.h @@ -30,6 +30,8 @@ #define ST_EXTENSIONS_H +struct st_context; + extern void st_init_limits(struct st_context *st); extern void st_init_extensions(struct st_context *st); -- cgit v1.2.3 From ad4d27c6d1a32e3c4c92e0f22c8fbdeade4cc7af Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 5 Aug 2010 00:59:44 -0700 Subject: st/mesa: Include missing headers in st_format.h. --- src/mesa/state_tracker/st_format.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h index 29768f296d..841c58cadc 100644 --- a/src/mesa/state_tracker/st_format.h +++ b/src/mesa/state_tracker/st_format.h @@ -31,7 +31,12 @@ #define ST_FORMAT_H #include "main/formats.h" +#include "main/mtypes.h" +#include "pipe/p_defines.h" +#include "pipe/p_format.h" + +struct pipe_screen; extern GLenum st_format_datatype(enum pipe_format format); -- cgit v1.2.3 From ea1744a66438b5863a8576087b07ad6ffdcd04c5 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 5 Aug 2010 01:23:05 -0700 Subject: mesa: Include missing header in st_get_mipmap.h. Include mtypes.h for GLcontext symbol. Add forward declaration for st_context. --- src/mesa/state_tracker/st_gen_mipmap.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_gen_mipmap.h b/src/mesa/state_tracker/st_gen_mipmap.h index 00fbae9302..016bf3f4bb 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.h +++ b/src/mesa/state_tracker/st_gen_mipmap.h @@ -30,6 +30,10 @@ #define ST_GEN_MIPMAP_H +#include "main/mtypes.h" + +struct st_context; + extern void st_init_generate_mipmap(struct st_context *st); -- cgit v1.2.3 From 5e56c8907b9f31005a0655aac322b761e1b87c53 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 5 Aug 2010 01:38:46 -0700 Subject: st/mesa: Remove unnecessary header from st_gl_api.h. --- src/mesa/state_tracker/st_gl_api.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_gl_api.h b/src/mesa/state_tracker/st_gl_api.h index fe1aec207e..57c6d9f24d 100644 --- a/src/mesa/state_tracker/st_gl_api.h +++ b/src/mesa/state_tracker/st_gl_api.h @@ -2,8 +2,6 @@ #ifndef ST_GL_API_H #define ST_GL_API_H -#include "state_tracker/st_api.h" - struct st_api *st_gl_api_create(void); struct st_api *st_gl_api_create_es1(void); struct st_api *st_gl_api_create_es2(void); -- cgit v1.2.3 From 0a7cbe845fe029411ae25c4bfe60763485a760f4 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 5 Aug 2010 16:20:07 -0700 Subject: st/mesa: Clean up header file inclusion in st_manager.h. Include mtypes.h for GLcontext, gl_buffer_index, and GLframebuffer symbols. Include p_compiler.h for boolean symbol. Include st_context.h in st_cb_eglimage.c as it previously included st_context.h indirectly through st_manager.h. --- src/mesa/state_tracker/st_cb_eglimage.c | 1 + src/mesa/state_tracker/st_manager.h | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c index 4aaf91d5a1..037e576fab 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.c +++ b/src/mesa/state_tracker/st_cb_eglimage.c @@ -33,6 +33,7 @@ #include "util/u_format.h" #include "st_cb_eglimage.h" #include "st_cb_fbo.h" +#include "st_context.h" #include "st_texture.h" #include "st_format.h" #include "st_manager.h" diff --git a/src/mesa/state_tracker/st_manager.h b/src/mesa/state_tracker/st_manager.h index cd2887b1e0..48a9d4d99a 100644 --- a/src/mesa/state_tracker/st_manager.h +++ b/src/mesa/state_tracker/st_manager.h @@ -29,8 +29,11 @@ #ifndef ST_MANAGER_H #define ST_MANAGER_H -#include "state_tracker/st_api.h" -#include "st_context.h" +#include "main/mtypes.h" + +#include "pipe/p_compiler.h" + +struct st_context; struct pipe_surface * st_manager_get_egl_image_surface(struct st_context *st, -- cgit v1.2.3 From 1b8aa2176c4fc580cc31c57c7e50e7f39ef2cc04 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 5 Aug 2010 17:13:15 -0700 Subject: st/mesa: Clean up header file inclusion in st_mesa_to_tgsi.h. st_mesa_to_tgsi.h Replace tgsi_ureg.h with a forward declaration. Include p_compiler.h for ubyte symbol. st_program.c Include tgsi_ureg.h directly. --- src/mesa/state_tracker/st_mesa_to_tgsi.h | 4 +++- src/mesa/state_tracker/st_program.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h index e3c5bd1d94..ca076ce362 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.h +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h @@ -30,8 +30,10 @@ #define ST_MESA_TO_TGSI_H #include "main/mtypes.h" -#include "tgsi/tgsi_ureg.h" +#include "pipe/p_compiler.h" + +struct ureg_program; #if defined __cplusplus extern "C" { diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 6f3ecdbce1..91528c227b 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -41,6 +41,7 @@ #include "pipe/p_shader_tokens.h" #include "draw/draw_context.h" #include "tgsi/tgsi_dump.h" +#include "tgsi/tgsi_ureg.h" #include "st_debug.h" #include "st_context.h" -- cgit v1.2.3 From 99611f08497f1567a50ef3e7ea51e63fdf4beb26 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 5 Aug 2010 17:13:41 -0700 Subject: st/mesa: Only get mesa mvp dp4 option once The correct for this is of course to do what comment says --- src/mesa/state_tracker/st_context.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 820f584797..3eb4708688 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -63,6 +63,9 @@ #include "cso_cache/cso_context.h" +DEBUG_GET_ONCE_BOOL_OPTION(mesa_mvp_dp4, "MESA_MVP_DP4", FALSE); + + /** * Called via ctx->Driver.UpdateState() */ @@ -170,7 +173,7 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe, /* XXX: need a capability bit in gallium to query if the pipe * driver prefers DP4 or MUL/MAD for vertex transformation. */ - if (debug_get_bool_option("MESA_MVP_DP4", FALSE)) + if (debug_get_option_mesa_mvp_dp4()) _mesa_set_mvp_with_dp4( ctx, GL_TRUE ); return st_create_context_priv(ctx, pipe); -- cgit v1.2.3 From 981c6bc6a5a7dcf941972939c224dfb7f98b904a Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 5 Aug 2010 17:14:38 -0700 Subject: st/mesa: Only get debug option once --- src/mesa/state_tracker/st_debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_debug.c b/src/mesa/state_tracker/st_debug.c index ebf6ec6e7e..1260fe04b1 100644 --- a/src/mesa/state_tracker/st_debug.c +++ b/src/mesa/state_tracker/st_debug.c @@ -55,6 +55,8 @@ static const struct debug_named_value st_debug_flags[] = { { "query", DEBUG_QUERY, NULL }, DEBUG_NAMED_VALUE_END }; + +DEBUG_GET_ONCE_FLAGS_OPTION(st_debug, "ST_DEBUG", st_debug_flags, 0); #endif @@ -62,7 +64,7 @@ void st_debug_init(void) { #ifdef DEBUG - ST_DEBUG = debug_get_flags_option("ST_DEBUG", st_debug_flags, 0 ); + ST_DEBUG = debug_get_option_st_debug(); #endif } -- cgit v1.2.3 From f717fd25cc44d7dda5a49dc05337c7ee7c8d2d2f Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 5 Aug 2010 18:21:09 -0700 Subject: st/mesa: Clean up header file inclusion in st_program.h. st_program.h Remove p_shader_tokens.h Include st_context.h for st_context symbol. Include p_state.h for PIPE_MAX_SHADER_INPUTS symbol. Remove unnecessary forward declarations. st_cb_bitmap.c st_cb_clear.c Include p_shader_tokens.h now that st_program.h doesn't include it. --- src/mesa/state_tracker/st_cb_bitmap.c | 1 + src/mesa/state_tracker/st_cb_clear.c | 1 + src/mesa/state_tracker/st_program.h | 7 ++----- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index ba600ccef6..0b8ecd27cb 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -46,6 +46,7 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" +#include "pipe/p_shader_tokens.h" #include "util/u_inlines.h" #include "util/u_draw_quad.h" #include "util/u_simple_shaders.h" diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index ea2414c4a0..246ab2e957 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -45,6 +45,7 @@ #include "st_program.h" #include "pipe/p_context.h" +#include "pipe/p_shader_tokens.h" #include "pipe/p_state.h" #include "pipe/p_defines.h" #include "util/u_format.h" diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index d779d5a6dd..3805b9a725 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -36,11 +36,8 @@ #include "main/mtypes.h" #include "program/program.h" -#include "pipe/p_shader_tokens.h" - - -struct cso_fragment_shader; -struct cso_vertex_shader; +#include "pipe/p_state.h" +#include "st_context.h" /** -- cgit v1.2.3