summaryrefslogtreecommitdiff
path: root/src/mesa/main
AgeCommit message (Collapse)Author
2009-02-28mesa: lots of updated comments, formatting clean-upsBrian Paul
2009-02-27mesa: set bufObj->Pointer = NULL after unmappingBrian Paul
Also, ctx->Driver.UnmapBuffer can never be null, so remove conditional.
2009-02-27mesa: if a buffer object is mapped when glDeleteBuffers() is called, unmap itBrian Paul
2009-02-27mesa: updated commentsBrian Paul
2009-02-27mesa: fix incorrect error handling in glBufferDataARB()Brian Paul
If glBufferDataARB() is called while a buffer object is currently mapped we're supposed to unmap the current buffer, then replace it. Don't generate an error.
2009-02-26mesa: avoid extraneous calls to ctx->Driver.BindFramebuffer()Brian Paul
Only call this driver function when we really need to bind different buffers.
2009-02-26mesa: Resurrect SPARC asm code.David S. Miller
This rewrites the sparc GLAPI code so that it's PIC friendly and works with all of the TLS/PTHREADS/64-bit/32-bit combinations properly. As a result we can turn SPARC asm back on. Currently it's only enabled on Linux, as that's the only place where I can test this stuff out. For the moment the cliptest SPARC asm routines are disabled as they are non-working. The problem is that they use register %g7 as a temporary which is where the threading libraries store the thread pointer on SPARC. I will fix that code up in a future change as it's a pretty important routine to optimize. Like x86 we do the runtime patch as a pthread once-invoked initializer in init_glapi_relocs(). Unlike x86, however, our GLAPI stubs on SPARC are just two instruction sequences that branch to a trampoline and put the GLAPI offset into a register. The trampoline is what we run-time patch. The stubs thus all look like: glFoo: ba __glapi_sparc_foo_stub sethi GLAPI_OFFSET(glFOO) * PTR_SIZE, %g3 This actually makes generate_entrypoint() a lot simpler on SPARC. For this case in generate_entrypoint() we generate stubs using a 'call' instead of the 'ba' above to make sure it can reach. In order to get a proper tail call going here, in the unpatched case, we do several tricks. To get the current PC, for example, we save the return address register into a temporary, do a call, save the return address register written by the call to another temporary, then restore the original return address register value. This is to avoid having to allocate a stack frame. This is necessary for PIC address formation. This new GLAPI scheme lets us get rid of the ugly SPARC GLAPI hacks in __glXInitialize() and one_time_init(). Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-24mesa: fix merge conflict (in comment)Brian Paul
2009-02-24mesa: use quotes for #includeBrian Paul
2009-02-23mesa: include compiler.h, fixes cell build, remove Haiku special caseBrian Paul
2009-02-23mesa: fixes for building on HaikuTomas Wilhelmsson
2009-02-23mesa: Fix windows build.José Fonseca
2009-02-22mesa: remove unneeded #includeBrian Paul
2009-02-22mesa: #include, misc clean-upsBrian Paul
2009-02-22mesa: remove unneeded #includesBrian Paul
2009-02-22mesa: move a bunch of compiler-related stuff into new compiler.h headerBrian Paul
This trims down and cleans up imports.h and glheader.h quite a bit.
2009-02-22mesa: remove unused ENABLE_TEXGENx, ENABLE_TEXMATx flagsBrian Paul
2009-02-22mesa: assorted clean-ups, var renaming, etc.Brian Paul
2009-02-22mesa: simplify texture combine state copying in _mesa_copy_texture_state()Brian Paul
Just copy the whole struct.
2009-02-22mesa: remove redundant assertions (same asserts in context.c)Brian Paul
2009-02-21mesa: added extern qualifierTom Fogal
2009-02-21mesa: use enums for TEXTURE_x_INDEX valuesBrian Paul
Plus, put them in the order of highest to lowest priority to simplify the texture_override() loop.
2009-02-21mesa: use an array for current texture objectsBrian Paul
Use loops to consolidate lots of texture object code.
2009-02-21mesa: use an array for default texture objectsBrian Paul
Replace Default1D/2D/3D/Cube/etc with DefaultTex[TEXTURE_x_INDEX]. The same should be done with the Current1D/2D/3D/etc pointers...
2009-02-21mesa: re-org texgen stateBrian Paul
New gl_texgen struct allows quite a bit of code reduction.
2009-02-20mesa: add TexShadow field to prog_instructionBrian Paul
If the instruction is TEX/TXP/TXL/etc the TexShadow field will be true if the instruction is a texture fetch with shadow compare.
2009-02-19mesa: fix/update/restore comments related to two-sided stencilBrian Paul
2009-02-19mesa: initialize ctx->Stencil._BackFace = 1Brian Paul
Back-face stencil operations didn't work correctly because this value was zero. It needs to be 1 or 2. The only place it's set otherwise is in glEnable/Disable(GL_STENCIL_TEST_TWO_SIDE_EXT).
2009-02-18mesa: convert VERT_RESULT_* from #defines to enum, like the othersBrian Paul
2009-02-18mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)Brian Paul
Old limit was 256. Note that no arrays are declared to this size. The only place we have to be careful about raising this limit is the prog_src/dst_register Index bitfields. These have been bumped up too. Added assertions to check we don't exceed the bitfield in the future too.
2009-02-17mesa: add some debug code to help diagnose incomplete FBO attachments (disabled)Brian Paul
2009-02-17mesa: turn on reporting of GLSL version 1.20Brian Paul
The new array features, precision/invariant/centroid qualifiers, etc. were done a while back. The glGetString(GL_SHADING_LANGUAGE_VERSION) query returns "1.20" now (for drivers that support it anyway).
2009-02-13i965: Eric Anholt's patch for bumping up texture sizesRobert Ellison
I'm committing this because it fixes a conform failure; the failure occurs on the TextureProxy test, where the test attempts to create proxy textures at every level, but fails at the last level (border == 1, width == 1, height == 1) because it's beyond MAX_TEXTURE_LEVELS. Eric's original comment was: idr said that in his review swrast was ready for it, and the 965 driver is advertising it already though it has been resulting in many crashes due to arrays using these defines not being big enough.
2009-02-13mesa: add additional texture size/limit assertionsBrian Paul
2009-02-12glDrawBuffers(n==0) is validRobert Ellison
According to the GL spec, calling glDrawBuffers() with n == 0 is a valid operation (and essentially prevents drawing to any buffers). But _msa_DrawBuffersARB() was producing a GL_INVALID_VALUE error in this case. This fix adjusts the error check, and makes a small change to the ctx->Driver.DrawBuffer() call below to ensure that, if n == 0, Driver.DrawBuffer() is called with GL_NONE and that buffers[0] is *not* referenced in this case (since we don't know whether it is valid). Internal identifier: 365833
2009-02-12mesa: don't include m_xform.h where not neededBrian Paul
2009-02-12mesa: move _mesa_transform_vector() from m_xform.c to m_matrix.cBrian Paul
m_xform.c is omitted from gallium builds but _mesa_transform_vector() is still needed.
2009-02-12mesa: restore FLUSH_VERTICES() in _mesa_notifySwapBuffers()Brian Paul
2009-02-11mesa: get rid of _math_init()Brian Paul
Only VBO uses the evaluator code so call _math_init_eval() there. Only TNL uses the transform/translate code so call _math_init_transformation() and _math_init_translate9) there. This is a step toward resolving some symbol collisions between Mesa's and gallium's x86 codegen. Have VBO and TNL modules call _math_init_transformation()
2009-02-11mesa: Move statements after declarations.José Fonseca
2009-02-10Merge commit 'origin/gallium-master-merge'Brian Paul
This is the big merge of the gallium-0.2 branch into master. gallium-master-merge was just the staging area for it. Both gallium-0.2 and gallium-master-merge are considered closed now. Conflicts: progs/demos/Makefile src/mesa/main/state.c src/mesa/main/texenvprogram.c
2009-02-10Merge commit 'origin/gallium-0.2' into gallium-master-mergeBrian Paul
2009-02-10mesa: remove the unused _mesa_UpdateTexEnvProgram() functionBrian Paul
2009-02-10mesa: another fix for program/texture state validationBrian Paul
This fixes a regression introduced in 46ae1abbac6837d051c10b2e8b57eab3d4958ff4 Break program validation into two steps, do part before texture state validation and do the rest after: 1. Determine Vertex/Fragment _Enabled state. 2. Update texture state. 3. Determine pointers to current Vertex/Fragment programs (which may involve generating new "fixed-function" programs). See comments in the code for more details of the dependencies.
2009-02-10mesa: s/_IMAGE_NEW_TRANSFER_STATE/_MESA_NEW_TRANSFER_STATE/ to be more ↵Brian Paul
consistant with other flags
2009-02-10mesa: fix/change state validation order for program/texture stateBrian Paul
Program state needs to be updated before texture state since the later depends on the former. Fixes piglit texgen failure. The second time through the modes (press 't' three times) we disable the fragment program and return to conventional texture mode. State validation failed here because update_texture() saw stale fragment program state.
2009-02-09mesa: fixes for srgb formatsRoland Scheidegger
swizzling in fetch/store srgba/sargb functions fixed (consistent with equivalent non-srgb formats now).
2009-02-09fix _mesa_get_teximage for srgb texturesRoland Scheidegger
2009-02-09mesa: avoid setting texObj->_Complete = GL_FALSE when there's no state changeBrian Paul
Avoid a little bit of unneeded state validation and fixes a bug where the texture complete flags was set to false, but we didn't signal _NEW_TEXTURE. Fixes piglit tex1d-2dborder failure.
2009-02-09mesa: add no-change testing for a few more texture parametersBrian Paul