summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_sampler.c
AgeCommit message (Collapse)Author
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-01-22Merge branch 'mesa_7_7_branch'Brian Paul
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
2010-01-16st/mesa: Remove unnecessary header from st_atom_sampler.c.Vinson Lee
2010-01-06gallium: remove PIPE_TEX_FILTER_ANISOLuca Barbieri
This patch removes PIPE_TEX_FILTER_ANISO. Anisotropic filtering is enabled if and only if max_anisotropy > 1.0. Values between 0.0 and 1.0, inclusive, of max_anisotropy are to be considered equivalent, and meaning to turn off anisotropic filtering. This approach has the small drawback of eliminating the possibility of enabling anisotropic filter on either minification or magnification separately, which Radeon hardware seems to support, is currently support by Gallium but not exposed to OpenGL. If this is actually useful it could be handled by splitting max_anisotropy in two values and adding an appropriate OpenGL extension. NOTE: some fiddling & reformatting by keithw to get this patch to apply. Hopefully nothing broken in the process.
2010-01-04mesa: make texture BorderColor a union of float/int/uintBrian Paul
When we have integer-valued texture formats, the texture border color must also store integer and uint values. With GL 3.0, the new glTexParameterIiv() and glTexParameterIuiv() functions can set the border color to int or uint values.
2009-12-01mesa: Update vertex texture code after gallium changes.Michal Krol
2009-09-27mesa: use texture format functionsBrian Paul
2009-04-06st: as with swrast, interpret texture border color according to texture formatBrian Paul
Depending on the hardware driver this might not be needed, but it will cause no harm.
2009-04-06st: rename a helper functionBrian Paul
2008-12-04gallium: check vertex shaders for samplers/texture usage as we do for ↵Brian
fragment shaders
2008-08-14gallium: use a default texture in update_textures(), update_samplers() when ↵Brian Paul
needed The default texture is used when the current fragment shader has texture sample instructions but the user has not provided/bound a texture.
2008-07-02gallium: replace an assertion with "if (!texobj) continue"Brian Paul
It's possible to call update_samplers() between the time a fragment shader is bound and when a texture image is defined (such as glClear). This fixes the case where we don't have a complete texture object yet.
2008-06-24mesa: Replace abort by asserts.José Fonseca
2008-06-17gallium: check if sampler->max_lod < sampler->min_lodBrian Paul
2008-05-06gallium: sync up texture/sampler changes with masterBrian Paul
2008-05-06Merge commit 'origin/gallium-0.1' into gallium-tex-surfacesKeith Whitwell
Conflicts: src/mesa/state_tracker/st_atom_sampler.c src/mesa/state_tracker/st_cb_texture.c
2008-05-03gallium: fix some BaseLevel, lastLevel bugsBrian Paul
2008-05-03gallium: fix warningsBrian Paul
2008-05-03gallium: fix sampler->max_lod computationBrian Paul
2008-05-03gallium: fix computation of sampler->min_lodBrian Paul
The texture BaseLevel is accounted for in texture layout so it doesn't factor in here. May also need to adjust max_lod...
2008-05-02Some changed for non-C99 compilersAlan Hourihane
2008-05-01gallium: Set sampler->min_lod instead of always reallocating pipe_textures.Michel Dänzer
2008-04-29gallium: set border colorRoland Scheidegger
2008-03-28gallium: remove redundant compare bit in sampler stateRoland Scheidegger
2008-03-12gallium: pass NULL to cso_single_sampler() when the sampler isn't used.Brian
This fixes an AA line crash/regression. The aaline stage needs to find a free/unused sampler to do its thing.
2008-03-12gallium: Add TEX_FILTER_ANISO img filterKeith Whitwell
Hardware almost universally expects us to set a special filtering mode when anisotropic filtering is enabled, as opposed to varying a max-aniso values. Do this once in the state tracker & simplify the driver code.
2008-03-11gallium: rework CSO-related code in state trackerBrian
Use the code in cso_context.c rather than st_cache.c. Basically, binding of state objects now goes through the CSO module. But Vertex/fragment shaders go through pipe->bind_fs/vs_state() since they're not cached by the CSO module at this time. Also, update softpipe driver to handle NULL state objects in various places. This happens during context destruction. May need to update other drivers...
2008-03-05gallium: michel's patch to rework texture/sampler binding interfaceKeith Whitwell
Bind all the samplers/textures at once rather than piecemeal. This is easier for drivers to understand.
2008-02-12gallium: clamp min_lod so it's never negativeBrian
2007-12-14update_samplers() didn't respect the sampler->texunit mapping.Brian
This fixes the glsl/texdemo1.c program.
2007-12-11gallium: remove set_sampler_units interfaceKeith Whitwell
The effect of this mapping can be acheived by the state tracker and setting up the pipe texture state pointers to incorporate its affects.
2007-11-08set sampler state for shadow testBrian
2007-10-29simplify code which access the current vertex/fragment shadersBrian
2007-10-26Re-implement GLSL texture sampler variables.Brian
GLSL sampler variables indicate which texture unit to use for TEX instructions. Previously, this was baked into the fragment/vertex program and couldn't be readily changed once set. Now, SamplerUnits[] array indicates which texture unit is to be used for each sampler variable. These values are set with glUniform1i(). This is extra state that must be passed to the fragment/vertex program executor at runtime.
2007-10-15add 'normalized_coords' field to pipe_sampler_stateBrian
This controls whether texcoords are interpreted as-is or scaled up from [0,1]. Fixes glDrawPixels/glBitmap problems on i915 when image is non power-of-two. Also, cleans up the CSO sampler state for i915 a bit.
2007-10-01comments/code for min/max_lod - revisit somedayBrian
2007-09-20Fix failover state binding and convert the sampler to use the newZack Rusin
state constant state object semantics.
2007-09-18Fix a silly bug on setting samplers.Zack Rusin
Bind when the currently bound state is /not/ the one we just found/created.
2007-09-18Make sampler an immutable state object.Zack Rusin
Switch the sample to be an immutable state object.
2007-08-25add names to tracked state atoms to improve debugkeithw
2007-08-09Split texfilter enums to match common hardware usage.Keith Whitwell
2007-08-08update lod bias, limitsBrian
2007-08-07plug in texture/sampler state updateBrian
2007-06-22more texture sampler workBrian