summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
Commit message (Collapse)AuthorAgeFilesLines
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* svga: fix crash when clearing null color bufferBrian Paul2014-01-171-3/+7
| | | | | | | | | | Fixes regression since 9baa45f78b8ca7d66280e36009b6a685055d7cd6 but some of the piglit fbo-drawbuffers-none tests still don't pass. v2: use the right pointer type for 'h' Reviewed-by: José Fonseca <[email protected]>
* gallium: add bits for clipping points as tris (d3d-style)Roland Scheidegger2014-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | OpenGL does whole-point clipping, that is a large point is either fully clipped or fully unclipped (the latter means it may extend beyond the viewport as long as the center is inside the viewport). d3d9 (d3d10 has no large points) however requires points to be clipped after they are expanded to a rectangle. (Note some IHVs are known to ignore GL rules at least with some hw/drivers.) Hence add a rasterizer bit indicating which way points should be clipped (some drivers probably will always ignore this), and add the draw interaction this requires. Drivers wanting to support this and using draw must support large points on their own as draw doesn't implement vp clipping on the expanded points (it potentially could but the complexity doesn't seem warranted), and the driver needs to do viewport scissoring on such points. Conflicts: src/gallium/drivers/llvmpipe/lp_context.c src/gallium/drivers/llvmpipe/lp_state_derived.c Reviewed-by: Jose Fonseca <[email protected]>
* svga: don't emit extraneous fs shadow codeBrian Paul2013-12-131-3/+38
| | | | | | | | | | | | Depending on the depth texture format, we may or may not have to emit explicit fs code to do the shadow comparison. Before, we were emitting it more often than needed. v2: check the actual texture format rather than the screen->depth.z16 field. The screen->depth.z16, x8z24, s8z24 fields may not all be set to a consistent set of depth formats. Reviewed-by: José Fonseca <[email protected]>
* svga: expose HW smooth/stipple/wide linesBrian Paul2013-12-117-14/+99
| | | | | | | Newer virtual HW versions support smooth/stipple/wide lines. Use that instead of 'draw' fallbacks when possible. Reviewed-by: José Fonseca <[email protected]>
* gallium: add support for AMD_vertex_shader_layerMarek Olšák2013-12-031-0/+1
|
* gallium: new shader cap bit for the amount of sampler viewsRoland Scheidegger2013-11-281-0/+2
| | | | | | | | | Ever since introducing separate sampler and sampler view max this was really missing. Every driver but llvmpipe reports the same number as number of samplers for now, so nothing should break. Reviewed-by: Jose Fonseca <[email protected]>
* svga: remove special-case code for texkil w componentBrian Paul2013-11-211-23/+6
| | | | | | Not actually needed. Fixes piglit ARB_fragment_program/kil-swizzle test. Reviewed-by: José Fonseca <[email protected]>
* svga: improve check for 3D compressed texturesBrian Paul2013-11-191-5/+7
| | | | | | | | | | | This is basically a a respin of f1dfcf4bce35e6796f873d9a00103b280da81e4c per Jose's suggestion. Just set the SVGA3dSurfaceFormatCaps flags for 3D and cube textures when checking the texture format capabilities. This will filter out unsupported combinations like 3D+DXT. Reviewed-by: Jose Fonseca <[email protected]>
* svga: we don't supported 3D compressed texturesBrian Paul2013-11-181-0/+6
| | | | Reviewed-by: Jakob Bornecrantz <[email protected]>
* gallium/drivers: compact compiler flags into Automake.incEmil Velikov2013-11-161-7/+2
| | | | | | | | | | * minimise flags duplication * distingush between VISIBILITY C and CXX flags * set only required flags - C and/or CXX v2: add LLVM_CFLAGS back to AM_CFLAGS (add missing backslash) Signed-off-by: Emil Velikov <[email protected]>
* gallium/drivers: enable automake subdir-objectsEmil Velikov2013-11-161-0/+2
| | | | Signed-off-by: Emil Velikov <[email protected]>
* svga: remove unused vars in svga_hwtnl_simple_draw_range_elements()Brian Paul2013-11-151-12/+2
| | | | | | And simplify the code. Reviewed-by: Jose Fonseca <[email protected]>
* svga: print warning for unsupported indirect dest reg indexingBrian Paul2013-11-151-0/+4
| | | | | | | | | For DX9-level shaders, there's only limited support for indirect indexing of registers (with the loop counter register, not the general address register.) Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* svga: mark dest image as defined in svga_surface_copy()Brian Paul2013-11-151-0/+2
| | | | | | | | | | | | After we blit/copy to a dest texture image we need to mark it as being defined. This fixes broken mipmap generation for quite a few texture formats. Mipgen involves making texture views and svga_texture_view_surface() skips texture images that are undefined. Cc: "10.0" <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* svga: do primitive trimming in translate_indices()Brian Paul2013-11-151-3/+12
| | | | | | | | | | | | | | The index translation code expects the number of indexes to be consistent with the primitive type (ex: a multiple of 3 for PIPE_PRIM_TRIANGLES). If it's not, we can write out of bounds in the destination buffer. Fixes failed assertions in the pipebuffer debug code found with Piglit primitive-restart-draw-mode test. Cc: "10.0" <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* svga: improve loops over color buffersBrian Paul2013-11-116-10/+20
| | | | | | | Only loop over the actual number of color buffers supported, not PIPE_MAX_COLOR_BUFS. Reviewed-by: José Fonseca <[email protected]>
* svga: document magic number of 8 render targets per batchBrian Paul2013-11-111-1/+13
| | | | | Grab the comments from commit message b84b7f19dfdc0 to explain what the code is doing.
* svga: always return 4 for PIPE_MAX_COLOR_BUFSBrian Paul2013-11-071-5/+4
| | | | | | Even if the query returns 8, only 4 really work. Reviewed-by: José Fonseca <[email protected]>
* svga: return true for the PIPE_CAP_SM3 queryBrian Paul2013-11-071-1/+3
| | | | | | | | | | This just tells the state tracker to turn on the GL_ARB_shader_texture_lod extension. This simply allows the GLSL compiler to emit TXL and TXD instructions for both vertex and fragment shaders. We already support these opcodes in the svga driver. Though, the shadow2DGrad() Piglit tests are failing. Reviewed-by: José Fonseca <[email protected]>
* draw,llvmpipe,util: add depth bias calculation for arb_depth_buffer_floatMatthew McClure2013-11-071-2/+8
| | | | | | | | | | | | | | | With this patch, the llvmpipe and draw modules will calculate the depth bias according to floating point depth buffer semantics described in the arb_depth_buffer_float specification, when the driver has a z buffer bound with a format type of UTIL_FORMAT_TYPE_FLOAT. By default, the driver will use the existing UNORM calculation for depth bias. A new function, draw_set_zs_format, was added to calculate the Minimum Resolvable Depth value and floating point depth sense for the draw module. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/auxiliary/indices: add start paramRob Clark2013-10-292-2/+2
| | | | | | | Add 'start' parameter to generator/translator. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: reindent drawing codeBrian Paul2013-10-293-266/+199
|
* gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZESIlia Mirkin2013-10-261-0/+1
| | | | | | | | | This CAP will determine whether ARB_framebuffer_object can be enabled. The nv30 driver does not allow mixing swizzled and linear zsbuf/cbuf textures. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* svga: remove user-space vertex/index buffer codeBrian Paul2013-10-246-259/+13
| | | | | | | | The gallium vbuf module, which we've been using for some time now, takes care of uploading user-space vertex/index data into real buffers. The upload code in the svga driver was unused. Reviewed-by: José Fonseca <[email protected]>
* gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul2013-10-231-10/+1
| | | | | | | | | | | | The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Emil Velikov <[email protected]>
* svga: remove unneeded include of u_double_list.hBrian Paul2013-10-231-2/+0
|
* svga: minor fix-ups in svga_get_shader_param()Brian Paul2013-10-161-2/+3
| | | | | Fix debug error message. Add switch case for PIPE_SHADER_COMPUTE. Trivial.
* svga: s/0/FALSE/Brian Paul2013-10-111-2/+2
|
* svga: fix incorrect memcpy src in svga_buffer_upload_piecewise()Brian Paul2013-10-041-1/+1
| | | | | | | | | As we march over the source buffer we're uploading in pieces, we need to memcpy from the current offset, not the start of the buffer. Fixes graphical corruption when drawing very large vertex buffers. Cc: "9.2" <[email protected]> Reviewed-by: Matthew McClure <[email protected]>
* svga: don't hook in old bind_fragment_sampler_states() functionsBrian Paul2013-10-031-9/+0
|
* svga: implement pipe_context::bind_sampler_states()Brian Paul2013-10-031-0/+1
|
* svga: fix pixel center integerBrian Paul2013-09-301-2/+4
| | | | | | | The svga/d3d9 convention is that pixel centers are at integer coordinates. Fixes piglit glsl-arb-fragment-coord-conventions test. Reviewed-by: José Fonseca <[email protected]>
* svga: return 0 for PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFERBrian Paul2013-09-301-1/+1
| | | | | | | | | Using the map/unmap path for glTexImage is a little bit faster than blitting. Also, this fixes about 50 assorted piglit failures that seem to be related to the blit version of glReadPixels. Reviewed-by: Thomas Hellstrom <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* svga: we don't support TGSI_OPCODE_CONTBrian Paul2013-09-302-2/+5
| | | | So return PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED = 0.
* gallium: add flush_resource context functionMarek Olšák2013-09-201-0/+8
| | | | | | | | | r600g needs explicit flushing before DRI2 buffers are presented on the screen. v2: add (stub) implementations for all drivers, fix frontbuffer flushing v3: fix galahad Signed-off-by: Marek Olšák <[email protected]>
* svga: replace 0 with PIPE_OK in a few placesBrian Paul2013-08-263-5/+5
|
* svga: minor clean-ups in emit_hw_vs_vdecl()Brian Paul2013-08-211-6/+6
|
* draw: inject frontface info into wireframe outputsZack Rusin2013-08-021-0/+1
| | | | | | | | | | | | | | Draw module can decompose primitives into wireframe models, which is a fancy word for 'lines', unfortunately that decomposition means that we weren't able to preserve the original front-face info which could be derived from the original primitives (lines don't have a 'face'). To fix it allow draw module to inject a fake face semantic into outputs from which the backends can figure out the original frontfacing info of the primitives. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Add PIPE_CAP_ENDIANNESSTom Stellard2013-07-221-0/+2
| | | | | | Cc: [email protected] [ Francisco Jerez: Fix "PIPE_ENDIAN_SMALL" in the documentation, define PIPE_ENDIAN_NATIVE. ]
* tgsi: rename the TGSI fragment kill opcodesBrian Paul2013-07-121-9/+9
| | | | | | | | | | | | | | | | | | | | | TGSI_OPCODE_KIL and KILP had confusing names. The former was conditional kill (if any src component < 0). The later was unconditional kill. At one time KILP was supposed to work with NV-style condition codes/predicates but we never had that in TGSI. This patch renames both opcodes: TGSI_OPCODE_KIL -> KILL_IF (kill if src.xyzw < 0) TGSI_OPCODE_KILP -> KILL (unconditional kill) Note: I didn't just transpose the opcode names to help ensure that I didn't miss updating any code anywhere. I believe I've updated all the relevant code and comments but I'm not 100% sure that some drivers had this right in the first place. For example, the radeon driver might have llvm.AMDGPU.kill and llvm.AMDGPU.kilp mixed up. Driver authors should review their code. Reviewed-by: Jose Fonseca <[email protected]>
* mesa,glsl,gallium: remove GLSLSkipStrictMaxVaryingLimitCheck and dependenciesMarek Olšák2013-07-021-1/+0
| | | | | | Not needed with do_dead_builtin_varyings. Reviewed-by: Ian Romanick <[email protected]>
* svga: pass svga_compile_key by reference instead of valueBrian Paul2013-06-281-7/+7
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* svga: use switch statement in svga_shader_type()Brian Paul2013-06-281-5/+10
| | | | | | | Safer in case the PIPE_SHADER_x tokens get renumbered (as Marek wanted to do). Reviewed-by: Jose Fonseca <[email protected]>
* svga: allow 3D transfers in svga_texture_transfer_map()Brian Paul2013-06-251-4/+3
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* svga: use new svga_define_texture_level() helperBrian Paul2013-06-252-2/+15
| | | | | | To get array bounds checking. Reviewed-by: Jose Fonseca <[email protected]>
* svga: fix layer/level mix-up in svga_mark_surface_dirty()Brian Paul2013-06-251-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* svga: use new svga_age_texture_view() helperBrian Paul2013-06-252-1/+14
| | | | | | | | | The function does array bounds checking. Note, this exposes a bug in the svga_mark_surface_dirty() function: we're calling svga_age_texture_view() with a texture slice instead of mipmap level. This can lead to a failed assertion. That'll be fixed next. Reviewed-by: Jose Fonseca <[email protected]>
* svga: add array index assertion in svga_validate_sampler_view()Brian Paul2013-06-251-0/+1
|
* svga: use svga_texture() helper instead of castingBrian Paul2013-06-251-1/+1
|