summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
AgeCommit message (Collapse)Author
2011-01-05intel: Always allocate miptrees from level 0, not tObj->BaseLevel.Eric Anholt
BaseLevel/MaxLevel are mostly used for two things: clamping texture access for FBO rendering, and limiting the used mipmap levels when incrementally loading textures. By restricting our mipmap trees to just the current BaseLevel/MaxLevel, we caused reallocation thrashing in the common case, for a theoretical win if someone really did want just levels 2..4 or whatever of their texture object. Bug #30366
2011-01-05intel: Clarify first_level/last_level vs baselevel/maxlevel by deletion.Eric Anholt
This has always been ugly about our texture code -- object base/max level vs intel object first/last level vs image level vs miptree first/last level. We now get rid of intelObj->first_level which is just tObj->BaseLevel, and make intelObj->_MaxLevel clearly based off of tObj->_MaxLevel instead of duplicating its code (incorrectly, as image->MaxLog2 only considers width/height and not depth!)
2010-12-09i965: Set up the correct texture border color state struct for Ironlake.Eric Anholt
This doesn't actually fix border color on Ironlake, but it appears to be a requirement, and gen6 needs it too.
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-09-28i965: Fix sampler on sandybridgeZhenyu Wang
Sandybridge has not much change on texture sampler with Ironlake.
2010-06-11i965: GC the last two arguments to brw_cache_data.Eric Anholt
Now that the binding table is streamed indirect state, they were always NULL/0.
2010-06-08intel: Convert remaining dri_bo_emit_reloc to drm_intel_bo_emit_reloc.Eric Anholt
The new API makes so much more sense, I'd like to forget how the old one worked.
2010-06-08intel: Change dri_bo_* to drm_intel_bo* to consistently use new API.Eric Anholt
The slightly less mechanical change of converting the emit_reloc calls will follow.
2010-04-27Fill the padding between entrys in the sampler keyPierre Willenbrock
This struct is used to generate a hash, ignoring the entry boundaries. Signed-off-by: Eric Anholt <eric@anholt.net>
2010-03-05i965: Only use the effective subset of the WM sampler key.Eric Anholt
The whole structure is 836 bytes, but if only the first one or two samplers are used (as is common), the part that matters is only 56 or 108 bytes. By using just that subset as the key (since the key size is also part of the key), we improve firefox-talos-gfx performance by 1%.
2010-03-05i965: Remove the unused SDC BO pointer from the sampler state key.Eric Anholt
Since it's a BO pointer, it already lives outside the key in brw->wm.sdc_bo[] which is used for sampler state lookup and setup.
2010-02-19Remove _mesa_memset in favor of plain memset.Kenneth Graunke
This may break the SUNOS4 build, but it's no longer relevant.
2010-01-19i965: Allow for variable-sized auxdata in the state cache.Eric Anholt
Everything has been constant-sized until now, but constant buffer handling changes will make us want some additional variable sized array.
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-11-06i965: Always pass the size argument to brw_cache_data.Eric Anholt
This keeps the individual state files from having to export their structures for brw_state_cache initialization.
2009-10-29i915: Implement min/max LOD clamping with the hardware.Eric Anholt
This gets us expected behavior for clamping between mipmap levels, and avoids relayout of textures for doing clamping. Fixes piglit lodclamp-between.
2009-10-29i965: Replace a MIN(MAX()) with CLAMP().Eric Anholt
2009-08-14i965: Add support for GL_ARB_seamless_cube_mapIan Romanick
2009-05-14i965: fix 1D texture borders with GL_CLAMP_TO_BORDERRobert Ellison
With 1D textures, GL_TEXTURE_WRAP_T should be ignored (only GL_TEXTURE_WRAP_S should be respected). But the i965 hardware seems to follow the value of GL_TEXTURE_WRAP_T even when sampling 1D textures. This fix forces GL_TEXTURE_WRAP_T to be GL_REPEAT whenever 1D textures are used; this allows the texture to be sampled correctly, avoiding "imaginary" border elements in the T direction. This bug was demonstrated in the Piglit tex1d-2dborder test. With this fix, that test passes.
2009-04-22intel: fix max anisotropy supportedRoland Scheidegger
i915 actually supports up to 4 (according to header file - not tested), i965 up to 16 (code already handled this but slightly broken), so don't use 2 for all chips, even though angular dependency is very high.
2009-04-03i965: remove unused code for sampling a constant bufferBrian Paul
2009-04-03i965: code to setup a constant buffer samplerBrian Paul
This code won't actually be used and will be removed in a subsequent commit. Just committing for posterity.
2009-03-09i965: fix cube map lock-up / corruptionBrian Paul
If we're using anything but GL_NEAREST sampling of a cube map, we need to use the BRW_TEXCOORDMODE_CUBE texcoord wrap mode. Before this, the GPU would either lock up or subsequent texture filtering would be corrupted.
2009-02-02i965: Remove brw->attribs now that we can just always look in the GLcontext.Eric Anholt
2009-01-14i965: indentation fixesBrian Paul
2008-10-09i965: Accelerate depth textures with border color.Eric Anholt
The fallback was introduced to fix bug #16697, but made the test it was fixing run excessively long.
2008-10-01i965: sampler default color ends up in texture cache, not instructions.Eric Anholt
See volume 4, SAMPLER_BORDER_COLOR_STATE programming notes.
2008-09-18mesa: added "main/" prefix to includes, remove some -I paths from ↵Brian Paul
Makefile.template
2008-09-10intel: track bufmgr move to libdrm_intel and bufmgr_fake irq emit/wait change.Eric Anholt
2008-08-24Revert "Revert "Merge branch 'drm-gem'""Dave Airlie
This reverts commit 7c81124d7c4a4d1da9f48cbf7e82ab1a3a970a7a.
2008-08-24Revert "Merge branch 'drm-gem'"Dave Airlie
This reverts commit 53675e5c05c0598b7ea206d5c27dbcae786a2c03. Conflicts: src/mesa/drivers/dri/i965/brw_wm_surface_state.c
2008-08-08intel-gem: Update to new check_aperture API for classic mode.Eric Anholt
To do this, I had to clean up some of 965 state upload stuff. We may end up over-emitting state in the aperture overflow case, but that should be rare, and I'd rather have the simplification of state management.
2008-06-11[intel-gem] Chase domain flag renaming in the DRM.Eric Anholt
This is an API breakage only.
2008-06-03[intel] Convert drivers to using libdrm bufmgr code.Eric Anholt
2008-05-07GEM: Make dri_emit_reloc take GEM domain flags instead of TTM flags.Eric Anholt
The GEM flags are much more descriptive for what we need. Since this makes bufmgr_fake rather device-specific, move it to the intel common directory. We've wanted to do device-specific stuff to it before.
2008-04-18i965: initial attempt at fixing the aperture overflowDave Airlie
Makes state emission into a 2 phase, prepare sets things up and accounts the size of all referenced buffer objects. The emit stage then actually does the batchbuffer touching for emitting the objects. There is an assert in dri_emit_reloc if a reloc occurs for a buffer that hasn't been accounted yet.
2008-01-10i965: fix bug #14002Xiang, Haihao
2008-01-03[intel] Convert relocations to not be cleared out on buffer submit.Eric Anholt
We have two consumers of relocations. One is static state buffers, which want the same relocation every time. The other is the batchbuffer, which gets thrown out immediately after submit. This lets us reduce repeated computation for static state buffers, and clean up the code by moving relocations nearer to where the state buffer is computed.
2008-01-02[965] Convert sampler state to use a cache key instead of brw_cache_data.Eric Anholt
2007-12-14[965] Replace the state cache suballocator with direct dri_bufmgr use.Eric Anholt
The user-space suballocator that was used avoided relocation computations by using the general and surface state base registers and allocating those types of buffers out of pools built on top of single buffer objects. It also avoided calls into the buffer manager for these small state allocations, since only one buffer object was being used. However, the buffer allocation cost appears to be low, and with relocation caching, computing relocations for buffers is essentially free. Additionally, implementing the suballocator required a don't-fence-subdata flag to disable waiting on buffer maps so that writing new data didn't block on rendering using old data, and careful handling when mapping to update old data (which we need to do for unavoidable relocations with FBOs). More importantly, when the suballocator filled, it had no replacement algorithm and just threw out all of the contents and forced them to be recomputed, which is a significant cost. This is the first step, which just changes the buffer type, but doesn't yet improve the hash table to not result in full recompute on overflow. Because the buffers are all allocated out of the general buffer allocator, we can no longer use the general/surface state bases to avoid relocations, and they are set to 0 instead.
2007-09-12i965: translate shadow compare function into correctXiang, Haihao
internal function to match the EXT_shadow_funs spec. fix bug#11925
2007-09-11i965: limit on LOD Bias, fix#11987Xiang, Haihao
2007-08-31i965: Take the upper limitation on LOD into account.Xiang, Haihao
2007-08-15i965: use BRW_TEXCOORDMODE_CLAMP instead of BRW_TEXCOORDMODE_CLAMP_BORDERXiang, Haihao
to implement GL_CLAMP
2006-08-09Add Intel i965G/Q DRI driver.Eric Anholt
This driver comes from Tungsten Graphics, with a few further modifications by Intel.