summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: restore draw rasterization stage after rasterposBrian Paul2010-02-121-0/+8
| | | | | | | 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)
* st/mesa: improved draw_range_elements codeBrian Paul2010-02-121-9/+7
| | | | | | | | 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.
* st/mesa: rename state -> tgsi, updated commentsBrian Paul2010-02-126-22/+24
|
* st/mesa: remove unused varBrian Paul2010-02-121-3/+0
|
* Merge branch 'gallium-dynamicstencilref'Roland Scheidegger2010-02-123-4/+17
|\
| * gallium: make max_anisotropy a unsigned bitfield memberRoland Scheidegger2010-02-121-1/+1
| | | | | | | | | | | | | | 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.
| * gallium: give pipe_stencil_ref its own cso_save/restore functionsRoland Scheidegger2010-02-111-0/+2
| | | | | | | | seems cleaner, and other dynamic state like viewport is handled that way too
| * gallium: also save/restore stencil_ref in cso_save/restore_depth_stencil_alphaRoland Scheidegger2010-02-111-17/+2
| | | | | | | | makes life of state trackers easier
| * st/mesa: more fixes for stencil ref change.Roland Scheidegger2010-02-102-2/+20
| | | | | | | | | | compiles. Might need to do something to make it possible to save/restore stencil ref.
| * gallium: don't put stencil ref value in pipe_depth_stencil_alpha_stateRoland Scheidegger2010-02-091-1/+9
| | | | | | | | | | | | | | | | 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.
* | st/mesa: fix gallium texture level selection for RTTBrian Paul2010-02-111-3/+11
| | | | | | | | | | | | | | | | 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.
* | st/mesa: Silence uninitialized variable warning in st_cb_bitmap.c.Vinson Lee2010-02-101-1/+2
|/
* Merge branch 'gallium-nopointsizeminmax'Roland Scheidegger2010-02-093-15/+59
|\ | | | | | | | | | | | | Conflicts: src/gallium/drivers/nv10/nv10_state.c src/gallium/drivers/nv20/nv20_state.c src/gallium/drivers/nv50/nv50_program.c
| * st/mesa: fix wrong initialization of MaxPointSizeRoland Scheidegger2010-02-081-0/+4
| |
| * gallium: add point_quad_rasterization bit to rasterizer stateRoland Scheidegger2010-02-041-1/+2
| | | | | | | | | | This determines if points should be rasterized according to GL point rules or as normal quads (GL point sprites / d3d points / d3d point sprites).
| * gallium: add point size clamp to implementation limits in vertex shaderRoland Scheidegger2010-02-042-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * gallium: clean up point sprite rasterizer stateRoland Scheidegger2010-02-031-12/+13
| | | | | | | | | | | | | | | | | | | | 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).
| * gallium: remove point_size_min and point_size_max from rasterizer stateRoland Scheidegger2010-01-121-3/+0
| | | | | | | | | | | | | | The state tracker is responsible for clamping to any graphics API enforced size min/max limits for both the static point_size setting as well as per vertex point size (in the vertex shader). Note that mesa state tracker didn't actually use these values.
* | st/mesa: remove special-case cyl-wrap codeBrian Paul2010-02-091-9/+1
| | | | | | | | Cylinder wrap mode works with perspective interpolation now.
* | st/mesa: check for PROG_PARAM_BIT_CYL_WRAP flagBrian Paul2010-02-092-5/+22
| |
* | mesa: Ensure object refcount is null when destroying the buffer.José Fonseca2010-02-091-0/+2
| | | | | | | | | | | | | | | | 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.
* | st/mesa: allow negative index for PROGRAM_STATE_VARBrian Paul2010-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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)
* | st/mesa: 'fix' point coord semantic infoBrian Paul2010-02-051-1/+10
| | | | | | | | | | | | | | | | | | | | 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).
* | mesa: change ctx->Driver.ProgramStringNotify() to return GLbooleanBrian Paul2010-02-041-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | st/mesa: Remove unnecessary headers.Vinson Lee2010-02-034-5/+0
| |
* | Merge branch 'gallium-embedded'José Fonseca2010-02-0320-13/+20
|\ \
| * | gallium: pipe/p_inlines.h -> util/u_inlines.hJosé Fonseca2010-02-0219-13/+19
| | |
| * | mesa: Add missing includes.José Fonseca2010-02-011-0/+1
| | |
* | | mesa: Factor out the fb initialization details from _mesa_new_framebuffer.Francisco Jerez2010-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | | mesa/st: bump the gallium version numberKeith Whitwell2010-02-031-1/+1
| | | | | | | | | | | | | | | This is a very informal version number, but there have been enough changes that a bump is appropriate at this time.
* | | st/mesa: remove some floating point divides in viewport calculationKeith Whitwell2010-02-031-3/+3
| | | | | | | | | | | | | | | Compiler can't usually turn x/2.0f into x * 0.5f, though we're happy with either.
* | | st/mesa: fix texture deallocation bugBrian Paul2010-02-011-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | st/mesa: remove duplicate calculation of fp input mappingKeith Whitwell2010-02-015-37/+12
| | | | | | | | | | | | | | | This was being calculated the same way in two different places. Now just do it in st_translate_fragment_program().
* | | st/mesa: remove dead stfp input_map arrayKeith Whitwell2010-02-012-12/+0
|/ / | | | | | | Was being calculated and not used. Also was probably incorrect...
* | st/mesa: Remove unnecessary headers.Vinson Lee2010-01-313-3/+0
| |
* | Merge commit 'lb2/arb_fragment_coord_conventions'Keith Whitwell2010-01-292-3/+72
|\ \
| * | st/mesa: Gallium support for ARB_fragment_coord_conventions (v4)Luca Barbieri2010-01-292-3/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | st/mesa: check that state is validated before drawingBrian Paul2010-01-291-0/+3
|/ / | | | | | | | | | | | | | | (cherry picked from commit 4d1234e22242529c8d85f5ef0cf826af41a91570) Conflicts: src/mesa/state_tracker/st_draw.c
* | Merge commit 'origin/perrtblend'Roland Scheidegger2010-01-283-39/+94
|\ \ | | | | | | | | | | | | | | | Conflicts: src/gallium/drivers/softpipe/sp_screen.c src/gallium/include/pipe/p_defines.h
| * | mesa/st: code cleanups for new blend functionalityRoland Scheidegger2010-01-261-9/+23
| | | | | | | | | | | | minor code changes, style and comment fixes
| * | st/mesa: handle EXT_draw_buffers2 per rendertarget blend enables / colormasksRoland Scheidegger2010-01-252-31/+72
| | | | | | | | | | | | uses the new gallium per-rt blend functionality
| * | gallium: prepare for per-rendertarget blend enables, writemasks, blend funcsRoland Scheidegger2010-01-202-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | GL 3.0 (EXT_draw_buffers2) and other APIs allow independent blend enables and write masks per render target, ARB_draw_buffers_blend (and other APIs) also allow independent blend functions. Things like dithering, logic ops however are not extended to be per rendertarget, that might be conceptually possible however it doesn't look like any API wants to expose this.
* | | gallium: Enable multiple constant buffers for vertex and geometry shaders.Michal Krol2010-01-281-1/+1
| | |
* | | st/mesa: Silence uninitialized variable warning.Vinson Lee2010-01-261-0/+1
| | |
* | | Merge branch 'mesa_7_7_branch'Brian Paul2010-01-251-6/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | st/mesa: fix int->uint conversion for negative scissor bound valuesBrian Paul2010-01-241-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a patch by Xavier Chantry <[email protected]>: 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.
| * | | st/mesa: fix unsigned/signed breakage in scissorXavier Chantry2010-01-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* | | | Fix compressed texture loads for non-minimal pitches againLuca Barbieri2010-01-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | | | st/mesa: fix incorrect freeing of drawpixels vertex shadersBrian Paul2010-01-222-3/+5
| | | | | | | | | | | | | | | | | | | | These shaders are not st_vertex_shaders, but tgsi ureg shaders. Fixes fd.o bug 25959.
* | | | Merge branch 'mesa_7_7_branch'Brian Paul2010-01-2225-76/+66
|\| | | | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c