summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Allow glGet* queries on EXT_framebuffer_blit data in ES 3Matt Turner2013-01-101-4/+4
| | | | | | Fixes 2 framebuffer_blit es3conform tests. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow glGet* queries on ARB_fragment/vertex_shader data in ES 3Matt Turner2013-01-101-4/+6
| | | | | | | Fixes uniform_buffer_object_implementation_dependent_limits in es3conform. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow glGet* queries on ARB_framebuffer_object data in ES 3Matt Turner2013-01-101-3/+3
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow glGet* queries on ARB_transform_feedback2 data in ES 3Matt Turner2013-01-102-6/+11
| | | | | | | | | Fixes the transform_feedback2_init_defaults test from es3conform. The ES 3 spec lists these as TRANSFORM_FEEDBACK_PAUSED and TRANSFORM_FEEDBACK_ACTIVE. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow glGet* queries on EXT_transform_feedback data in ES 3Matt Turner2013-01-101-7/+7
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow glGet* queries on ARB_sync data in ES 3Matt Turner2013-01-101-3/+3
| | | | | | Fixes the sync_coverage_max_server_wait_timeout test in es3conform. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow glGet* queries of EXT_pbo data in ES 3Matt Turner2013-01-101-4/+4
| | | | | | | Fixes pixel_buffer_object_default_binding and gets other tests in es3conform closer to passing. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow glGet* queries of select ARB_ubo data in ES 3Matt Turner2013-01-101-9/+14
| | | | | | Fixes 5 uniform_buffer_object tests in es3conform. Reviewed-by: Ian Romanick <[email protected]>
* Add ES 3 handling to get.c and get_hash_generator.pyMatt Turner2013-01-103-1/+24
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa/tests: Add ARB_ES3_compatibility enumsMatt Turner2013-01-101-0/+14
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa/program: Fix both Classic and Gallium buildQuentin Glidic2013-01-101-1/+1
| | | | | | | | | Follow-up for 907844107252260c646aca361191ef7f121f3d23 and 3a5ad21cd3f026579eeacc25b39513711556c7ee Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57044 Tested-by: Fabio Pedretti <[email protected]> Tested-by: Brad King <[email protected]>
* intel: Clean up confusion between logical and physical surface dimensions.Paul Berry2013-01-098-153/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In most cases, the width, height, and depth of the physical surface used by the driver to implement a texture or renderbuffer is equal to the logical width, height, and depth exposed to the client through functions such as glTexImage3D(). However, there are two exceptions: cube maps (which have a physical depth of 6 but a logical depth of 1) and multisampled renderbuffers (which have larger physical dimensions than logical dimensions to allow multiple samples per pixel). Previous to this patch, we accounted for the difference between physical and logical surface dimensions at inconsistent places in the call graph (multisampling was accounted for in intel_miptree_create_for_renderbuffer(), and cubemaps were accounted for in intel_miptree_create_internal()). As a result, it wasn't always clear, when calling a miptree creation function, whether physical or logical dimensions were needed. Also, we weren't consistent about storing logical dimensions in the intel_mipmap_tree structure (we only did so in the intel_miptree_create_for_renderbuffer() code path, and we did not store depth). This patch refactors things so that intel_miptree_create_internal() is responsible for converting logical to physical dimensions and for storing both the physical and logical dimensions in the intel_mipmap_tree structure. As a result, all miptree creation functions interpret their arguments as logical dimensions, and both physical and logical dimensions are always available to functions that work with intel_mipmap_trees. In addition, it renames the fields in intel_mipmap_tree used to store the dimensions, so that it is clear from the name whether physical or logical dimensions are being referred to. This should fix the following bugs: - When creating a separate stencil surface for a depthstencil cubemap, we would erroneously try to convert the depth from 1 to 6 twice, resulting in an assertion failure. - When creating an MCS buffer for compressed multisampling, we used physical dimensions instead of logical dimensions, resulting in wasted memory. In addition, this should considerably simplify the implementation of ARB_texture_multisample, because it moves the code to compute the physical size of multisampled surfaces out of renderbuffer-only code. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* intel: Add a force_y_tiling parameter to intel_miptree_create().Paul Berry2013-01-095-26/+34
| | | | | | | | | | | This allows intel_miptree_alloc_mcs() to force Y tiling for the MCS buffer. Previously we accomplished this by the hack of passing INTEL_MSAA_LAYOUT_CMS as the msaa_layout parameter, but that parameter is going to be going away soon. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* intel: Move compute_msaa_layout earlier in file.Paul Berry2013-01-091-38/+41
| | | | | | | | | | No functional change. This patch moves the compute_msaa_layout() function earlier in intel_mipmap_tree.c so that it can be used by other functions in that file. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/fs: Fix struct vs. class in acp_entry definitions.Kenneth Graunke2013-01-081-1/+1
|
* st/mesa: fix possible MSVC build error v2Marek Olšák2013-01-081-2/+2
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=59143 Using GLubyte as per Brian's suggestion.
* mesa: Add ALIGN() macro to main/macros.h.Paul Berry2013-01-084-15/+15
| | | | | | | | | Previously this macro existed in 3 separate places, some inside the intel driver and some outside of it. It makes more sense to have it in main/macros.h Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Support GL_FIXED and packed vertex formats natively on Haswell+.Kenneth Graunke2013-01-072-12/+58
| | | | | | | Haswell and later support the GL_FIXED and 2_10_10_10_rev vertex formats natively, and don't need shader workarounds. Reviewed-by: Eric Anholt <[email protected]>
* i965: Add #defines for GL_FIXED vertex formats.Kenneth Graunke2013-01-071-0/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: Add remaining #defines for packed vertex formats.Kenneth Graunke2013-01-071-0/+9
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: Use Haswell's sample_d_c for textureGrad with shadow samplers.Kenneth Graunke2013-01-074-5/+17
| | | | | | The new hardware actually just supports this now. Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Remove dead code from generate_uniform_pull_constant_load_gen7.Kenneth Graunke2013-01-071-2/+0
| | | | | | | generate_uniform_pull_constant_load_gen7() is only called on Gen7+, so the gen < 6 code is dead. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Don't use rtasm for Haiku swrastAlexander von Gluck IV2013-01-071-1/+1
| | | | | | | | | * We have a symbol conflict as rtasm in Mesa collides with rtasm in gallium. * As us linking gallium and mesa together is an edge case, lets just omit the rtasm code from Mesa as we should be going llvmpipe soon :)
* intel: Fix copy-and-paste bug setting gl_constants::MaxSamplesIan Romanick2013-01-041-1/+1
| | | | | | | | | | gl_constants::MaxSamples is an integer, so setting it to 1.0 is just silly. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Disallow R, RG, or RGB integer and unsigned formats in OpenGL ES 3.0Ian Romanick2013-01-041-4/+2
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Disallow SNORM formats for renderbuffers in OpenGL ESIan Romanick2013-01-041-16/+4
| | | | | | | | | | v2: Move {RED,RG,RGB,RGBA}_SNORM changes from the previous commit to this commit. Based on suggestions from Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Disallow deprecated SNORM formats for renderbuffersIan Romanick2013-01-041-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenGL 3.2 core profile spec says: "The following base internal formats from table 3.11 are color-renderable: RED, RG, RGB, and RGBA. The sized internal formats from table 3.12 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable." The OpenGL 3.2 compatibility profile spec says (only ALPHA is added): "The following base internal formats from table 3.16 are color-renderable: ALPHA, RED, RG, RGB, and RGBA. The sized internal formats from table 3.17 that have a color-renderable base internal format are also color-renderable. No other formats, including compressed internal formats, are color-renderable." Table 3.12 in the core profile spec and table 3.17 in the compatibility profile spec list SNORM formats as having a base internal format of RED, RG, RGB, or RGBA. From this we infer that they should also be color renderable. The OpenGL ES 3.0 spec says: "An internal format is color-renderable if it is one of the formats from table 3.12 noted as color-renderable or if it is unsized format RGBA or RGB. No other formats, including compressed internal formats, are color-renderable." In the OpenGL ES 3.0 spec, none of the SNORM formats have "color- renderable" marked in table 3.12. The RGB I and UI formats also are not color-renderable in ES3, but we'll save that change for another patch. Both NVIDIA's closed-source driver (version 304.64) and AMD's closed-source driver (Catalyst 12.6 on HD 3650) reject *all* SNORM formats for renderbuffers in OpenGL 3.3 compatibility profiles. v2: Move {RED,RG,RGB,RGBA}_SNORM changes from the this commit to the next commit. Based on suggestions from Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* xlib: allow GLX_DONT_CARE for glXChooseFBConfig() attribute valuesBrian Paul2013-01-041-0/+14
| | | | | | | | Fixes piglit glx-dont-care-mask test. Note: This is a candidate for the stable branches. Reviewed-by: Chad Versace <[email protected]>
* i965: Fix glCompressedTexSubImage2D offsets for ETC textures.Paul Berry2013-01-041-0/+3
| | | | | | | | | | | This patch fixes intel_miptree_unmap_etc() (which decompresses ETC textures to linear) to pay attention to map->x and map->y when writing to the destination image. Previously these values were ignored, causing the xoffset and yoffset parameters passed to glCompressedTexSubImage2D() to be ignored. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: fix assertion failures with 2101010 vertex formatsMarek Olšák2013-01-041-3/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: accelerate CopyTexSubImage for 1D array texturesMarek Olšák2013-01-041-26/+66
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix CopyTexSubImage fallback for 1D array texturesMarek Olšák2013-01-043-17/+42
| | | | | | | | - We should use a 3D transfer of size Width x 1 x NumLayers. - We should use layer_stride instead of stride. (even though they are likely to be equal with 1D array textures) Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix GetTexImage for compressed 2D array texturesMarek Olšák2013-01-041-23/+32
| | | | | | | This uses a 3D blit to decompress the texture and then a 3D transfer to read it. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: try to find the format matching format+type in decompressed_with_blitMarek Olšák2013-01-041-19/+50
| | | | | | | | | | | | | | | There was the fast path based on _mesa_format_matches_format_and_type for GetTexImage, but it never worked, because the Mesa format we were testing there was always compressed. Further testing showed that the fast path had been completely broken. In this commit, the somewhat limited helper util_create_rgba_texture is no longer used and instead, custom code for the texture creation is added, which tries to find the best matching RGBA8 format, so that we can hit the fast path *always* if the read format is a variant of RGBA8 and supported by the driver. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix GetTexImage for compressed cubemapsMarek Olšák2013-01-041-1/+1
| | | | | | I'll deal with 2D arrays later. NOTE: This is a candidate for the stable branches.
* mesa: allow TEXTURE_CUBE_MAP_ARRAY in GetTexImageMarek Olšák2013-01-041-0/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-044-8/+16
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]>
* i965: Replace structs with bit-shifting for Gen7 SURFACE_STATE entries.Kenneth Graunke2013-01-036-360/+252
| | | | | | | | | | | | | | | | | Every generation except Gen7 creates SURFACE_STATE entries via a uint32_t array. Only Gen7 uses the older bitfield structure, which we moved away from because it was less efficient. Convert it for consistency. This reduces the compiled size of gen7_wm_surface_state.o by 2.86% in a release build. v2: Fix accidental use of BRW_SURFACE_WIDTH/HEIGHT in brw_state_dump.c; switch back to gen7_set_surface_mcs_info setting surf[6] directly (both per Eric's review comments). Acked-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* radeon/r200: Fix tcl cullingsmoki2013-01-032-18/+8
| | | | | Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=57842
* i965: Add break statement at end of BRW_OPCODE_CONTINUE case.Vinson Lee2013-01-021-0/+1
| | | | | | | | Fixes missing break in switch defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add missing ASSERT_OUTSIDE_BEGIN_END to GetSamplerParameter*Matt Turner2013-01-021-0/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add missing ASSERT_OUTSIDE_BEGIN_END to SamplerParameter*Matt Turner2013-01-021-0/+8
| | | | | | | Commit f22d49de added the SamplerParamter* functions but only used ASSERT_OUTSIDE_BEGIN_END inside the -f and -fv versions. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Mark _mesa_{init,delete}_sampler_object as staticMatt Turner2013-01-022-9/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Implement compressed 2D array textures.Paul Berry2013-01-022-30/+40
| | | | | | | | | | | | | This patch adds functionality to Mesa to upload compressed 2-dimensional array textures, using the glCompressedTexImage3D and glCompressedTexSubImage3D calls. Fixes piglit tests "EXT_texture_array/compressed *" and "!OpenGL ES 3.0/ext_texture_array-compressed_gles3 *". Also partially fixes GLES3 conformance test "CoverageES30.test". Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Fix error reporting in _mesa_invalidate_pbo_{compressed_,}teximage.Paul Berry2013-01-024-10/+16
| | | | | | | | | | | The old error reporting was completely bogus, passing _mesa_error() a format string that didn't even match the remaining arguments. Also, in many cases the number of dimensions in the TexImage call was not preserved in the error message (e.g. an error in glTexImage2D was reported simply as an error in glTexImage). Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: fix signed/unsignd mix-up in fetch_signed_l_latc1()Brian Paul2013-01-021-2/+3
| | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=58844
* glsl: add cast to silence signed/unsigned comparision warningBrian Paul2013-01-011-1/+1
|
* xlib: handle _mesa_initialize_visual()'s return valueBrian Paul2012-12-311-9/+12
| | | | | | | | | If the call fails, we should return NULL from XMesaCreateVisual(). This was found when Waffle tried to create a visual with depth/stencil bits = -1. That's an illegal value for glXChooseFBConfig() and we should return NULL in that situation. Note: This is a candidate for the stable branches.
* i965: Fail to blit rather than assert on invalid pitch requirements.Kenneth Graunke2012-12-291-2/+2
| | | | | | | | | | | | | | | | | | | Dungeon Defenders hits TexImage()'s try_pbo_upload() path where image->Width == 2, which doesn't meet intelEmitCopyBlit's requirement that the pitch needs to be a multiple of 4. Since intelEmitCopyBlit can already fail for a myriad of other reasons, and it's not clear that other callers are immune to this failure mode, simply make it return false rather than assert. Fixes Dungeon Defenders on i965/Ivybridge. Now playable (aside from having to work around the EXT_bindable_uniform issue). NOTE: This is probably a candidate for the 9.0 branch. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: Skip texture validation logic when nothing has changed.Eric Anholt2012-12-285-2/+30
| | | | | | Improves GLBenchmark 2.1 offscreen performance by 3.2% +/- 1.5% (n=52). Reviewed-by: Kenneth Graunke <[email protected]>