summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Mark GetBufferParameteri64v as implemented.Kenneth Graunke2012-11-191-2/+1
| | | | | | | | | | | | | | | | | | Apparently this was accidentally marked as unimplemented, and thus not put in the dispatch table. Fixes 7 es3conform tests: - copy_buffer_parameters - copy_buffer_data - copy_buffer_usage - pixel_buffer_object_bind - pixel_buffer_object_parameteriv - pixel_buffer_object_texture_read - pixel_buffer_object_usage v2: Also update the DispatchSanity test for this change. Reviewed-by: Matt Turner <[email protected]>
* mesa: Require gen'd names in glBeginQuery on ES 3.0.Kenneth Graunke2012-11-191-1/+1
| | | | | | | | | | | Only legacy OpenGL allows the use of non-gen'd names. Core profiles and ES 3 both require the use of glGenQueries(). Note that BeginQuery doesn't exist in ES 1 or ES 2. Fixes es3conform's occlusion_query_invalid_beginquery test. Reviewed-and-tested-by: Matt Turner <[email protected]>
* mesa: Support EXT_framebuffer_blit targets in ES 3.0 as well.Kenneth Graunke2012-11-191-4/+5
| | | | | | | | | GL_READ_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER are valid targets in ES 3. Fixes 23 es3conform framebuffer_blit tests. Two more go from fail to crash, but that appears to be because they actually run now. Reviewed-and-tested-by: Matt Turner <[email protected]>
* mesa: Fix error code for glTexParameteri of TEXTURE_MAX_LEVEL.Kenneth Graunke2012-11-191-1/+1
| | | | | | | | | | | | Calling glTexParameteri() with pname GL_TEXTURE_MAX_LEVEL and either a target of GL_TEXTURE_RECTANGLE or a negative value previously generated GL_INVALID_OPERATION. However, GL_INVALID_VALUE seems more appropriate. Fixes oglconform's api-error/negative.glTexParameter and es3conform's sgis_texture_lod_basic_error. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-and-tested-by: Matt Turner <[email protected]>
* i965/vs: Don't lose attribute type when converting ATTR to FIXED_HW_REG.Kenneth Graunke2012-11-191-0/+1
| | | | | | | | | | | | The new brw_reg always had type BRW_REGISTER_TYPE_F, rather than inheriting the original type of the ATTR file register. In the past, this hasn't been a problem since we only execute this code when fixing up GL_FIXED attributes, which always have float types. However, we'll soon be using it for ARB_vertex_type_10_10_10_2 support, which uses D and UD types. Reviewed-by: Eric Anholt <[email protected]>
* i965: Validate requested GLES context version in brwCreateContextChad Versace2012-11-191-33/+25
| | | | | | | | | | | | | | For GLES1 and GLES2, brwCreateContext neglected to validate the requested context version received from the DRI layer. If DRI requested an OpenGL ES2 context with version 3.9, we provided it one. Before this fix, the switch statement that validated the requested GL context flavor was an ugly #ifdef copy-paste mess. Instead of reproducing the copy-past-mess for GLES1 and GLES2, I first refactored it. Now the switch statement is readable. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965/fs: Properly patch special values during VGRF compaction.Kenneth Graunke2012-11-171-0/+27
| | | | | | | | | | | | | | | | | | | | In addition to registers used by instructions, fs_visitor maintains direct references to certain "special" values used for inputs/outputs. When I added VGRF compaction, I overlooked these, believing that these direct references weren't used once instructions were generated. That was wrong. For example, pixel_x/y are used in virtual_grf_interferes(), which is called by optimization passes and register allocation. This patch treats all of them as used and patches them after compacting. While it's not strictly necessary to patch all of them (as some aren't used after emitting code), it seems safer to simply fix them all. Fixes oglconform's textureswizzle/advanced.shader.targets, piglit's glsl-fs-lots-of-tex, and glean's texCombine on pre-Gen6 hardware. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56790 Reviewed-by: Eric Anholt <[email protected]>
* i965/gen4: Respect the VERTEX_PROGRAM_TWO_SIDE vertex program/shader flag.Eric Anholt2012-11-171-3/+4
| | | | | | Fixes piglit "vertex-program-two-side enabled front back" and 4 others. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix segfault on reading from a missing color read buffer.Eric Anholt2012-11-171-11/+11
| | | | | | | | | | | | | | The diff looks funny, but it's moving the integer vs non-integer check below the _mesa_source_buffer_exists() check that ensures _ColorReadBuffer is non-null, so we get a GL_INVALID_OPERATION instead of a segfault. This looks like it had regressed in the _mesa_error_check_format_and_type() changes, which removed the first of the two duplicated checks for the source buffer. Fixes segfault in the new piglit ARB_framebuffer_object/negative-readpixels-no-rb. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45877 NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* intel: Use core mesa support for determining lastLevel.Eric Anholt2012-11-171-3/+3
| | | | | | | We had similar issues with using depth in determining the lastLevel of array textures. Reviewed-by: Chad Versace <[email protected]>
* mesa: Also handle GL_TEXTURE_EXTENRAL_OES in max num levels.Eric Anholt2012-11-171-0/+1
| | | | Reviewed-by: Chad Versace <[email protected]>
* i965/fs: Unify the param pointer allocation for FP/non-FP.Eric Anholt2012-11-171-13/+7
| | | | | | | Now that we're using the new backend, we may actually put things into push constants if you have too many uniform values uploaded. Also, correctly account for texture rectangle params and drop the old special case for the 0.0/1.0 params from the old backend.
* Remove OpenVMS supportMatt Turner2012-11-1623-1035/+3
| | | | | | | | | | Not maintained since 2008. Doubtful that it's worked in quite a while. Also see commit 32ac8cb05 which removed VMS stuff from Makefile in 2009. Cc: Jouk Jansen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Andreas Boll <[email protected]>
* mesa: return INVALID_VALUE from WaitSync if timeout != GL_TIMEOUT_IGNOREDMatt Turner2012-11-151-5/+2
| | | | | | | This was added in version 22 of the GL_ARB_sync spec. Fixes gles3conform's sync_error_waitsync_timeout test. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: return INVALID_VALUE from WaitSync if flags != 0Matt Turner2012-11-151-1/+1
| | | | | | Fixes gles3conform's sync_error_waitsync_flags test. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: return INVALID_VALUE from ClientWaitSync if flags contains an ↵Matt Turner2012-11-151-1/+1
| | | | | | | | unsupported flag Fixes gles3conform's sync_error_clientwaitsync_flags test. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: return INVALID_VALUE from VertexAttribDivisor if index out of rangeMatt Turner2012-11-151-1/+1
| | | | | | | | | All the other range checks on index already return the proper error, INVALID_VALUE. Fixes gles3conform's instanced_arrays_invalid test. Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Don't calculate_live_intervals() in opt_algebraic().Kenneth Graunke2012-11-151-2/+0
| | | | | | There's no point: opt_algebraic() doesn't use any liveness information. Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove duplicate brw_opcodes table in favor of opcode_descs.Kenneth Graunke2012-11-154-65/+4
| | | | | | | | brw_optimize.c's brw_opcodes table was a copy of brw_disasm.c's opcode_descs table, but with an additional field: is_arith. Now that I've deleted that, the two are identical. Keep the one in brw_disasm.c. Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Remove dead vec4_visitor::src_reg_for_float prototype.Kenneth Graunke2012-11-151-2/+0
| | | | | | No such function exists. src_reg's constructor does that. Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Remove bblock field of fs_visitor.Kenneth Graunke2012-11-151-2/+0
| | | | | | | All users of basic block analysis simply create their own local variables. Nobody uses the visitor-wide field. Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove brw_instruction_info::is_arith().Kenneth Graunke2012-11-152-20/+19
| | | | | | Nobody uses it. Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove some dead code optimization passes.Kenneth Graunke2012-11-151-544/+0
| | | | | | | | | | | | | The old brw_remove_grf_to_mrf_moves() pass is obsolete and replaced by fs_visitor::compute_to_mrf(). The old brw_remove_duplicate_mrf_moves() pass is obsolete and replaced by fs_visitor::remove_duplicate_mrf_writes(). The remaining pass, brw_set_dp4_dependency_control(), is currently unused, but could be, so I'm leaving it for now. Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove unused BRW_PACKCOLOR8888 macro.Kenneth Graunke2012-11-151-4/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove brw_shader_program wrapper struct.Kenneth Graunke2012-11-152-9/+4
| | | | | | | At this point, it's just gl_shader_program. Nobody even uses it; even the program that creates them only returns gl_shader_program pointers. Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove unused struct brw_vs_ouput_sizes.Kenneth Graunke2012-11-151-8/+0
| | | | | | With a name like that, it can't be used. Sure enough, it's not. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add .gitignore for hashtable collision unit test.Paul Berry2012-11-141-0/+1
| | | | | This test was introduced in commit 35fd61bd99c15c2e13d3945b41c4db7df6e64319.
* mesa: Include compiler.h in hash_table.h.Vinson Lee2012-11-131-2/+4
| | | | | | | Include the header for the inline symbol. MSVC does not have the inline keyword for C. Signed-off-by: Vinson Lee <[email protected]>
* i965/vs: Fix user clip plane setup on Gen4-5.Kenneth Graunke2012-11-131-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | On Gen6-7, we don't compact clip planes, and nr_userclip_plane_consts is the last bit set, so iterating from i = 0..nr_userclip_plane_consts covers all active clip planes and is the right thing to do. works and is the right thing to do. However, that doesn't work at all on Gen4-5. Since we don't compact clip planes, we skip over ones which aren't active (via the continue statement). We also set set nr_userclip_plane_consts to the number of active clip planes, which means that we end the loop after checking that many bits. If the set of clip planes wasn't contiguous, this means we'd fail to find the last few. By changing the iteration to MAX_CLIP_PLANES, we correctly find all of the active clip planes. Fixes regressions since 66c8473e028d (replacing the old VS backend) in Piglit's spec/glsl-1.20/execution/clipping/fixed-clip-enables and oglconform's mustpass(basic.clip) and userclip(basic.allCases). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56791 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Simplify the Gen6-7 part of setup_uniform_clipplane_values().Kenneth Graunke2012-11-131-8/+2
| | | | | | | There's no compaction, so we can drop that code and simply use 'i'. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Split setup_uniform_clipplane_values() into Gen4-5/6-7 parts.Kenneth Graunke2012-11-131-21/+39
| | | | | | | | | Since Gen4-5 compacts clip planes and Gen6-7 doesn't, it makes sense to split them into separate code paths. This patch simply copies the code to both halves; the next commits will simplify it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Replace random with standard C rand.Vinson Lee2012-11-121-1/+1
| | | | | | BSD random is not available on some compilers. Signed-off-by: Vinson Lee <[email protected]>
* mesa: Fix gallium build since 6991c2922fEric Anholt2012-11-121-1/+1
| | | | | | | Looks like I screwed up and didn't test gallium again after tweaking the Makefile. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57044
* mesa: Convert the hash table for GL object ids to the open-addressing hash.Eric Anholt2012-11-122-262/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous 1023-entry chaining hash table never resized, so it was very inefficient when there were many objects live. While one could have an even more efficient implementation than this (keep an array for genned names with packed IDs, or take advantage of the fact that key == hash or key == *(uint32_t *)data to store less data), this is fairly fast, and I want a nice replacement hash table for other parts of Mesa, too. It improves Minecraft performance 12.3% +/- 1.4% (n=9), dropping hash lookups from 8% of the profile to 0.5%. I also tested cairo-gl, which should be a pessimal workload for this hash table: around 247000 FBOs created and destroyed, only around 65 live at any time, and few lookups of them between creation and destruction. No statistically significant performance difference at n=76 (mean 20.3/20.4 seconds, sd 2.8/3.2 seconds). If I remove the >20 seconds outliers that appear to be due to thermal throttling, there's possibly a .97% +/- 0.31% performance win (n=61/59). The choice of cutoff for outliers feels a lot like cooking the data, but I've gone through this process 3 times for minor iterations of the code with the same conclusion each time. Reviewed-by: Brian Paul <[email protected]> Acked-by: Chad Versace <[email protected]> Acked-by: Kenneth Graunke <[email protected]> (v1)
* mesa: Import a copy of the open-addressing hash table code I wrote.Eric Anholt2012-11-1217-0/+1275
| | | | | | | | | | | | | Mesa's chaining hash table for object names is slow, and this should be much faster. I namespaced the functions under _mesa_*, to avoid visibility troubles that we may have had before with hash_table_* functions. v2: Move .c file to main/, const a few things, clean up loop conditions, add/extend some comments. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Chad Versace <[email protected]> Acked-by: Kenneth Graunke <[email protected]> (v1)
* automake: Remove libdricore clip.c workaround lib.Eric Anholt2012-11-121-16/+7
| | | | | | | | sparc/clip.c got moved to sparc/sparc-clip.c to avoid doing this workaround in the parent directory. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* automake,android: Build program/ into a helper lib (v2)Eric Anholt2012-11-1210-39/+166
| | | | | | | | | | While simplifying mesa/Makefile.am, the more important feature of this commit is allowing a file with the same name to appear in both main/ and program/. v2: [chadv] Add changes to Android makefiles. Reviewed-by: Kenneth Graunke <[email protected]> (v1) Signed-off-by: Chad Versace <[email protected]> (v2)
* android: Moves rules for libmesa_st_mesa to separate makefileChad Versace2012-11-122-49/+63
| | | | | | | | | | | The pair of files src/mesa/Android.mk and src/mesa/Android.gen.mk are too long and complex to be easily understood. This patch belongs to a series that decomposes them into several easily digestible makefiles. This patch move the rules for libmesa_st_mesa.a from Android.mk to Android.libmesa_st_mesa.mk. Signed-off-by: Chad Versace <[email protected]>
* android: Moves rules for libmesa_dricore to separate makefileChad Versace2012-11-122-29/+64
| | | | | | | | | | | The pair of files src/mesa/Android.mk and src/mesa/Android.gen.mk are too long and complex to be easily understood. This patch belongs to a series that decomposes them into several easily digestible makefiles. This patch move the rules for libmesa_dricore.a from Android.mk to Android.libmesa_dricore.mk. Signed-off-by: Chad Versace <[email protected]>
* android: Moves rules for mesa_gen_matypes to separate makefileChad Versace2012-11-122-17/+50
| | | | | | | | | | | The pair of files src/mesa/Android.mk and src/mesa/Android.gen.mk are too long and complex to be easily understood. This patch belongs to a series that decomposes them into several easily digestible makefiles. This patch move the rules for host executable mesa_gen_matypes from Android.mk to Android.mesa_gen_matypes.mk. Signed-off-by: Chad Versace <[email protected]>
* android: Moves rules for libmesa_glsl_utils to separate makefileChad Versace2012-11-122-32/+60
| | | | | | | | | | | The pair of files src/mesa/Android.mk and src/mesa/Android.gen.mk are too long and complex to be easily understood. This patch belongs to a series that decomposes them into several easily digestible makefiles. This patch move the rules for the host and target libmesa_glsl_utils.a from Android.mk to Android.libmesa_glsl_utils.mk. Signed-off-by: Chad Versace <[email protected]>
* automake: Merge *_CXX_FILES variables in the glsl build.Eric Anholt2012-11-121-1/+0
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* automake: Merge per-type *_FILES variables in intel drivers.Eric Anholt2012-11-125-43/+33
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* automake: Merge separated *_CXX_FILES variables to *_FILES in core mesa.Eric Anholt2012-11-124-27/+7
| | | | | | | | They were always used with the corresponding *_FILES variables now that automake handles rule generation. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* automake: Remove dead *_OBJECTS variables from the old build system.Eric Anholt2012-11-121-17/+0
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: fix computation of last_level in GenerateMipmapMarek Olšák2012-11-121-21/+7
| | | | | | | | | Array textures were broken. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: fix computation of last_level during texture creationMarek Olšák2012-11-121-4/+2
| | | | | | | | | Array textures were broken. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: fix guessing the base level sizeMarek Olšák2012-11-121-50/+44
| | | | | | | | | | | | It was pretty broken with array textures, where the array size (height or depth depending on the target) shouldn't be magnified. The guessing also doesn't fail with 1D and cube textures. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: fix error checking of TexStorage(levels) for array and rect texturesMarek Olšák2012-11-121-3/+1
| | | | | | | NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* mesa: use MaxNumlevels in _mesa_test_texobj_completenessMarek Olšák2012-11-121-11/+3
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Dave Airlie <[email protected]>