summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
AgeCommit message (Collapse)Author
2010-02-14st/mesa: use _mesa_clone_fragment_program()Brian Paul
2010-02-14mesa: Add missing include.José Fonseca
2010-02-14mesa: Use util_format_name().José Fonseca
2010-02-12st/mesa: restore draw rasterization stage after rasterposBrian Paul
This fixes invalid calls to rastpos_point/line/tri() that can occur when glRasterPos() is called while in feedback or selection mode. (cherry picked from commit b3c7dc6ff232eb4c5ff6b0ddcfa90bcb56f78df1)
2010-02-12st/mesa: improved draw_range_elements codeBrian Paul
Don't use pipe->draw_range_elements() if min_index=max_index=~0 since that doesn't provide any useful info. Also, implement the loop around pipe->draw_range_elements() when nr_prims > 1.
2010-02-12st/mesa: rename state -> tgsi, updated commentsBrian Paul
2010-02-12st/mesa: remove unused varBrian Paul
2010-02-12Merge branch 'gallium-dynamicstencilref'Roland Scheidegger
2010-02-12gallium: make max_anisotropy a unsigned bitfield memberRoland Scheidegger
saves us a dword in sampler state, hw can't do non-integer aniso degree anyway. To allow aniso 1x (which seems of dubious value but some hardware (radeons) have such a mode, and even d3d allows specifiying it) redefine anisotropic filtering as disabled only if max_anistropy is 0.
2010-02-11gallium: give pipe_stencil_ref its own cso_save/restore functionsRoland Scheidegger
seems cleaner, and other dynamic state like viewport is handled that way too
2010-02-11st/mesa: fix gallium texture level selection for RTTBrian Paul
Fixes invalid texture level when rendering to a texture where GL_BASE_LEVEL > 0. This will be cherry-picked to the 7.7 branch after additional testing.
2010-02-11gallium: also save/restore stencil_ref in cso_save/restore_depth_stencil_alphaRoland Scheidegger
makes life of state trackers easier
2010-02-10st/mesa: Silence uninitialized variable warning in st_cb_bitmap.c.Vinson Lee
2010-02-10st/mesa: more fixes for stencil ref change.Roland Scheidegger
compiles. Might need to do something to make it possible to save/restore stencil ref.
2010-02-09gallium: don't put stencil ref value in pipe_depth_stencil_alpha_stateRoland Scheidegger
This will make driver's life a bit harder, however it makes sense that stencil reference value is not part of the pipe_depth_stencil_alpha_state, because it often (there are some algorithms which require this) changes more frequently than the rest of the dsa state. This is also encouraged by some graphic APIs. Treat it similar to pipe_blend_color.
2010-02-09Merge branch 'gallium-nopointsizeminmax'Roland Scheidegger
Conflicts: src/gallium/drivers/nv10/nv10_state.c src/gallium/drivers/nv20/nv20_state.c src/gallium/drivers/nv50/nv50_program.c
2010-02-08st/mesa: fix wrong initialization of MaxPointSizeRoland Scheidegger
2010-02-09st/mesa: remove special-case cyl-wrap codeBrian Paul
Cylinder wrap mode works with perspective interpolation now.
2010-02-09st/mesa: check for PROG_PARAM_BIT_CYL_WRAP flagBrian Paul
2010-02-09mesa: Ensure object refcount is null when destroying the buffer.José Fonseca
Lets see if this is not too pedantic. Obj pointers are never exposed to GL apps so it should be possible to get this right. Furthermore apps with GL widgets and test suits create and destroy many contexts and objects, so bad reference counting is not really an option.
2010-02-05st/mesa: allow negative index for PROGRAM_STATE_VARBrian Paul
The piglit vp-address-01 test uses negative address-relative offsets. In this test we're indexing into PROGRAM_STATE_VAR which, in turn, contains references to ENV vars. We previously fixed this issue for PROGRAM_CONSTANT. piglit/vp-address-01 (the version from Feb 5) passes now. (cherry picked from commit 64be837b0b171c44f47a3c0b83f566d292ffff50)
2010-02-05st/mesa: 'fix' point coord semantic infoBrian Paul
This fixes the progs/glsl/pointcoord.c demo. But this isn't a proper fix. We really need a TGSI_SEMANTIC_POINT_COORD label so that the draw module can determine which fragment input / vertex output slot needs to be set up with the point coordinate info. We've been using generic slot 0 so far. This would also require telling the draw module about fragment shaders (something it doesn't have at this time).
2010-02-04mesa: change ctx->Driver.ProgramStringNotify() to return GLbooleanBrian Paul
GL_TRUE indicates that the driver accepts the program. GL_FALSE indicates the program can't be compiled/translated by the driver for some reason (too many resources used, etc). Propogate this result up to the GL API: set GL_INVALID_OPERATION error if glProgramString() was called. Set shader program link status to GL_FALSE if glLinkProgram() was called. At this point, drivers still don't do any program checking and always return GL_TRUE.
2010-02-04gallium: add point_quad_rasterization bit to rasterizer stateRoland Scheidegger
This determines if points should be rasterized according to GL point rules or as normal quads (GL point sprites / d3d points / d3d point sprites).
2010-02-04gallium: add point size clamp to implementation limits in vertex shaderRoland Scheidegger
The point size min/max registers (unused by mesa state tracker) were removed since most hardware couldn't do much with them. However, we don't want to have to rely on hw to do point size clamping correctly to implementation dependent limits, hence have to do that in the vertex shader. This should also solve a potential problem with (non-AA) points smaller than 1.0 which according to OGL still have size 1.0. Note that OGL point rendering is odd, in particular point sprites are rasterized differently to points. Some hardware might support those different modes, but in any case the different clamping values used for smooth/multisampled/sprite enabled points might help a bit for hw which rasterizes points the same as point sprites. Also tweak mesa's ff to vertex shader translation so don't have to clamp twice in case of point attenuation.
2010-02-03st/mesa: Remove unnecessary headers.Vinson Lee
2010-02-03Merge branch 'gallium-embedded'José Fonseca
2010-02-03gallium: clean up point sprite rasterizer stateRoland Scheidegger
Don't need sprite coord origin per coord. Also, don't need separate sprite enable bit - if all coords have it diabled, then there are no point sprites (technically, there's a distinction in pre-GL3, but it only differs in having more leniency in clamping to max size, something the state tracker would need to handle and the hardware won't bother anyway). Also, use packed field for the per-coord enables. All in all, should save 3 dwords in rasterizer state (from 10 down to 7).
2010-02-03mesa: Factor out the fb initialization details from _mesa_new_framebuffer.Francisco Jerez
This should make things easier for drivers wanting to work with a "subclass" of gl_framebuffer. The complementary "_mesa_initialize_framebuffer" function is now called "_mesa_initialize_window_framebuffer" for the sake of symmetry. Signed-off-by: Brian Paul <brianp@vmware.com>
2010-02-03mesa/st: bump the gallium version numberKeith Whitwell
This is a very informal version number, but there have been enough changes that a bump is appropriate at this time.
2010-02-03st/mesa: remove some floating point divides in viewport calculationKeith Whitwell
Compiler can't usually turn x/2.0f into x * 0.5f, though we're happy with either.
2010-02-02gallium: pipe/p_inlines.h -> util/u_inlines.hJosé Fonseca
2010-02-01st/mesa: fix texture deallocation bugBrian Paul
This fixes a bug reported by Christoph Bumiller on mesa3d-dev. When a texture is first created as RGBA, then re-defined with glTexImage(internalFormat=GL_DEPTH_COMPONENT) we failed to deallocate the original texture. When this texture was bound as a FBO surface, the depth/Z surface format was RGBA instead of Z. Depending on the driver this led to a failed assertion or FBO validation failure. This patch does three things: 1. Remove ancient code that mysteriously tested if we were replacing the smallest mipmap level and tested if the texture was not a cube map texture. I can't see any reason for those tests. 2. Move the width=height=depth=0 test to after the code which frees texture data. Calling glTexImage with width=height=depth=0 and data=NULL is a way to free a single mipmap level. 3. Update the code comments. There are no apparent conform, glean or piglit regressions from this change. (cherry picked from commit 43e4b584227534e30e487e7fb7e99d6501cbcd85)
2010-02-01st/mesa: remove duplicate calculation of fp input mappingKeith Whitwell
This was being calculated the same way in two different places. Now just do it in st_translate_fragment_program().
2010-02-01st/mesa: remove dead stfp input_map arrayKeith Whitwell
Was being calculated and not used. Also was probably incorrect...
2010-02-01mesa: Add missing includes.José Fonseca
2010-01-31st/mesa: Remove unnecessary headers.Vinson Lee
2010-01-29Merge commit 'lb2/arb_fragment_coord_conventions'Keith Whitwell
2010-01-29st/mesa: check that state is validated before drawingBrian Paul
(cherry picked from commit 4d1234e22242529c8d85f5ef0cf826af41a91570) Conflicts: src/mesa/state_tracker/st_draw.c
2010-01-29st/mesa: Gallium support for ARB_fragment_coord_conventions (v4)Luca Barbieri
Changes in v4; - Implemented Brian Paul's style suggestions Changes in v3: - Use positive caps instead of negative ones Changes in v2: - Updated formatting The state tracker will use the TGSI convention properties if the hardware exposes the appropriate capability, and otherwise adjust WPOS itself. This will also fix some drivers that were previously broken due to their incorrect, inadvertent, use of conventions other than upper_left+half_integer.
2010-01-28Merge commit 'origin/perrtblend'Roland Scheidegger
Conflicts: src/gallium/drivers/softpipe/sp_screen.c src/gallium/include/pipe/p_defines.h
2010-01-28gallium: Enable multiple constant buffers for vertex and geometry shaders.Michal Krol
2010-01-26st/mesa: Silence uninitialized variable warning.Vinson Lee
2010-01-26mesa/st: code cleanups for new blend functionalityRoland Scheidegger
minor code changes, style and comment fixes
2010-01-25Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/intel/intel_screen.c src/mesa/drivers/dri/intel/intel_swapbuffers.c src/mesa/drivers/dri/r300/r300_emit.c src/mesa/drivers/dri/r300/r300_ioctl.c src/mesa/drivers/dri/r300/r300_tex.c src/mesa/drivers/dri/r300/r300_texstate.c
2010-01-25st/mesa: handle EXT_draw_buffers2 per rendertarget blend enables / colormasksRoland Scheidegger
uses the new gallium per-rt blend functionality
2010-01-25Fix compressed texture loads for non-minimal pitches againLuca Barbieri
My commit eea6a7639f767b1d30b6ef1f91a9c49e3f3b78f0 does a memcpy of height lines, but that's wrong because the texture has a block layout and we must thus use the number of vertical blocks instead of the height. Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-24st/mesa: fix int->uint conversion for negative scissor bound valuesBrian Paul
Based on a patch by Xavier Chantry <chantry.xavier@gmail.com>: If x+width or y+height is negative, then maxx or maxy will get a bogus value when converting that to unsigned. Fix this by setting 0 as minimal value. This was also triggered by teeworlds, but only with some combination of resolution and map section. For example upper part of dm2 at 1280x1024.
2010-01-24st/mesa: fix unsigned/signed breakage in scissorXavier Chantry
commit 53174afeeb introduced a portability change that converted GLint x,y to GLuint. That breaks when x and y are negative, which seems to be allowed, and which at least one game uses : teeworlds. Rather than simply reverting the change, it seems possible to convert the 16bit unsigned to GLint so that comparisons are made between signed integers instead. This hopefully does not break anything while keeping MSVC happy. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-22st/mesa: fix incorrect freeing of drawpixels vertex shadersBrian Paul
These shaders are not st_vertex_shaders, but tgsi ureg shaders. Fixes fd.o bug 25959.