summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: fixed computation of _EnabledCoordUnitsBrian Paul2009-03-021-8/+18
| | | | | This field should not include vertex textures. It indicates the coord inputs for fragment / fixed-function processing.
* mesa: clarify comments for per-unit texture bitfieldsBrian Paul2009-03-021-8/+14
|
* mesa: move texture_override() code into calling loopBrian Paul2009-03-021-30/+19
| | | | We can avoid a few iterations this way.
* mesa: move update_texture_compare_function() call out of loopBrian Paul2009-03-021-1/+3
|
* mesa: remove unused AUX buffersBrian Paul2009-03-023-21/+3
| | | | | | Remove all references to aux buffers 1..3. Keep AUX0 around for now just in case, but it'll probably go too someday. I don't know of any OpenGL drivers since the IRIX days that support aux color buffers.
* mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul2009-02-282-7/+6
| | | | | | | s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/ s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/ Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it. Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
* mesa: convert some #defines to enumsBrian Paul2009-02-282-49/+86
| | | | | | | | | | | | This makes debugging with gdb a bit easier. Ex: (gdb) p ctx->DrawBuffer.Attachment[BUFFER_STENCIL] Note however that gdb only seems to recognize enum types that are actually used to declare a variable somewhere. For example, gl_buffer_index isn't used to declare any vars so it's invisible to gdb. Work around this by adding a dummy function in context.c that declares some vars with these new types.
* mesa: move _GenFlags = 0x0 to texgen loopBrian Paul2009-02-281-1/+2
|
* mesa: move #include "bitset.h" out of mtypes.h - not needed in core MesaBrian Paul2009-02-281-1/+0
|
* mesa: Sparc's IROUND() optimization is invalid.David Miller2009-02-281-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't use the "fstoi" instruction like this. Unlike other floating point instructions, "fstoi" always rounds towards zero no matter what rounding mode the FPU has been set to. This was validated using the following test program: -------------------- static inline int iround(float f) { int r; __asm__ ("fstoi %1, %0" : "=f" (r) : "f" (f)); return r; } #define IROUND(x) iround(x) #define IROUND_REF(f) ((int) (((f) >= 0.0F) ? ((f) + 0.5F) : ((f) - 0.5F))) int main(void) { float f = -2.0; while (f < 3.0f) { int sparc_val = IROUND(f); int ref_val = IROUND_REF(f); if (sparc_val != ref_val) printf("DIFFERENT[%f]: REF==%d SPARC==%d\n", f, ref_val, sparc_val); f += 0.1f; } return 0; } -------------------- which prints out things like: -------------------- DIFFERENT[-1.900000]: REF==-2 SPARC==-1 DIFFERENT[-1.800000]: REF==-2 SPARC==-1 DIFFERENT[-1.700000]: REF==-2 SPARC==-1 DIFFERENT[-1.600000]: REF==-2 SPARC==-1 DIFFERENT[-1.000000]: REF==-1 SPARC==0 DIFFERENT[-0.900000]: REF==-1 SPARC==0 DIFFERENT[-0.800000]: REF==-1 SPARC==0 DIFFERENT[-0.700000]: REF==-1 SPARC==0 DIFFERENT[-0.600000]: REF==-1 SPARC==0 DIFFERENT[0.500000]: REF==1 SPARC==0 DIFFERENT[0.600000]: REF==1 SPARC==0 ... -------------------- So we have to remove Sparc's IROUND() definition, it's wrong. Signed-off-by: David S. Miller <[email protected]>
* mesa: move GLfixed type and related macros to swrast moduleBrian Paul2009-02-281-32/+0
| | | | Fixed point is only used in swrast and sw-based drivers.
* mesa: convert macro to inline functionBrian Paul2009-02-281-9/+12
|
* mesa: replace FEEDBACK_TOKEN macro with _mesa_feedback_token() inline functionBrian Paul2009-02-283-26/+30
|
* mesa: comments, whitespace, reformattingBrian Paul2009-02-282-32/+33
|
* mesa: remove dead codeBrian Paul2009-02-281-12/+0
|
* mesa: move gl_attrib_node struct to attrib.c tooBrian Paul2009-02-282-11/+13
|
* mesa: move gl_enable_attrib struct to attrib.c, the only place it's usedBrian Paul2009-02-282-78/+84
|
* mesa: lots of updated comments, formatting clean-upsBrian Paul2009-02-281-100/+89
|
* mesa: set bufObj->Pointer = NULL after unmappingBrian Paul2009-02-271-4/+3
| | | | Also, ctx->Driver.UnmapBuffer can never be null, so remove conditional.
* mesa: if a buffer object is mapped when glDeleteBuffers() is called, unmap itBrian Paul2009-02-271-0/+5
|
* mesa: updated commentsBrian Paul2009-02-271-24/+18
|
* mesa: fix incorrect error handling in glBufferDataARB()Brian Paul2009-02-271-2/+4
| | | | | | 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.
* mesa: avoid extraneous calls to ctx->Driver.BindFramebuffer()Brian Paul2009-02-261-6/+13
| | | | Only call this driver function when we really need to bind different buffers.
* mesa: Resurrect SPARC asm code.David S. Miller2009-02-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* mesa: fix merge conflict (in comment)Brian Paul2009-02-241-4/+0
|
* mesa: use quotes for #includeBrian Paul2009-02-241-1/+1
|
* mesa: include compiler.h, fixes cell build, remove Haiku special caseBrian Paul2009-02-231-4/+2
|
* mesa: fixes for building on HaikuTomas Wilhelmsson2009-02-232-2/+6
|
* mesa: Fix windows build.José Fonseca2009-02-231-0/+3
|
* mesa: remove unneeded #includeBrian Paul2009-02-221-1/+3
|
* mesa: #include, misc clean-upsBrian Paul2009-02-221-5/+4
|
* mesa: remove unneeded #includesBrian Paul2009-02-221-2/+0
|
* mesa: move a bunch of compiler-related stuff into new compiler.h headerBrian Paul2009-02-2212-440/+507
| | | | This trims down and cleans up imports.h and glheader.h quite a bit.
* mesa: remove unused ENABLE_TEXGENx, ENABLE_TEXMATx flagsBrian Paul2009-02-221-23/+8
|
* mesa: assorted clean-ups, var renaming, etc.Brian Paul2009-02-221-59/+59
|
* mesa: simplify texture combine state copying in _mesa_copy_texture_state()Brian Paul2009-02-221-8/+1
| | | | Just copy the whole struct.
* mesa: remove redundant assertions (same asserts in context.c)Brian Paul2009-02-221-3/+0
|
* mesa: added extern qualifierTom Fogal2009-02-211-1/+1
|
* mesa: use enums for TEXTURE_x_INDEX valuesBrian Paul2009-02-213-40/+28
| | | | | Plus, put them in the order of highest to lowest priority to simplify the texture_override() loop.
* mesa: use an array for current texture objectsBrian Paul2009-02-218-238/+137
| | | | Use loops to consolidate lots of texture object code.
* mesa: use an array for default texture objectsBrian Paul2009-02-214-90/+72
| | | | | Replace Default1D/2D/3D/Cube/etc with DefaultTex[TEXTURE_x_INDEX]. The same should be done with the Current1D/2D/3D/etc pointers...
* mesa: re-org texgen stateBrian Paul2009-02-215-505/+228
| | | | New gl_texgen struct allows quite a bit of code reduction.
* mesa: add TexShadow field to prog_instructionBrian Paul2009-02-201-6/+13
| | | | | If the instruction is TEX/TXP/TXL/etc the TexShadow field will be true if the instruction is a texture fetch with shadow compare.
* mesa: fix/update/restore comments related to two-sided stencilBrian Paul2009-02-192-2/+19
|
* mesa: initialize ctx->Stencil._BackFace = 1Brian Paul2009-02-191-0/+1
| | | | | | 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).
* mesa: convert VERT_RESULT_* from #defines to enum, like the othersBrian Paul2009-02-181-21/+24
|
* mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)Brian Paul2009-02-181-1/+1
| | | | | | | | 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.
* mesa: add some debug code to help diagnose incomplete FBO attachments (disabled)Brian Paul2009-02-171-0/+27
|
* mesa: turn on reporting of GLSL version 1.20Brian Paul2009-02-172-3/+3
| | | | | | 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).
* i965: Eric Anholt's patch for bumping up texture sizesRobert Ellison2009-02-131-4/+4
| | | | | | | | | | | | | 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.