summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
Commit message (Collapse)AuthorAgeFilesLines
* svga: Fix user clip planes.José Fonseca2012-01-122-4/+3
| | | | | | | | Dirty flags also need to be updated in face of recent interface change. Fixes regression in compiz. Reviewed-by: Brian Paul <[email protected]>
* gallium/svga: Pass the SVGA3D_SURFACE_HINT_RENDERTARGET flag to the deviceThomas Hellstrom2012-01-121-3/+6
| | | | | | | | Some hardware versions rely on it to render correctly. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* svga: don't reference count svga_sampler_view's textureBrian Paul2012-01-111-2/+12
| | | | | | | | | | | | | | | | svga_sampler_view contains a pointer to a pipe_resource (base class of svga_texture) and svga_texture contains a pointer to an svga_sampler_view. This circular dependency prevented the objects from ever being freed when they pointed to each other. Make the svga_sampler_view::texture pointer a "weak reference" (no reference counting) to break the dependency. This is safe to do because the pipe_resource/texture always has a longer lifespan than the sampler view so when svga_sampler_view stops referencing the texture, the texture's refcount never hits zero. Fixes a memory leak seen with google earth and other apps. Reviewed-by: Jakob Bornecrantz <[email protected]>
* svga: Add somewhat sensible fallback and silence warningJakob Bornecrantz2012-01-101-3/+2
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by Brian Paul <[email protected]>
* svga: Silence warningJakob Bornecrantz2012-01-101-7/+0
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by Brian Paul <[email protected]>
* svga: Silence warningJakob Bornecrantz2012-01-101-0/+3
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by Brian Paul <[email protected]>
* Squash-merge branch 'gallium-clip-state'Marek Olšák2012-01-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <[email protected]> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[email protected]> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <[email protected]> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <[email protected]> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <[email protected]> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <[email protected]> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <[email protected]> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <[email protected]> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <[email protected]> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
* gallium: make vbuf_render::set_primitive() return voidBrian Paul2012-01-071-3/+1
| | | | All the implementations of this function always return TRUE.
* svga: fix assorted whitespace issues, add copyright commentBrian Paul2012-01-073-78/+85
|
* svga: add switch cases for PIPE_SHADER_CAP_OUTPUT_READBrian Paul2012-01-071-0/+4
| | | | | Silences unhandled switch case warning. Return 0 since we don't want to read from output regs.
* gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLYMarek Olšák2012-01-052-1/+5
| | | | | | | | | | | Please see the diff for further info. This paves the way for moving user buffer uploads out of drivers and should allow to clean up the mess in u_upload_mgr in the meantime. For now only allowed for buffers on r300 and r600. Acked-by: Christian König <[email protected]>
* gallium: remove deprecated PIPE_TRANSFER_DISCARDMarek Olšák2012-01-052-2/+2
| | | | PIPE_TRANSFER_DISCARD_RANGE is defined the same.
* u_upload_mgr: remove the 'flushed' parameterMarek Olšák2012-01-052-6/+2
| | | | | | Not used by anybody. Reviewed-by: Brian Paul <[email protected]>
* gallium: fix behavior of pipe_buffer_map_rangeMarek Olšák2012-01-051-0/+1
| | | | | | | To match what transfer_map returns. Really, subtracting the offset leads to bugs if someone expects it to work exactly like transfer_map. Reviewed-by: Brian Paul <[email protected]>
* svga: Fix texture cube param capJakob Bornecrantz2012-01-051-2/+2
| | | | | | | Spotted by Thomas Hellstrom. Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* gallium: separate out floating-point CAPs into its own enumMarek Olšák2011-11-221-16/+21
| | | | | | | | | | | | | | | The motivation behind this is to add some self-documentation in the code about how each CAP can be used. The idea is: - enum pipe_cap is only valid in get_param - enum pipe_capf is only valid in get_paramf Which CAPs are floating-point have been determined based on how everybody except svga implemented the functions. svga have been modified to match all the other drivers. Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_.
* gallium: remove PIPE_CAP_GLSL and enable GLSL unconditionallyMarek Olšák2011-11-221-2/+0
| | | | | Only i965g does not enable GLSL, but that driver has been unmaintained and bitrotting for quite a while anyway.
* svga: don't crash/assert if we fail to allocate a vertex bufferBrian Paul2011-11-111-9/+20
| | | | | | | v2: check if pipe_buffer_map() returns NULL, and return NULL from svga_vbuf_render_map_vertices(). Per Jose's suggestion. Reviewed-by: José Fonseca <[email protected]>
* svga: fix varying var remapping for unused FS outputsBrian Paul2011-11-043-9/+22
| | | | | | | | If the VS has outputs that aren't consumed by the FS we were mapping them all to one unused VS output index, but that's illegal. Instead, map unused VS outputs to unique indexes. Reviewed-by: José Fonseca <[email protected]>
* svga: add comments and reformat code in svga_tgsi_decl_sm30.cBrian Paul2011-11-041-47/+85
|
* svga: Tighten the register file assertions.José Fonseca2011-11-041-4/+2
| | | | Untested. But should fix fdo 42576.
* svga: use the draw-module's sprite stage depending on FS inputsBrian Paul2011-11-031-1/+23
| | | | | | | | | | | If we're drawing sprites and the fragment shader needs both auto- generated texcoords and user-defined varying vars we need to use this fallback path. The reason is when we enable auto texcoord generation, it gets enabled for all texcoord sets. And that clobbers the user-defined varying vars. Reviewed-by: José Fonseca <[email protected]>
* svga: pass fragment shader to draw moduleBrian Paul2011-11-033-0/+12
| | | | | | | | | If we use the draw-module for wide point/line/etc drawing we'll need a fragment shader too (like we pass in the vertex shader). This fixes sprite point rendering when forcing the swtnl path. Reviewed-by: José Fonseca <[email protected]>
* svga: implement generic variable index remappingBrian Paul2011-11-039-21/+165
| | | | | | | | | | | | | | | | | | | | | | | | | The state tracker may generate shaders that use generic vs outputs / fs inputs like: DCL IN[0], GENERIC[0] DCL IN[1], GENERIC[10] DCL IN[2], GENERIC[11] This patch remaps 0, 10, 11 to small integers like 1, 2, 3 so that we stay inside the SVGA3D limit (8). The remapping is done to both the vertex shader outputs and the fragment shader inputs. The same mapping must be used for a vs/fs pair. Note that 'union svga_compile_key' is now 'struct svga_compile_key' because we needed to add the register remapping table. The change in size isn't really significant though (it's not a search key). Also, add assertions when building up SVGA3D src/dst registers to we don't try to store too large of value for the bitfield size. Reviewed-by: José Fonseca <[email protected]>
* svga: Tag cursors with the scanout hintJakob Bornecrantz2011-11-021-2/+3
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]>
* svga: Update state prototypes to return pipe_error.José Fonseca2011-11-026-25/+36
| | | | Fixes a bunch of prototype mismatch warnings..
* svga: Fix potential buffer overflow in rs draw state.José Fonseca2011-10-314-13/+19
| | | | Reviewed-by: Brian Paul <[email protected]>
* svga: Flush the hwtnl primitives before writing to buffers.José Fonseca2011-10-315-4/+62
| | | | | | | | | | | | | | | svga keeps a small queue of similar primitive draws in order to coalesce them into a single draw primitive command. But the buffers referred in primitives not yet emitted were being ignored in the considerations to flush or not the context. This fixes piglit vbo-map-remap, vbo-subdata-sync, vbo-subdata-zero, and Seeker. Based on investigation and patch from Brian Paul. Reviewed-By: Brian Paul <[email protected]>
* svga: Plug a fence leakThomas Hellstrom2011-10-181-3/+3
| | | | | Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* svga: remove old, unused sincos code for SM2.0Brian Paul2011-10-112-51/+0
|
* svga: remove support for shader model 2.0Brian Paul2011-10-119-374/+25
| | | | | | We've been requiring SM 3.0 all along so this just removes unused code. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: rename ZS stencil type to UINT (v2)Dave Airlie2011-10-114-6/+6
| | | | | | | | | | these are never USCALED, always UINT in reality. taken from some work by Christoph Bumiller v2: fixup formatting of table + tabs Signed-off-by: Dave Airlie <[email protected]>
* gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERSMarek Olšák2011-09-301-2/+2
| | | | | | | | | This removes: - PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS - PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS in favor of the that new per-shader cap. Reviewed-by: Brian Paul <[email protected]>
* gallium: remove PIPE_CAP_TEXTURE_MIRROR_REPEATMarek Olšák2011-09-301-3/+0
| | | | | | | | | | All drivers support it (well, except Cell). The boolean option is going away from core Mesa too. This is a follow-up to Ian Romanick's patch "mesa: Remove ARB_texture_mirrored_repeat extension enable flag". Reviewed-by: Brian Paul <[email protected]>
* winsys/svga: Update to vmwgfx kernel module 2.1Thomas Hellstrom2011-09-292-2/+3
| | | | | | | | | Introduces fence objecs and a size limit on query buffers. The possibility to map the fifo from user-space is gone, and replaced by an ioctl that reads the 3D capabilities. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecranz <[email protected]>
* gallium: move border color to be a color unionDave Airlie2011-09-271-4/+4
| | | | | | | | | | EXT_texture_integer also specifies border color should be a color union, the values are used according to the texture sampler format. (update docs) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: indentation/formatting fixesBrian Paul2011-09-231-16/+16
|
* svga: remove emit_consts() offset parameterBrian Paul2011-09-231-3/+7
| | | | It was always zero.
* svga: s/int/unsigned/ in svga_state_constants.cBrian Paul2011-09-231-3/+7
| | | | Be consistent with other functions in the file. And add some comments.
* svga: s/unit/shader/ and related clean-upsBrian Paul2011-09-231-19/+23
| | | | 'shader' is more intuitive. Also s/int/unsigned/ and add assertions.
* svga: clean up return values and error codesBrian Paul2011-09-2315-97/+92
| | | | | | Previously we were using a hodge podge of int vs. pipe_enum and 0 vs. PIPE_OK. Some functions that always returned PIPE_OK were made void.
* svga: add format translation for DXT/sRGB formatsBrian Paul2011-09-231-2/+8
| | | | | Without this, apps/tests that tried to use a DXT/sRGB format would die on a failed assertion (st_texture.c:80).
* svga: test register W component in emit_kil()Brian Paul2011-09-231-16/+44
| | | | | | Only the XYZ components are checked to be negative by SVGA3DOP_TEXKILL. GL_ARB_fp requires all four components be checked. Emit a second texkill for W if needed.
* svga: fix depth/shadow compare for non-projected texcoordsBrian Paul2011-09-231-16/+24
| | | | | | | We only need to do the divide by Q step for TXP instructions. This fixes the incorrectly rendered soft shadow test in Lightsmark. Along with the previous texture swizzle commit, this also fixes all the piglit glsl-fs-shadow2d-XX.shader_test failures.
* svga: implement texture swizzlingBrian Paul2011-09-234-9/+128
| | | | | | | This exposes the GL_EXT_texture_swizzle extension and allows the various depth texture modes to be implemented properly. This, plus a follow-on texture/shadow change fixes quite a few piglit GLSL shadow sampler test failures.
* svga: check that we don't exceed input/ouput register limitsBrian Paul2011-09-233-2/+13
|
* svga: implement point sprite suppportBrian Paul2011-09-238-4/+119
| | | | | | Emit the SVGA3D_RS_POINTSPRITEENABLE render state. When sprite_coord_mode=PIPE_SPRITE_COORD_LOWER_LEFT emit extra frag shader code to invert the Y coordinate of the incoming texcoord.
* svga: add translation for float formatsBrian Paul2011-09-231-0/+14
|
* svga: check to avoid writing beyond end of constant bufferBrian Paul2011-09-231-1/+23
| | | | See bug 688394
* svga: Cleanup format capability checking.José Fonseca2011-09-238-192/+683
| | | | | | Accurately describe what operations are supported when a format caps entry is not advertised by the host, and which formats are never supported, instead of making ad-hoc and often incorrect assumptions.