aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* r200: enable some extensionsMarek Olšák2011-04-191-2/+10
| | | | | | | | Such as: - GL_ARB_half_float_pixel - GL_ARB_vertex_array_object - GL_APPLE_vertex_array_object - GL_EXT_gpu_program_parameters
* r300/compiler: Fix dataflow analysis bug with ELSE blocksTom Stellard2011-04-181-0/+7
| | | | | | | Writes within ELSE blocks were being ignored which prevented us from discovering all possible writers for some register values. Fixes piglit glsl-fs-raytrace-bug27060
* i965: Convert 3DPRIMITIVE command from struct-style to OUT_BATCH style.Kenneth Graunke2011-04-183-46/+37
| | | | | | | | | | Most of the newer portions of the code use OUT_BATCH style. I prefer this style because it offers a clear distinction between a) hardware messages/structures with a mandatory format, and b) data structures for our own internal use that we can format however we want. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Allocate the whole URB to the VS and fix calculations for Gen6.Kenneth Graunke2011-04-183-19/+25
| | | | | | | | | | | | | | | | | Since we never enable the GS on Sandybridge, there's no need to allocate it any URB space. Furthermore, the previous calculation was incorrect: it neglected to multiply by nr_vs_entries, instead comparing whether twice the size of a single VS URB entry was bigger than the entire URB space. It also neglected to take into account that vs_size is in units of 128 byte blocks, while urb_size is in bytes. Despite the above problems, the calculations resulted in an acceptable programming of the URB in most cases, at least on GT2. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix void pointer arithmetic warningsBrian Paul2011-04-181-21/+18
| | | | And fix a couple logic errors in the put_*_generic() functions.
* mesa: fix wrong parameter type in set_sampler_max_lod()Brian Paul2011-04-181-1/+1
|
* intel: Add I8 and L8 to intel_mesa_format_to_rb_datatype().Eric Anholt2011-04-181-0/+2
| | | | | | Fixes warnings in fbo-storage-formats. Reviewed-by: Brian Paul <[email protected]>
* Revert "intel: Add spans code for the ARB_texture_rg support."Eric Anholt2011-04-181-122/+0
| | | | | | | | | This reverts what remains of commit 28bab24e1698843e27d27204a1117066e7ffeabb. It was garbage, trying to use a MESA_FORMAT enum as a preprocessor token, and I don't know how I thought it was even tested. Reviewed-by: Brian Paul <[email protected]>
* intel: Use mesa core's R8, RG88, R16, RG1616 RB accessors.Eric Anholt2011-04-181-25/+4
| | | | | | | Fixes: ARB_texture_rg/fbo-alphatest-formats Reviewed-by: Brian Paul <[email protected]>
* swrast: Don't try to adjust_colors for <8bpc when handling R16, RG1616.Eric Anholt2011-04-181-3/+3
| | | | | | | | | The GL_RED and GL_RG were tricking this code into executing, but it's totally unprepared for a 16-bit channel and just rescaled the values down to 0. We don't have anything with <8bit channels alongside >8bit channels, so disabling it should be safe. Reviewed-by: Brian Paul <[email protected]>
* mesa: Add renderbuffer accessors for R8/RG88/R16/RG1616.Eric Anholt2011-04-181-0/+310
| | | | | | | This will replace the current (broken by trying to use an enum in the preprocessor) spantmp2.h support I wrote for the intel driver. Reviewed-by: Brian Paul <[email protected]>
* mesa: Use _mesa_get_format_bytes to refactor out the RB get_row_*Eric Anholt2011-04-181-60/+10
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Use _mesa_get_format_bytes to refactor out the RB get_pointer_*Eric Anholt2011-04-181-66/+11
| | | | Reviewed-by: Brian Paul <[email protected]>
* intel: Use Mesa core's renderbuffer accessors for depth.Eric Anholt2011-04-182-33/+17
| | | | | | | | | | | Since we're using GTT mappings now (no manual detiling), there's really nothing special to accessing these buffers, other than needing the new RowStride field of gl_renderbuffer to accomodate padding. Reduces the driver size by 2.7kb, and improves glean depthStencil performance 3-10x (!) Reviewed-by: Brian Paul <[email protected]>
* mesa: Add a function to set up the default renderbuffer accessors.Eric Anholt2011-04-182-78/+104
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Add a gl_renderbuffer.RowStride field like textures have.Eric Anholt2011-04-183-53/+66
| | | | | | | | | This will allow some drivers to reuse the core renderbuffer.c get/put row functions in place of using the spantmp.h macros. Note that unlike textures, we use a signed integer here to allow for handling FBO orientation. Reviewed-by: Brian Paul <[email protected]>
* mesa: Repack single-byte fields in gl_renderbuffer.Eric Anholt2011-04-181-4/+4
| | | | | | Cuts 8 out of 120 bytes in the struct. Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove renderbuffer deletion debug field.Eric Anholt2011-04-182-7/+0
| | | | | | | It has presumably served its purpose by now, and other object deletion doesn't do this. Reviewed-by: Brian Paul <[email protected]>
* swrast: Don't assert against glReadPixels of GL_RED and GL_RG.Eric Anholt2011-04-182-2/+8
| | | | | | | | Everything appears to already be in place for this. Fixes aborts in: ARB_texture_rg/fbo-alphatest-formats-float ARB_texture_rg/fbo-blending-formats-float. Reviewed-by: Brian Paul <[email protected]>
* intel: Use _mesa_base_tex_format for FBO texture attachments.Eric Anholt2011-04-181-1/+1
| | | | | | | | | | | | The _mesa_base_fbo_format variant doesn't handle some texture internalformats, such as "3". Fixes: fbo-blending-formats. fbo-alphatest-formats EXT_texture_sRGB/fbo-alphatest-formats Reviewed-by: Brian Paul <[email protected]>
* i965: Quit spamming gen6 DP read/write send instructions with gen5 bits.Eric Anholt2011-04-171-6/+0
| | | | | | This was copy-and-paste from originally trying to get DP read/write working reliably, and notably for other common messages (URB, sampler) we weren't doing this.
* i965/fs: Add gen6 register spilling support.Eric Anholt2011-04-175-31/+58
| | | | | | | | | | | Most of this is code movement to get the scratch space allocated in a shared location. Other than that, the only real changes are that the old oword block messages now operate on oword-aligned areas (with new messages for unaligned access, which we don't do), and that the caching control is in the SFID part of the descriptor instead of message control. Fixes glsl-fs-convolution-1.
* mesa: Fix _mesa_unpack_dudv_span_byte assertion.Eric Anholt2011-04-171-1/+2
| | | | | | | It was accepting only GL_DUDV_ATI and not the specific sized format GL_DU8DV8_ATI. Fixes assertion failure at startup in Shadowgrounds. Reviewed-by: Brian Paul <[email protected]>
* prog_optimize: Add simplify CMP optimization passTom Stellard2011-04-161-0/+78
| | | | | | | This pass coverts CMP T0, T1 T2 T0 -> MOV T0, T2 when the CMP instruction is the first instruction to write to register T0. This pass is useful for hardware that requires a lot of lowering passes that generate many CMP instructions.
* prog_optimize: get_src_arg_mask() respect writemask for more opcodesTom Stellard2011-04-161-0/+11
| | | | Reviewed-by: Eric Anholt <[email protected]>
* r300/compiler: Fix incorrect presubtract conversionTom Stellard2011-04-161-0/+24
| | | | | | | ADD instructions with constant swizzles can't be converted to presubtract operations. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* mesa: provide more info for glCompressedTexImage() errorsCarl-Philip Haensch2011-04-161-8/+26
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: move error check code in compressedteximage()Brian Paul2011-04-161-2/+2
| | | | This was mistakenly inside the #if FEATURE_ES block.
* vbo: init prim[] array with memset()Brian Paul2011-04-151-6/+2
| | | | This fixes a Coverity warning about uninitialized data.
* st/mesa: simplify a bit of the previous patchBrian Paul2011-04-151-5/+8
| | | | Grrr, this was supposed to go in the previous commit.
* st/mesa: add handling for 'PIPE_FORMAT_B8G8R8X8_UNORM' in st_fast_readpixelsPierre-Eric Pelloux-Prayer2011-04-151-10/+20
| | | | | | With minor edits by Brian Paul. Signed-off-by: Brian Paul <[email protected]>
* Revert "r300/compiler: Don't try to convert RGB to Alpha in full instructions"Marek Olšák2011-04-151-2/+1
| | | | | | This reverts commit cd2857fae16e1352f39b37f611797e66619d3fe5. It breaks Unigine Heaven.
* st/mesa: convert Mesa float formats to GalliumMarek Olšák2011-04-152-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: Author: Marek Olšák <[email protected]> st/mesa: require RGBA16F and RGBA32F to be renderable st/mesa: fix L32F and L16F format translation st/mesa: also convert the R/RG float formats commit 49a9948b6a81b7d813304d081139d98e95ba5d1a Author: Luca Barbieri <[email protected]> Date: Fri Aug 20 10:36:17 2010 +0200 mesa/st: enable ARB_texture_float if supported formats allow it commit 7383632f7b6f9021b65f4973b7e7c99f0e8ce9b2 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:00:46 2010 +0200 mesa/st: support ARB_texture_float internal formats commit 7c362cc06982586c2d29fac55f6bcc4bcd1550b5 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:00:33 2010 +0200 mesa/st: convert L/A/I floating point formats
* mesa: finish up ARB_texture_floatMarek Olšák2011-04-155-5/+46
| | | | | | | | | | | | | | | Squashed commit of the following: Author: Marek Olšák <[email protected]> mesa: handle floating-point formats in _mesa_base_fbo_format mesa: add ARB/ATI_texture_float, remove MESAX_texture_float commit 123bb110852739dffadcc81ad80b005b1c4f586d Author: Luca Barbieri <[email protected]> Date: Wed Aug 25 01:35:42 2010 +0200 mesa: compute floatMode for FBOs and return it on RGBA_FLOAT_MODE
* mesa: add R/RG floating-point formatsMarek Olšák2011-04-156-4/+208
|
* mesa: fix L16F and L32F format propertiesMarek Olšák2011-04-151-2/+2
|
* mesa/st: Avoid spurious transfers when creating fbo textures without image data.José Fonseca2011-04-141-1/+6
| | | | | | | | | We could actually try to do an early return both for gallium textures and malloc memory textures, but I'm not sure exactly which situations stImage->pt is NULL, and whether texImage->Data == NULL would be acceptible or not. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add support for GL_RGBA + GL_UNSIGNED_INT_8_8_8_8 in st_fast_readpixelspepp2011-04-141-1/+20
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Expose ATI_draw_buffers.Eric Anholt2011-04-131-0/+1
| | | | | | | | | | | | This is the same as ARB_draw_buffers (which derived from it), except for s/ARB/ATI/. The glapi bits were already in place, and what was missing was just the ARB_fp part. The new Humble Bundle game "trine" tries to use this extension without checking that it's exposed, which this works around. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36182 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for OPTION ATI_draw_buffers to ARB_fp.Eric Anholt2011-04-131-0/+10
| | | | | | Tested by piglit ati_draw_buffers-arbfp. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for the ARB_fragment_program part of ARB_draw_buffers.Eric Anholt2011-04-132-0/+30
| | | | | | | | Fixes fbo-drawbuffers-arbfp. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34321 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/fs: Constant-fold immediates in src0 of SEL instructions.Eric Anholt2011-04-134-0/+16
| | | | | | | | | | | This is like what we do for add/mul, but we have to invert the predicate to choose the other source instead. This removes 5 extra moves of constants in nexuiz shaders. No statistically significant performance difference on my Sandybridge laptop (n=5). Reviewed-by: Ian Romanick <[email protected]>
* i965/fs: Constant-fold immediates in src0 of CMP instructions.Eric Anholt2011-04-133-0/+45
| | | | | | | This is like what we do with add/mul, but we also have to flip the conditional test. Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: minor clean-ups in update_textures()Brian Paul2011-04-131-4/+8
|
* mesa: 80-column wrapping and whitespace fixesBrian Paul2011-04-134-14/+17
|
* mesa: fix some comments in sampler object codeBrian Paul2011-04-131-4/+4
|
* i965: Change assertion condition from implicit to explicitChad Versace2011-04-121-2/+1
| | | | | | | | | | | | | ... because grokking explicit assertions requires fewer neurons. In brw_misc_state.c:emit_depthbuffer, change assertion condition tiling != I915_TILING_X && tiling != I915_TILING_NONE to tiling == I915_TILING_Y Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965: Define BRW_DEPTHFORMAT_D24_UNORM_X8_UINTChad Versace2011-04-121-0/+1
| | | | | | | This depth format was added in Gen5. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965: Document brw_context.state.depth_regionChad Versace2011-04-122-1/+23
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965: Remove unnecessary release/reference of brw_context.state.depth_regionChad Versace2011-04-121-6/+4
| | | | | | | | Release the old depth region and reference the new one *only* if it has changed. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>