summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
Commit message (Collapse)AuthorAgeFilesLines
* swrast: Support sampler object for texture fetching statePauli Nieminen2012-08-011-1/+3
| | | | | | | | | | | | swrast needs to pass sampler object into all texture fetching functions to use correct sampling state when sampler object is bound to the unit. The changes were made using half manual regular expression replace. v2: Fix NULL deref in _swrast_choose_triangle(), because the _Current values aren't set yet, so we need to look at our texObj2D. (anholt) Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Remove _mesa_inv_sqrtf in favor of 1/SQRTFMatt Turner2012-07-212-3/+3
| | | | | | | | Except for a couple of explicit uses, _mesa_inv_sqrtf was disabled since its addition in 2003 (see f9b1e524). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Use INV_SQRT instead of 1/SQRTFMatt Turner2012-07-211-1/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: rename ColorMaterialBitmask to _ColorMaterialBitmaskBrian Paul2012-06-271-2/+2
| | | | Since it's a derived field.
* mesa: move gl_client_array*[] from vbo_draw_func into gl_contextMarek Olšák2012-05-082-2/+2
| | | | | | | | | | | | | | | | | | In the future we'd like to treat vertex arrays as a state and not as a parameter to the draw function. This is the first step towards that goal. Part of the goal is to avoid array re-validation for every draw call. This commit adds: const struct gl_client_array **gl_context::Array::_DrawArrays. The pointer is changed in: * vbo_draw_method * vbo_rebase_prims - unused by gallium * vbo_split_prims - unused by gallium * st_RasterPos Reviewed-by: Brian Paul <[email protected]>
* tnl: stop using _DD_NEW_x flagsBrian Paul2012-03-121-1/+2
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* tnl: let _TNL_ATTRIB_POINTSIZE do not depend on ctx->VertexProgram._EnabledYuanhan Liu2012-03-051-2/+1
| | | | | | | | | | | | We may specify the point size in a glsl vertex shader. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46311 piglit: glsl-vs-point-size NOTE: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Push the shine table into the tnl module.Mathias Fröhlich2012-02-295-9/+179
| | | | | | | | | | All users of the shine table outside of the tnl module are gone. Move the implementation into the tnl module and prefix the public functions with _tnl. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: Avoid revalidating shine tables in _tnl_RasterPos.Mathias Fröhlich2012-02-291-2/+0
| | | | | | | | | Now that _tnl_RasterPos no longer uses the shine tables, avoid revalidating them. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: Avoid using the shine table for _tnl_RasterPosMathias Fröhlich2012-02-291-1/+5
| | | | | | | | | | | | | Use direct computation of pow for computing the shininess in _tnl_RasterPos. Since the _tnl_RasterPos function is still used by plenty drivers that do only need the shine table for _tnl_RasterPos but do not make use of swtnl computations, this enables pushing down the shine table computation and validation into the tnl module, which will happen in a followup change. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: replace GET_SHINE_TAB_ENTRY() macro with an inline functionBrian Paul2012-02-102-22/+8
|
* mesa: remove gl_light::_SpotExpTable fieldBrian Paul2012-02-102-12/+3
| | | | | | | Just use pow() instead. Spot lights aren't too common and fixed-function lighting isn't as important as it used to me. This saves 32KB per context. Each table was 4KB and there's 8 lights.
* tnl: remove ctx->Driver.Map/UnmapTexture() callsBrian Paul2012-01-241-8/+2
| | | | | | ctx->Driver.MapTexture() always points to _swrast_map_texture(). We're already reaching into swrast from t_vb_program.c anyway. This will let us remove the ctx->Driver.Map/UnmapTexture() functions.
* vbo: introduce vbo_get_minmax_indices functionYuanhan Liu2012-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Introduce vbo_get_minmax_indices() function to handle the min/max index computation for nr_prims(>= 1). The old code just compute the first prim's min/max index; this would results an error rendering if user called functions like glMultiDrawElements(). This patch servers as fixing this issue. As when nr_prims = 1, we can pass 1 to paramter nr_prims, thus I made vbo_get_minmax_index() static. v2: per Roland's suggestion, put the indices address compuation into vbo_get_minmax_index() instead. Also do comination if possible to reduce map/unmap count v3: per Brian's suggestion, use a pointer for start_prim to avoid structure copy per loop. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* vbo: introduce vbo_sizeof_ib_type() functionYuanhan Liu2011-12-301-18/+2
| | | | | | | | | | introduce vbo_sizeof_ib_type() function to return the index data type size. I see some place use switch(ib->type) to get the index data type, which is sort of duplicate. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Convert to use GLbitfield64 directly.Mathias Fröhlich2011-12-282-24/+10
| | | | | Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Convert RENDERINPUTS* macros to GLbitfield64.Mathias Fröhlich2011-12-281-12/+14
| | | | | Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove leftovers from color indexed rendering.Mathias Fröhlich2011-12-261-6/+1
| | | | | | | | | Remove gl_light::_dli and gl_light::_sli. Both are only used for a value previously used in color indexed rendering. Also both variables are only used and never written. Signed-off-by: Mathias Froehlich <[email protected]>
* mesa: implement DrawTransformFeedback from ARB_transform_feedback2Marek Olšák2011-12-152-2/+4
| | | | | | | | | | | | | | It's like DrawArrays, but the count is taken from a transform feedback object. This removes DrawTransformFeedback from dd_function_table and adds the same function to GLvertexformat (with the function parameters matching GL). The vbo_draw_func callback has a new parameter "struct gl_transform_feedback_object *tfb_vertcount". The rest of the code just validates states and forwards the transform feedback object into vbo_draw_func.
* mesa: Renumber the tnl attributes to match VERT_ATTRIB*.Mathias Fröhlich2011-12-021-29/+29
| | | | | | | | | | | | | Also renumber the tnl modules vertex attributes to match the renumbered VERT_ATTRIB_* values. This should fix https://bugs.freedesktop.org/show_bug.cgi?id=43353 Signed-off-by: Mathias Froehlich <[email protected]> Tested-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tnl: s/INLINE/inline/Brian Paul2011-11-302-4/+4
|
* mesa: Make gl_program::InputsRead 64 bits.Mathias Fröhlich2011-11-291-1/+1
| | | | | | | | | Make gl_program::InputsRead a 64 bits bitfield. Adapt the intel and radeon driver to handle a 64 bits InputsRead value. Signed-off-by: Mathias Froehlich <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add swrast_texture_image::BufferBrian Paul2011-10-232-1/+2
| | | | | | | | | | | | | | | In the past, swrast_texture_image::Data has been overloaded. It could either point to malloc'd memory storing texture data, or it could point to a current mapping of GPU memory. Now, Buffer always points to malloc'd memory (if we're not using GPU memory) and Data always points to mapped memory. The next step would be to rename Data -> Map. This change also involves adding swrast functions for mapping textures and renderbuffers prior to rendering to setup the Data pointer. Plus, corresponding functions to unmap texures and renderbuffers. This is very much like similar code in the dri drivers.
* tnl: fix result vector allocation regressionBrian Paul2011-10-071-4/+10
| | | | | | We need to allocate all the output vectors. Fixes a regression from commit f7f678331d5e95d2266fe6b3ea1cfa47d6421065 Fixes fd.o bugs 41441 and 41492.
* tnl: Delay results allocation until we actually need them.Eric Anholt2011-10-011-7/+5
| | | | | | Decreases i965 peak memory allocation for a trivial shader program from 23,483,048B to 21,932,128B, since we never actually use tnl for rendering.
* mesa: s/INLINE/inline/Brian Paul2011-10-012-50/+50
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <[email protected]>
* tnl: include swrast/s_chan.h to fix sse buildBrian Paul2011-09-211-0/+1
|
* mesa: move last bits of GLchan stuff into swrastBrian Paul2011-09-202-1/+2
| | | | | This removes the last remnants of the GLchan datatype and associated macros out of core Mesa and into swrast.
* tnl: fix regression in bind_indices()Brian Paul2011-08-301-1/+2
| | | | | Commit 2ea1ff38164d95f8291ef2e5dfe2cb13936a60f2 caused the regression. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40413
* tnl: add const qualifier to silence warningBrian Paul2011-08-301-1/+1
|
* tnl: use buffer helper functions to improve readbilityBrian Paul2011-08-301-1/+3
|
* mesa/tnl_dd: Remove unused source tree mesa/tnl_dd/immIan Romanick2011-08-261-3/+1
| | | | | | | | | | Acked-by: Kristian Høgsberg <[email protected]> Acked-by: Marek Olšák <[email protected]> Acked-by: Alan Coopersmith <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]> Acked-by: Dave Airlie <[email protected]> Build-Tested-by: Jakob Bornecrantz <[email protected]> Tested-by: Eugeni Dodonov <[email protected]>
* dri: Remove all DRI1 driversIan Romanick2011-08-261-2/+2
| | | | | | | | | | Acked-by: Kristian Høgsberg <[email protected]> Acked-by: Marek Olšák <[email protected]> Acked-by: Alan Coopersmith <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]> Acked-by: Dave Airlie <[email protected]> Build-Tested-by: Jakob Bornecrantz <[email protected]> Tested-by: Eugeni Dodonov <[email protected]>
* tnl: Only map the necessary buffer range in bind_indicesIan Romanick2011-08-231-5/+21
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Eliminate dd_function_table::MapBufferIan Romanick2011-08-231-6/+5
| | | | | | | | | | Replace all calls to dd_function_table::MapBuffer with appropriate calls to dd_function_table::MapBufferRange, then remove all the cruft. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::MapBufferIan Romanick2011-08-231-2/+0
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::UnmapBufferIan Romanick2011-08-231-3/+1
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swrast: initial multi-threaded span renderingAndreas Fänger2011-08-111-0/+12
| | | | | | | | Optional parallel rendering of spans using OpenMP. Initial implementation for aa triangles. A new option for scons is also provided to activate the openmp support (off by default). Signed-off-by: Brian Paul <[email protected]>
* mesa: gl_fragment_program::FogOption is always GL_NONE so don't check itIan Romanick2011-04-211-8/+4
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Acked-by: Corbin Simpson <[email protected]> Acked-by: Alex Deucher <[email protected]>
* mesa: replace NEED_SECONDARY_COLOR(), RGBA_LOGICOP_ENABLED() with inlinesBrian Paul2011-03-111-1/+2
| | | | and rename them.
* tnl: Add support for datatype GL_FIXED in vertex arraysChad Versace2011-02-151-0/+40
| | | | | | | | | Before populating the vertex buffer attribute pointer (VB->AttribPtr[]), convert vertex data in GL_FIXED format to GL_FLOAT. Fixes bug: http://bugs.freedesktop.org/show_bug.cgi?id=34047 NOTE: This is a candidate for the 7.9 and 7.10 branches.
* tnl: assert that num_instances > 0Brian Paul2011-01-171-0/+2
|
* Merge branch 'draw-instanced'Brian Paul2011-01-153-9/+19
|\ | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_llvm.c src/gallium/drivers/llvmpipe/lp_state_fs.c src/glsl/ir_set_program_inouts.cpp src/mesa/tnl/t_vb_program.c
| * tnl: implement instanced drawingBrian Paul2010-12-103-9/+19
| |
* | tnl: Clean up header file inclusion in t_vertex.h.Vinson Lee2010-12-301-1/+4
| |
* | tnl: Clean up header file inclusion in t_vp_build.h.Vinson Lee2010-12-302-2/+2
| |
* | tnl: Clean up header file inclusion in tnl.h.Vinson Lee2010-12-301-1/+4
| |
* | tnl: a better way to initialize the gl_program_machine memoryBrian Paul2010-12-131-15/+17
| | | | | | | | | | | | This improves commit ef3f7e61b314236cbb7ed2cf24d34c6f90d9cfca NOTE: This is a candidate for the 7.9 and 7.10 branches.
* | tnl: Initialize gl_program_machine memory in run_vp.Vinson Lee2010-12-101-1/+1
|/ | | | | | | | Fixes piglit valgrind glsl-array-bounds-04 failure (FDO bug 29946). NOTE: This is a candidate for the 7.10 branch. This is a candidate for the 7.9 branch.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-1326-191/+191
|