summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* get.c: Rename EXTRA_VERSION_ES2 to EXTRA_API_ES2Kristian Høgsberg2012-06-181-5/+5
| | | | | | | | This extra condition checks the API not the version of the API, so rename to reflect that. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: properly allocate MSAA renderbuffersMarek Olšák2012-06-161-3/+31
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: make unsupported renderbuffer formats always fail as FBO incompleteMarek Olšák2012-06-161-4/+10
| | | | | | | | | instead of failing to allocate a renderbuffer. This also fixes piglit/get-renderbuffer-internalformat with non-renderable formats. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: separate sw renderbuffer allocation from hw oneMarek Olšák2012-06-161-75/+93
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: if AllocStorage doesn't choose a format, report FRAMEBUFFER_UNSUPPORTEDMarek Olšák2012-06-161-1/+10
| | | | | | | | | | | This allows drivers not to do any allocation in AllocStorage if the storage cannot be allocated because of an unsupported internalformat + samples combo. The little ugliness is that AllocStorage is expected to return TRUE in this case. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: don't do srgb->linear conversion in decompress_with_blitMarek Olšák2012-06-151-0/+1
| | | | | | | | This fixes piglit/getteximage-formats on r600g. NOTE: This is a candidate for stable branches. Reviewed-by: Brian Paul <[email protected]>
* gallium: Add support for ir_unop_f2u to tgsi backend.Paul Berry2012-06-151-0/+6
| | | | | Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* ir_to_mesa: Add support for ir_unop_f2u to ir_to_mesa backend.Paul Berry2012-06-151-0/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add support for ir_unop_f2u to i965 backend.Paul Berry2012-06-153-0/+3
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/blorp: Implement source clipping.Paul Berry2012-06-151-3/+11
| | | | | | | | | | | | | | | | | This patch modifies blorp blits (which are used for MSAA) to properly account for clipping of source coordinates. Previously, if we detected the possibility of source clipping, we would fall back to the blit meta-op, which doesn't support MSAA and is very slow for depth and stencil buffers. Fixes piglit tests "EXT_framebuffer_multisample/clip-and-scissor-blit" on i965/Gen6+. Also substantially speeds up the Humble Bundle V game "Psychonauts" on Gen6+ (without this patch, the game's depth buffer blits use the slow blit meta-op). Reviewed-by: Carl Worth <[email protected]>
* scons: add st_atom_array.c to the buildBrian Paul2012-06-151-0/+1
|
* st/mesa: atomize vertex array stateMarek Olšák2012-06-157-578/+625
| | | | This moves the state validation to where all the other states are validated.
* st/mesa: fix glDrawPixels(GL_DEPTH_COMPONENT) color outputBrian Paul2012-06-141-2/+11
| | | | | | | | | When drawing a depth image the fragment shader also needs to emit the current raster color. The new piglit drawpix-z test exercises this. NOTE: This is a candiate for the 8.0 branch.
* glx/tests and mesa/tests: Update .gitignore files.Paul Berry2012-06-141-0/+2
| | | | | | | | | This patch updates .gitignore files to account for the new build artifacts introduced by the following commits: ae376f0 glx/tests: Rename test as glx-test 8fecdcc mesa/tests: Add tests for _mesa_lookup_enum_by_{name,nr} functions a29ad2b mesa/tests: Add tests for the generated dispatch table
* windows/gdi: Remove GL_NV_register_combiners and GL_NV_vertex_array_range ↵José Fonseca2012-06-141-15/+0
| | | | exports
* mesa/tests: Add tests for _mesa_lookup_enum_by_{name,nr} functionsIan Romanick2012-06-132-0/+1873
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: move variable declaration out of loop to fix MSVC buildBrian Paul2012-06-121-1/+2
|
* mesa: Fix bool-int mismatchStéphane Marchesin2012-06-121-4/+5
| | | | Also include stdbool for windows.
* mesa: Fix hash table leakAntoine Labour2012-06-122-6/+15
| | | | | | | When a value was replaced, the new key was strdup'd and leaked. To fix this, we modify the hash table implementation to return whether the value was replaced and free() the (now useless) duplicate string.
* mesa: Free uniforms correclty.Antoine Labour2012-06-121-1/+2
| | | | | | | | This is an array of uniforms, not a single one. Reviewed-by: Ian Romanick <[email protected]> NOTE: This is a candidate for the 8.0 branch.
* meta: Cleanup the resources we allocate.Antoine Labour2012-06-121-6/+66
| | | | | | | | | | | When we have multiple shared contexts, and one of them is long-running, this will lead to never freeing those resources since they are shared. Instead, free them right away on context destruction since we know the other context isn't using them. Reviewed-by: Ian Romanick <[email protected]> NOTE: This is a candidate for the 8.0 branch.
* mesa: Build git_sha1.h before computing dependencies.Eric Anholt2012-06-121-1/+1
| | | | | | | | | Otherwise, version.c doesn't get a dependency on it in a clean build, and then it doesn't necessarily get generated before version.c is compiled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50976 Reviewed-by: Jakob Bornecrantz [email protected]
* mesa: Unbind GL_TEXTURE_BUFFER on DeleteBuffers.Kenneth Graunke2012-06-111-0/+4
| | | | | | | | Fixes oglconform's tbo/basic.buffer.delete test. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Make glPrimitiveRestartIndex execute immediately in display lists.Kenneth Graunke2012-06-111-0/+3
| | | | | | | | | | | | | | | From the GL_NV_primitive_restart spec: "PrimitiveRestartIndexNV is not compiled into display lists, but is executed immediately." Prior to this patch, calls to glPrimitiveRestartIndex would hit the noop dispatch stub. +2 oglconforms. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Check for a negative "size" parameter in glCopyBufferSubData().Kenneth Graunke2012-06-111-0/+6
| | | | | | | | | | | | | | From the GL_ARB_copy_buffer spec: "An INVALID_VALUE error is generated if any of readoffset, writeoffset, or size are negative [...]" Fixes oglconform's copybuffer/negative.CNNegativeValues test. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* scons: Fix scons build.José Fonseca2012-06-111-0/+2
|
* automake: Merge the dricore libglsl build into libdricore.Eric Anholt2012-06-111-1/+9
| | | | | | | | | | | | | Now we have just one library of "all of Mesa core" instead of both libdricore and libglsl that drivers link against. I did this change in a sort of nonrecursive make fashion: the generated files are still produced in the non-automake build, like the rest of dricore, but the GLSL files are stuffed into libdricore without building a convenience library in src/glsl (even though we could now). This would make a bit more sense if glsl was just another dir under src/mesa, because right now I had to contort the prefix variable name to look another ../ level up.
* automake: Move top-level makefile to automake.Eric Anholt2012-06-111-0/+17
| | | | | | | | | This is part of a series to fix our build issues in the automake case by hooking up the automatic Makefile regeneration support. The extract_git_sha1 is moved into src/mesa/Makefile so that we get correct dependency generation. Reviewed-by: Kenneth Graunke <[email protected]>
* android: fix the buildTapani Pälli2012-06-111-29/+16
| | | | | | | | | Some more of the files are now autogenerated, this caused build breakage, patch adds generation of these missing files. Patch also changes existing make so that the files are created to be part of the local source (not intermediate directory, this causes several problems). Signed-off-by: Tapani Pälli <[email protected]>
* mesa: Fix "glCopyBuffserSubData" typos in error messages and comments.Kenneth Graunke2012-06-081-10/+10
| | | | Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Add forgotten bitcast operations in brw_fs_channel_expressions.Kenneth Graunke2012-06-071-0/+4
| | | | Signed-off-by: Kenneth Graunke <[email protected]>
* i965/blorp: allow all buffer formats provided src and dst match.Paul Berry2012-06-071-25/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, blits using the "blorp" mechanism only worked for 8-bit RGBA color buffers, 24-bit depth buffers, and 8 bit stencil buffers. This was not enough, because the blorp mechanism must be used for blitting whenever MSAA is in use. This patch allows all formats to be used, provided the source and destination formats match. So far I have confirmed that the following formats work properly with MSAA: - GL_RGB - GL_RGBA - GL_ALPHA - GL_ALPHA4 - GL_ALPHA8 - GL_R3_G3_B2 - GL_RGB4 - GL_RGB5 - GL_RGB8 - GL_RGB10 - GL_RGB12 - GL_RGB16 - GL_RGBA2 - GL_RGBA4 - GL_RGB5_A1 - GL_RGBA8 - GL_RGB10_A2 - GL_RGBA12 - GL_RGBA16 Fixes piglit tests "EXT_framebuffer_multisample/formats {2,4}" on Sandy Bridge and Ivy Bridge. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/blorp: Implement logic for additional buffer formats.Paul Berry2012-06-073-7/+37
| | | | | | | | | | | | | Previously the blorp engine only supported RGBA8 color buffers and 24-bit depth buffers. This patch adds support for any color buffer format that is supported as a render target, and for 16-bit and 32-bit depth buffers. This required threading the brw_context struct through into brw_blorp_surface_info::set() so that it can consult the brw->render_target_format array. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/blorp: De-virtualize brw_blorp_{mip,surface}_info::set() function.Paul Berry2012-06-071-4/+4
| | | | | | | | | | Even though brw_blorp_surface_info is derived from brw_blorp_mip_info, this function doesn't need to be virtual, because it is never accessed through a base class pointer. Making the function non-virtual will allow it to take additional parameters in the brw_blorp_surface_info case. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/blorp: Refactor surface format determination.Paul Berry2012-06-074-10/+10
| | | | | | | | | | | This patch moves the responsibility for deciding on the format of the source and destination surfaces from the gen{6,7}_blorp_emit_surface_state() functions to brw_blorp_surface_info::set(), which is shared between Gen6 and Gen7. This will make it possible to add support for more surface formats without code duplication. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Enable the GL_ARB_shader_bit_encode extension.Kenneth Graunke2012-06-073-0/+25
| | | | Signed-off-by: Kenneth Graunke <[email protected]>
* st/mesa: Finally activate the ARB_shader_bit_encoding extension.Olivier Galibert2012-06-071-0/+4
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Bitwise conversion operator support in the software renderers.Olivier Galibert2012-06-072-0/+11
| | | | | | | | | | | | | TGSI doesn't need an opcode, since registers are untyped (but beware once doubles come into the scene). Mesa IR doesn't handle native integers, so trying to handle them there is worthless, the case entries are only added for warning reasons. It was only tested with softpipe, since llvmpipe doesn't support glsl 1.3 yet. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Scaffolding for ARB_shader_bit_encoding.Olivier Galibert2012-06-073-0/+3
| | | | | | | | That adds support for activating the extension. It doesn't actually *do* anything yet, of course. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Return 8 bits for GL_TEXTURE_RED_SIZE on RGTC formats.Kenneth Graunke2012-06-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | From the issues section of the GL_ARB_texture_compression_rgtc extension: 15) What should glGetTexLevelParameter return for GL_TEXTURE_GREEN_SIZE and GL_TEXTURE_BLUE_SIZE for the RGTC1 formats? What should glGetTexLevelParameter return for GL_TEXTURE_BLUE_SIZE for the RGTC2 formats? RESOLVED: Zero bits. These formats always return 0.0 for these respective components and have no bits devoted to these components. Returning 8 bits for red size of RGTC1 and the red and green sizes of RGTC2 makes sense because that's the maximum potential precision for the uncompressed texels. Thus, we need to return 8 bits for GL_TEXTURE_RED_SIZE on all RGTC formats and 8 bits for GL_TEXTURE_GREEN_SIZE on RGTC2 formats. BLUE should be 0. Fixes oglconform/rgtc/advanced.texture_fetch.tex_param. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: consolidate internal glCompressedTexSubImage1/2/3D codeBrian Paul2012-06-067-138/+42
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCompressedTexImage1/2/3D codeBrian Paul2012-06-067-140/+44
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCopyTexSubImage1/2/3D codeBrian Paul2012-06-0610-220/+62
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexSubImage1/2/3D codeBrian Paul2012-06-0610-195/+61
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexImage1/2/3D codeBrian Paul2012-06-0610-343/+73
| | | | | | | The functions for handling 1D, 2D and 3D texture images were nearly identical. This folds them all together. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix user-defined FS outputs with less than four components.Kenneth Graunke2012-06-052-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenGL allows you to declare user-defined fragment shader outputs with less than four components: out ivec2 color; This makes sense if you're rendering to an RG format render target. Previously, we assumed that all color outputs had four components (like the built-in gl_FragColor/gl_FragData variables). This caused us to call emit_color_write for invalid indices, incrementing the output virtual GRF's reg_offset beyond the size of the register. This caused cascading failures: split_virtual_grfs would allocate new size-1 registers based on the virtual GRF size, but then proceed to rewrite the out-of-bounds accesses assuming that it had allocated enough new (contiguously numbered) registers. This resulted in instructions that accessed size-1 GRFs which register numbers beyond virtual_grf_next (i.e. registers that were never allocated). Finally, this manifested as live variable analysis and instruction scheduling accessing their temporary array with an out of bounds index (as they're all sized based on virtual_grf_next), and the program would segfault. It looks like the hardware's Render Target Write message requires you to send four components, even for RT formats such as RG or RGB. This patch continues to use all four MRFs, but doesn't bother to fill any data for the last few, which should be unused. +2 oglconforms. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Fix texelFetchOffset() on pre-Gen7.Kenneth Graunke2012-06-051-2/+2
| | | | | | | | | | | Commit 4650aea7a536ddce120576fadb91845076e8e37a fixed texelFetchOffset() on Ivybridge, but didn't update the Ironlake/Sandybridge code. +18 piglits on Sandybridge. NOTE: This and 4650aea7a536ddce are both candidates for stable branches. Signed-off-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix texelFetchOffset() on pre-Gen7.Kenneth Graunke2012-06-051-12/+28
| | | | | | | | | | | Commit f41ecade7b458c02d504158b522acb2231585040 fixed texelFetchOffset() on Ivybridge, but didn't update the Ironlake/Sandybridge code. +15 piglits on Sandybridge. NOTE: This and f41ecade7b458 are both candidates for stable branches. Signed-off-by: Kenneth Graunke <[email protected]>
* meta: Fix GL_RENDERBUFFER binding in decompress_texture_image().Kenneth Graunke2012-06-051-0/+4
| | | | | | | | | | | | | This isn't saved/restored by _mesa_meta_begin, so we need to do it manually (like we do for the read/draw framebuffers). Additionally, we neglected to re-bind before the glRenderbufferStorage call. +13 oglconforms. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Unbind ARB_transform_feedback2 binding points on Delete too.Kenneth Graunke2012-06-051-1/+7
| | | | | | | | | | | | DeleteBuffer needs to unbind from these binding points as well, based on the same rationale as the previous patch. +51 oglconforms (together with the last patch). NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>