summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
AgeCommit message (Collapse)Author
2009-08-05st/mesa: fix Y inversion and optimize st_BlitFramebuffer()Brian Paul
Need to check for Y inversion separately for src/dest buffers. If both the src and dest regions are upside down, make them right-side up for a better chance at a fast path. progs/tests/copypixrate -blit is much faster now.
2009-08-03st/mesa: we don't support GL_NV_point_sprite (see comment)Brian Paul
2009-08-01mesa st: Use POT texture for draw pixels operations if NPOT texture is not ↵Patrice Mandin
supported
2009-08-01mesa st: Move logbase2 function to util/u_math.hPatrice Mandin
2009-07-31Rename TGSI LOOP instruction to better match theri usage.Michal Krol
The LOOP/ENDLOOP pair is renamed to BGNFOR/ENDFOR as its behaviour is similar to a C language for-loop. The BGNLOOP2/ENDLOOP2 pair is renamed to BGNLOOP/ENDLOOP as now there is no name collision.
2009-07-30Merge branch 'mesa_7_5_branch'Brian Paul
2009-07-30mesa st: Change the preferred internal format for some RGB formats.Thomas Hellstrom
For GL_RGB5, GL_RGB4 and GL_R3_G3_B2, prefer PIPE_FORMAT_R5G6B5_UNORM over PIPE_FORMAT_A1R5G5B5_UNORM, since hardware is more likely to support the previous format for rendering. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2009-07-30mesa st: Report unsupported render-to-texture formats.Thomas Hellstrom
If a texture image is bound to a framebuffer for render-to-texture, but the hardware doesn't support rendering to its internal format, report the framebuffer as incomplete with FRAMEBUFFER_UNSUPPORTED. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2009-07-29mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputsBrian Paul
Previously, the FOGC attribute contained the fragment fog coord, front/back- face flag and the gl_PointCoord.xy values. Now each of those things are separate fragment program attributes. This simplifies quite a few things in Mesa and gallium. Need to test i965 driver and fix up point coord handling in the gallium/draw module...
2009-07-29gallium: fix SSE shadow texture instructionsBrian Paul
When sampling a 2D shadow map we need 3 texcoord components, not 2. The third component (distance from light source) is compared against the texture sample to return the result (visible vs. occluded). Also, enable proper handling of TGSI_TEXTURE_SHADOW targets in Mesa->TGSI translation. There's a possibility for breakage in gallium drivers if they fail to handle the TGSI_TEXTURE_SHADOW1D / TGSI_TEXTURE_SHADOW2D / TGSI_TEXTURE_SHADOWRECT texture targets for TGSI_OPCODE_TEX/TXP instructions, but that should be easy to fix. With these changes, progs/demos/shadowtex.c renders properly again with softpipe.
2009-07-29mesa/st: short-circuit glFinish calls on WIN32 onlyKeith Whitwell
Windows opengl32.dll calls glFinish prior to every swapbuffers, which makes it pretty hard to get decent performance... Work around by mapping finish to flush on PIPE_OS_WINDOWS. This is conformant, though it might confuse poorly-written benchmarks which attempt to measure a single event rather than figuring out the rate of continuous processing.
2009-07-29mesa/st: recognize no-op scissor state when checking clear_with_quadsKeith Whitwell
Some apps enable scissor but set the rectangle to the dimensions of the window. Don't let this force us onto a slower clear path.
2009-07-28Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: Makefile configs/default docs/relnotes.html src/mesa/main/version.h
2009-07-27st/mesa: silence warningBrian Paul
2009-07-22gallium: simplify tgsi_full_immediate structKeith Whitwell
Remove the need to have a pointer in this struct by just including the immediate data inline. Having a pointer in the struct introduces complications like needing to alloc/free the data pointed to, uncertainty about who owns the data, etc. There doesn't seem to be a need for it, and it is unlikely to make much difference plus or minus to performance. Added some asserts as we now will trip up on immediates with more than four elements. There were actually already quite a few such asserts, but the >4 case could be used in the future to specify indexable immediate ranges, such as lookup tables.
2009-12-15Merge branch 'mesa_7_6_branch' into mesa_7_7_branchIan Romanick
Conflicts: src/gallium/drivers/softpipe/sp_quad_blend.c
2009-12-09mesa: Move OES_read_format support from drivers into the core.Eric Anholt
The assertion is that the correct read type to be using is the native type of the underlying read renderbuffer. For some fallback paths, this may be worse than GL_RGBA/GL_UNSIGNED_BYTE for reads today, but it gets all drivers the expected GL_BGRA/GL_UNSIGNED_BYTE for ARGB8888 or GL_BGR//GL_UNSIGNED_SHORT_5_6_5_REV for rgb565 with no work. This fixes the intel (and other) DRI drivers to report read formats that should hit blit PBO readpixels paths.
2009-12-01st/mesa: updated emit_swz() commentBrian Paul
2009-11-19st/mesa: replace st_flush() with pipe->flush()Brian Paul
We only need to flush the gallium driver in this case. Fixes a recursive state validation bug.
2009-11-19st/mesa: get rid of compressed_num_bytes() codeBrian Paul
2009-11-19st/mesa: remove is_compressed_mesa_format()Brian Paul
2009-11-19st/mesa: remove pointless assertionBrian Paul
2009-11-17Merge branch 'outputswritten64'Ian Romanick
Add a GLbitfield64 type and several macros to operate on 64-bit fields. The OutputsWritten field of gl_program is changed to use that type. This results in a fair amount of fallout in drivers that use programs. No changes are strictly necessary at this point as all bits used are below the 32-bit boundary. Fairly soon several bits will be added for clip distances written by a vertex shader. This will cause several bits used for varyings to be pushed above the 32-bit boundary. This will affect any drivers that support GLSL. At this point, only the i965 driver has been modified to support this eventuality. I did this as a "squash" merge. There were several places through the outputswritten64 branch where things were broken. I foresee this causing difficulties later for bisecting. The history is still available in the branch. Conflicts: src/mesa/drivers/dri/i965/brw_wm.h
2009-11-17mesa: fix assorted compiler warningsBrian Paul
2009-11-15st/mesa: comments for st_draw.cBrian Paul
2009-11-06mesa: Export S3_s3tc as well.José Fonseca
Used in Quake3.
2009-11-06mesa: Translate MAP_UNSYNCHRONIZED_BIT.José Fonseca
2009-11-03Merge branch 'mesa_7_6_branch'Brian Paul
2009-10-29mesa: Add MESA_FORMAT_Z24_X8.José Fonseca
2009-10-29st/mesa: fix PIPE_FORMAT_X8Z24 <> MESA_FORMAT_X8_Z24 conversionDavid Heidelberger
Signed-off-by: David Heidelberger <d.okias@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-29st/mesa: Add conversion from PIPE_FORMAT_X8Z24_UNORM to MESA_FORMAT_S8_Z24.David Heidelberger
Fix glxgears and openarena for Nouveau (no more asserts and crash). Signed-off-by: David Heidelberger <d.okias@gmail.com Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-29st/mesa: Fix nouveau glxinfo after merging texformat-rework.David Heidelberger
Signed-off-by: David Heidelberger <d.okias@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2009-10-29mesa: Fix compilation errors and warnings when features are disabled.Chia-I Wu
Some of the fixes are cherry-picked from opengl-es branch. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-28Merge branch 'texformat-rework'Brian Paul
Conflicts: src/mesa/drivers/dri/radeon/radeon_fbo.c src/mesa/drivers/dri/s3v/s3v_tex.c src/mesa/drivers/dri/s3v/s3v_xmesa.c src/mesa/drivers/dri/trident/trident_context.c src/mesa/main/debug.c src/mesa/main/mipmap.c src/mesa/main/texformat.c src/mesa/main/texgetimage.c
2009-10-28mesa/st: fix crash in st_texture_image_copyMarek Olšák
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-10-25mesa: choose texture format in core mesa, not driversBrian Paul
Call the ctx->Driver.ChooseTextureFormat() function from core Mesa's _mesa_[Copy]TexImage functions instead of in the driver functions. One less thing for drivers to do.
2009-10-25mesa: remove _mesa_compressed_row_stride() callsBrian Paul
2009-10-24mesa: remove ctx->Driver.CompressedTextureSize() hookBrian Paul
It always just called _mesa_compressed_texture_size() anyway.
2009-10-24mesa: change compressed texture size callsBrian Paul
Replace calls to ctx->Driver.CompressedTextureSize with calls to _mesa_format_image_size. The former always called the later.
2009-10-23gallium: remove the swizzling parts of ExtSwizzleKeith Whitwell
These haven't been used by the mesa state tracker since the conversion to tgsi_ureg, and it seems that none of the other state trackers are using it either. This helps simplify one of the biggest suprises when starting off with TGSI shaders.
2009-10-23gallium: remove noise opcodesKeith Whitwell
Provide a dummy implementation in the GL state tracker (move 0.5 to the destination regs). At some point, a motivated person could add a better implementation of noise. Currently not even the nvidia binary drivers do anything more than this. In any case, the place to do this is in the GL state tracker, not the poor driver.
2009-10-17gallium: Permit surface_copy and surface_fill to be NULL.Corbin Simpson
Uf. Lots of files touched. Would people with working vega, xorg, dri1, etc. please make sure you are not broken, and fix yourself up if you are. There were only two or three places where the code did not have painful fallbacks, so I would advise st maintainers to find less painful workarounds, or consider overhauling util_surface_copy and util_surface_fill. Per ymanton, darktama, and Dr_Jakob's suggestions, clear has been left as-is. I will not add PIPE_CAP_BLITTER unless it is deemed necessary.
2009-10-10Merge branch 'mesa_7_6_branch'Brian Paul
2009-10-08mesa: remove a bunch of gl_renderbuffer fieldsBrian Paul
_ActualFormat is replaced by Format (MESA_FORMAT_x). ColorEncoding, ComponentType, RedBits, GreenBits, BlueBits, etc. are all replaced by MESA_FORMAT_x queries.
2009-10-07mesa/st: add missing mesa constant file nameKeith Whitwell
There are many different names for constants in mesa, we were missing one since the ureg rewrite.
2009-10-07st/mesa: pass pipe_screen, not pipe_context to st_choose_format() functionsBrian Paul
These don't depend on context state, but use a screen pointer.
2009-10-05Merge branch 'mesa_7_6_branch'Brian Paul
Conflicts: src/gallium/auxiliary/util/u_cpu_detect.c
2009-10-05mesa: Copy textures' base format into wrapper renderbuffer.José Fonseca
Otherwise st_copy_texsubimage will fallback to software blit due to inconsistent base formats.
2009-10-05mesa/st: add ST_DEBUG environment variableKeith Whitwell
At last it's possible to turn on tgsi dumps and other debugging in the state tracker without modifying sources...
2009-10-02mesa/st: don't reuse vertex buffers for bitmap, clear quadsKeith Whitwell
Currently using max_slots > 1 will cause synchronous rendering if the driver flushes its command buffers between one bitmap and the next. Need to improve buffer_write to allow NO_WAIT (as well as no_flush) updates to buffers where we know there is no conflict with previous data.