summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-07-11gallium: compare the actual register, not all the inputsZack Rusin1-1/+1
otherwise we decrement indexes for all registers
2009-07-10tgsi: update some assertionsBrian Paul1-4/+4
2009-07-10tgsi: tgsi: add semantic_names[] string for TGSI_SEMANTIC_FACEBrian Paul1-1/+6
Same story as in the tgsi_dump.c code (see prev commit).
2009-07-10tgsi: add semantic_names[] string for TGSI_SEMANTIC_FACEBrian Paul1-1/+6
Fixes TGSI dump output when front/back-face register is declared. Also, add some assertions to make sure the semantic/interpolate string arrays have as many elements as there are tokens in the p_shader_tokens.h file. That should catch problems like this in the future.
2009-07-10st/mesa: implement indirect addressing for destination registersBrian Paul1-0/+5
2009-07-10tgis: implement indirect addressing for destination registersBrian Paul6-11/+101
Includes the TGSI interpreter, but not the SSE/PPC/etc code generators.
2009-07-10vbo: fix vbo/dlist memory leakBrian Paul1-0/+5
Based on a patch by kristof.ralovich@gmail.com
2009-07-10demos: set 4th component of texcoord to 1.0Brian Paul1-0/+1
Avoid potential randomness in resulting texcoords.
2009-07-10Remove stale reference to non-Gallium nouveau driver from configure.ac.Michel Dänzer1-1/+1
2009-07-09mesa: From float type modifier from values to large for singlesIan Romanick1-7/+7
The values 2147483648.0 and 4294967294.0 are too larget to be stored in single precision floats. Forcing these to be singles causes bits to be lost, which results in errors in some pixel transfer tests. This fixes bug #22344. (cherry picked from commit 70e72070fce6aa1e0918dcc62c1949465cee69f7)
2009-07-09docs: document gl_TextureMatrix[i][j] array indexing bug fixBrian Paul1-0/+1
2009-07-09glsl: do const parameter optimization for array element actual parametersBrian Paul1-2/+3
When a function parameter is const-qualified we can avoid making a copy of the actual parameter (we basically do a search/replace when inlining). This is now done for array element params too, resulting in better code (fewer MOV instructions). We should allow some other types of function arguments here but let's be conservative for the moment.
2009-07-09glsl: fix incorrect indexing for gl_TextureMatrix[i][j]Brian Paul1-5/+6
The two indexes were mixed up when accessing a row of a matrix in an array of matrices.
2009-07-08docs: document glMaterial/glShadeModel display list optimizationBrian Paul1-0/+1
2009-07-07mesa: only use fallback texture when using shaders, not fixed-function (take ↵Brian Paul1-7/+13
two) The semantics are a little different for shaders vs. fixed-function when trying to use an incomplete texture. The fallback texture returning (0,0,0,1) should only be used with shaders. For fixed function, the texture unit is truly disabled/ignored. Fixes glean fbo test regression. (cherry picked from commit 01e16befd4809e3e93ee7855a4a5d7df9fe010d9) (cherry picked from commit 51325f44d1e7e62b47795a79f8038d10dc5bc30b) [anholt: squashed these two together from master, skipping the mess in between]
2009-07-07gallium: fixup register indexes for fog/frontface/point coordZack Rusin1-3/+12
2009-07-07gallium: Fixes for clobbering stencil values in combined depth/stencil textures.Michel Dänzer3-11/+64
Also fix one case where a 32 bit depth value was incorrectly converted to a combined depth/stencil value.
2009-07-07GLX/DRI1: Mark GLX visuals with depth != screen depth non-conformant.Michel Dänzer1-0/+23
Such visuals are subject to automatic compositing in the X server, so DRI1 can't render to them properly.
2009-07-07gallium: Only set FRONT_STATUS_COPY_OF_BACK if there is a back buffer.Michel Dänzer1-1/+2
Fixes potential crash when SwapBuffers is called but there's no back buffer.
2009-07-06gallium: more fog extraction fixesZack Rusin3-25/+39
fix the cases when fog coord/front face/point coord are used in the same shader.
2009-07-06demos: Fix vsync checking in glxgearsIan Romanick1-19/+16
Of course glXGetVideoSyncSGI doesn't return the swap interval. The feature only exists in the Mesa extension... which is the whole reason I created the Mesa extension! Note that the Mesa extension allows drivers to default to a swap interval of 0. If the Mesa extension exists, use its value. Only consider the SGI extension when the Mesa extension is not available. Fixes bug #22604.
2009-07-06wgl: Make the stw_framebuffer destructions threadsafe.José Fonseca5-82/+186
Ensure no other thread is accessing a framebuffer when it is being destroyed by acquiring both the global and per-framebuffer mutexes. Normal access only needs the global lock to walk the linked list and acquire the per-framebuffer mutex.
2009-07-06wgl: Check for multiple threads before GET_CURRENT_CONTEXT.José Fonseca1-2/+8
Fixes wglthreads -- the 2nd thread MakeCurrent call was trying to flush the first thread context while still in use.
2009-07-06wgl: Listen to WM_WINDOWPOSCHANGED instead of WM_SIZE messages.José Fonseca1-44/+45
According to http://blogs.msdn.com/oldnewthing/archive/2008/01/15/7113860.aspx WM_SIZE is generated from WM_WINDOWPOSCHANGED by DefWindowProc so it can be masked out by the application. Also there were some weird bogus WM_SIZE 0x0 messages when starting sharedtex_mt which we don't get like this.
2009-07-04i965: fix fetching constants from constant buffer in glsl pathRoland Scheidegger4-17/+16
the driver used to overwrite grf0 then use implicit move by send instruction to move contents of grf0 to mrf1. However, we must not overwrite grf0 since it's still used later for fb write. Instead, do the move directly do mrf1 (we could use implicit move from another grf reg to mrf1 but since we need a mov to encode the data anyway it doesn't seem to make sense). I think the dp_READ/WRITE_16 functions may suffer from the same issue. While here also remove unnecessary msg_reg_nr parameter from the dataport functions since always message register 1 is used.
2009-07-04i965: Remove bad constant buffer constant-reg-already-loaded optimization.Eric Anholt1-13/+11
Thanks to branching, the state of c->current_const[i].index at the point of emitting constant loads for this instruction may not match the actual constant currently loaded in the reg at runtime. Fixes a regression in my GLSL program for idr's class since b58b3a786aa38dcc9d72144c2cc691151e46e3d5.
2009-07-03intel: Also update stencil bits in intel_update_wrapper().Michel Dänzer1-0/+1
Fixes assertion failure when binding depth/stencil texture to FBO stencil attachment.
2009-07-03progs: revert damage to progs/SConscript from recent compressed texture commitKeith Whitwell1-0/+9
2009-07-03mesa/shaders: fix gl_NormalMatrix state parametersKeith Whitwell1-1/+1
gl_NormalMatrix is the inverse transpose of the modelview matrix, but as every matrix here needs to be transposed, we end up with {MODELVIEW_MATRIX, INVERSE}.
2009-07-03st/wgl: don't advertise WGL_EXT_swap_interval stringKeith Whitwell1-1/+1
This is a tweak to a previous fix -- it's not necessary to actually advertise this extension to prevent these games from crashing -- they ignore the extension string anyway. It's sufficient to just have GetProcAddress return some dummy function addresses for SwapInterval. Given we don't really implement this funcitonality, this is a better fix.
2009-07-03wgl: Lookup framebuffers by HWND whenever possible.José Fonseca1-0/+10
Some applications create several HDCs for the same window, so spite the WGL API is geared towards HDCs it is not reliable searching by HDC.
2009-07-02mesa: Assume depth textures have a single level unless told otherwise.José Fonseca1-1/+3
2009-07-02mesa: s/TRUE/GL_TRUEKeith Whitwell1-1/+1
Fix compile breakage on Linux.
2009-07-02glapi: ensure _mesa_lookup_prim_by_nr() is not clobbered on regenerationKeith Whitwell1-0/+23
Propogate changes to enums.c back up to the python source.
2009-07-02Merge commit 'origin/dlist-statechange-shortcircuit' into mesa_7_5_branchKeith Whitwell14-37/+1011
Conflicts: progs/trivial/Makefile Pull in a minimal version of statechange shortcircuiting in display list compilation. This affects only glMaterial and glShadeModel state, and includes quite a few tests to exercise various tricky cases. If this goes well, will consider extending to all state in the future.
2009-07-02mesa: ensure UsesFogFragCoord value is set for non-glsl shadersKeith Whitwell2-0/+8
With recent changes to support frontfacing in glsl, it is necessary to ensure that the UsesFogFragCoord value is accurate in all shaders. We were previously not setting it for fixed-function and ARB_fs shaders.
2009-06-30mesa/vbo: fix compile and replay of nodes ending in a FALLBACKKeith Whitwell3-13/+187
Where vbo save nodes are terminated with a call to DO_FALLBACK(), as in the case of a recursive CallList which is itself within a Begin/End pair, there two problems: 1) The display list node's primitive information was incorrect, stating the cut-off prim had zero vertices 2) On replay, we would get confused by a primitive that started in a node, but was terminated by individual opcodes. This change fixes the first problem by correctly terminating the last primitive on fallback, and the second by forcing the display list to use the Loopback path, converting all nodes into immediate-mode rendering. The loopback fix is a performance hit, but avoiding this would require a fairly large rework of this code.
2009-06-30mesa/dlist: fixes and improvements for material cachingKeith Whitwell1-8/+16
Only short-circuit material call if *all* statechanges from this call are cached. Some material calls (eg with FRONT_AND_BACK) change more than one piece of state -- need to check all of them before returning. Also, Material calls are legal inside begin/end pairs, so don't need to be as careful about begin/end state as with regular statechanges (like ShadeModel) when caching. Take advantage of this and do better caching.
2009-06-30progs/trivial: add dlist-mat-tri.cKeith Whitwell2-0/+183
2009-06-30progs/trivial: add test case for short-circuiting material changesKeith Whitwell2-0/+175
Similar to dlist-tri-flat-tri, but using glMaterial calls, which have the extra property of being legal within Begin/End calls.
2009-06-30mesa/dlist: don't cache state which may not be replayed on CallListKeith Whitwell1-1/+5
Statechanges which occur before the first End in a display list may not be replayed when the list is called, in particular if it is called from within a begin/end pair. Recognize vulnerable statechanges and do not use them to fill in the state cache.
2009-06-30progs/trivial: add dlist-flat-tri.cKeith Whitwell2-0/+172
State-change functions which precede the first call to glEnd() in a compiled list are vulnerable to not being executed when that list is called. In particular this can happen if a list is invoked from within a begin/end pair, as in this example.
2009-06-30mesa/dlist: invalidate cached dlist compile state after CallListKeith Whitwell1-16/+24
When compiling a display list containing a CallList, it is necessary to invalidate any assumption about the GL state after the recursive call completes.
2009-06-30progs/trivial: add dlist-recursive-callKeith Whitwell2-0/+191
When one display list calls another display list, it is possible that the calling display list makes state-changes or other actions which invalidate any attempt at caching or state-change elimination in the calling list. This test exercises one such case, where the called list consists of just a single glShadeModel() call.
2009-06-30dlist-tri-flat-tri: make tri render differently if flatshade not enabledKeith Whitwell1-1/+3
When testing flat-shading, it helps to specify per-vertex colors so that you can distinguish between flat & smooth shading.
2009-06-30Merge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuitKeith Whitwell15-272/+345
Need this to pick up fixes for per-vertex materials.
2009-06-30progs/trivial: add test case for lighting plus per-vertex materialsKeith Whitwell2-0/+150
Exercise material-within-begin/end case.
2009-06-30progs/isosurf: add materials mode for glVertex + TRISTRIPKeith Whitwell1-5/+20
2009-06-30mesa: remove whitespaceKeith Whitwell1-108/+108
2009-06-30mesa: remove dead constant pointsize code from ffvertex_prog.cKeith Whitwell1-17/+0