summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa/es3: Add support for GL_PRIMITIVE_RESTART_FIXED_INDEXIan Romanick2013-01-119-19/+67
| | | | | | | | | | | | | This requires some derived state. The cut vertex used is either the value specified by glPrimitiveRestartIndex or it's hard-coded to ~0. The derived state gl_array_attrib::_RestartIndex captures this value. In addition, the derived state gl_array_attrib::_PrimitiveRestart is set whenever either gl_array_attrib::PrimitiveRestart or gl_array_attrib::PrimitiveRestartFixedIndex is set. v2: Use _mesa_is_gles3. Signed-off-by: Ian Romanick <[email protected]>
* i965: Add support for GL_ANY_SAMPLES_PASSED_CONSERVATIVEIan Romanick2013-01-111-0/+3
| | | | | | | | We just treat this as an alias for GL_ANY_SAMPLES_PASSED. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es3: Add support for GL_ANY_SAMPLES_PASSED_CONSERVATIVE query targetIan Romanick2013-01-112-2/+11
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es3: Allow transpose matrix uniforms in GLES3Ian Romanick2013-01-111-1/+2
| | | | Signed-off-by: Ian Romanick <[email protected]>
* Clean up .gitignore filesMatt Turner2013-01-1017-19/+0
|
* Remove state_tracker/MakefileMatt Turner2013-01-101-2/+0
| | | | Unneeded and unnecessary.
* mesa: Rename and wire-up GetInteger64i_vMatt Turner2013-01-103-5/+4
| | | | | | | | | | | | The function was named badly and wasn't in the dispatch table, making it hard to find. Fixes transform_feedback2_states and gets a few other transform feedback tests closer to working in es3conform. Reviewed-by Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Correct glGet{Boolean,Integer}i_v namesMatt Turner2013-01-101-2/+2
| | | | | | Reviewed-by Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow GL_DEPTH_STENCIL_ATTACHMENT in ES 3Matt Turner2013-01-101-1/+1
| | | | | | | Fixes framebuffer_srgb_default_encoding_fbo and 5 packed_depth_stencil tests from es3conform. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Support more glGet enums for ES3Chad Versace2013-01-102-3/+11
| | | | | | | | | | | | | | | | | | For glGetIntegerv, add support for the following in an OpenGL ES 3.0 context: GL_MAJOR_VERSION GL_MINOR_VERSION GL_NUM_EXTENSIONS See Table 6.29 of the OpenGL ES 3.0 spec. Fixes error GL_INVALID_ENUM in piglit egl-create-context-verify-gl-flavor, testcase for OpenGL ES 3.0. Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* mesa: Support querying GL_MAX_ELEMENT_INDEX in ES 3Matt Turner2013-01-104-0/+23
| | | | | | | | | The ES 3 spec says that the minumum allowable value is 2^24-1, but the GL 4.3 and ARB_ES3_compatibility specs require 2^32-1, so return 2^32-1. Fixes es3conform's element_index_uint_constants test. Reviewed-by: Ian Romanick <[email protected]>
* mesa: De-duplicate ES2 queriesMatt Turner2013-01-102-11/+11
| | | | | | | | From GL/GLES/GL_CORE and GLES2 -> GL/GL_CORE/GLES2. Yes, we really were exposing ES2_compatibility queries on ES 1. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Allow glGet* queries on EXT_texture_lod_bias data in ES 3Matt Turner2013-01-101-3/+7
| | | | | | Fixes the remaining 4 texture_lod_bias failures in es3conform. Reviewed-by: Ian Romanick <[email protected]>
* 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]>