summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: rename GroupStackDepth to CurrentGroupEmil Velikov2015-12-031-16/+16
| | | | | | | | | The variable is used as the actual index, rather than the size of the group stack - rename it to reflect that. Suggested-by: Ilia Mirkin <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: do not enable KHR_debug for ES 1.0Emil Velikov2015-12-032-11/+11
| | | | | | | | | | | | The extension requires (cough implements) GetPointervKHR (alias of GetPointerv) which in itself is available for ES 1.1 enabled mesa. Anyone willing to fish around and implement it for ES 1.0 is more than welcome to revert this commit. Until then lets restrict things. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93048 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glapi: add GetPointervKHR to the ES dispatchEmil Velikov2015-12-031-0/+5
| | | | | | | | | | | | The KHR_debug extension implements this. Strictly speaking it could be used with ES 1.0, although as the original function is available on ES 1.1, I'm inclined to lift the KHR_debug requirement to ES 1.1. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93048 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa/version: Update gl_extensions::Version during version overrideNanley Chery2015-12-031-0/+1
| | | | | | | | | | | Commit a16ffb743ced9fde80b2485dfc2d86ae74e86f25, which introduced gl_extensions::Version, updates the field when the context version is computed and when entering/exiting meta. Update this field when the version is overridden as well. Cc: "11.1" <[email protected]> Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Marta Lofstedt <[email protected]>
* mesa: print enum names rather than hexadecimal values in error messagesBrian Paul2015-12-031-6/+6
| | | | Trivial.
* st/wgl: add new stw_ext_rendertexture.c fileBrian Paul2015-12-031-0/+252
| | | | | | This should have been included in the previous commit. Signed-off-by: Brian Paul <[email protected]>
* st/wgl: add support for WGL_ARB_render_textureBrian Paul2015-12-039-10/+118
| | | | | | | | | | | There are a few legacy OpenGL apps on Windows which need this extension. We basically use glCopyTex[Sub]Image to implement wglBindTexImageARB (see the implementation notes for details). v2: refactor code to use st_copy_framebuffer_to_texture() helper function. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/mesa: add new st_copy_framebuffer_to_texture() functionBrian Paul2015-12-033-0/+178
| | | | | | | | | | | | This helper is used by the WGL state tracker to implement the wglBindTexImageARB() function. This is basically a new "meta" function. However, we're not putting it in the src/mesa/drivers/common/ directory because that code is not linked with gallium-based drivers. Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* glsl: remove useless null checks and make match_explicit_outputs_to_inputs() ↵Juha-Pekka Heikkila2015-12-031-9/+1
| | | | | | | | | | | static match_explicit_outputs_to_inputs() cannot get null inputs and if it ever did triggering first null check would later in the function cause segfault. Signed-off-by: Juha-Pekka Heikkila <[email protected]> CC: [email protected] Reviewed-by: Timothy Arceri <[email protected]>
* i965: use _Shader to get fragment program when updating surface stateTapani Pälli2015-12-031-2/+2
| | | | | | | | | | | | | Atomic counters and Images were using ctx::Shader that does not take in to account program pipeline changes, ctx::_Shader must be used for SSO to work. Commit c0347705 already changed ubo's to use this. Fixes failures seen with following Piglit test: arb_separate_shader_object-atomic-counter Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Cc: "11.0 11.1" <[email protected]>
* nv50/ir: fix moves to/from flagsIlia Mirkin2015-12-022-2/+7
| | | | | | | | Noticed this when looking at a trace that caused flags to spill to/from registers. The flags source/destination wasn't encoded correctly according to both envydis and nvdisasm. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: don't forget to mark flagsDef on cvt in txb loweringIlia Mirkin2015-12-021-1/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0 11.1" <[email protected]>
* nv50/ir: fix instruction permutation logicIlia Mirkin2015-12-021-1/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0 11.1" <[email protected]>
* nv50/ir: the mad source might not have a defining instructionIlia Mirkin2015-12-021-1/+1
| | | | | | | For example if it's $r63 (aka 0), there won't be a definition. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0 11.1" <[email protected]>
* nv50/ir: make sure entire graph is reachableIlia Mirkin2015-12-021-0/+1
| | | | | | | | The algorithm expects the entire CFG to be reachable, so make sure that we hit every node. Otherwise we will end up with uninitialized data, memory corruption, etc. Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: deal with loops with no breaksIlia Mirkin2015-12-021-0/+6
| | | | | | | | | | | For example if there are only returns, the break bb will not end up part of the CFG. However there will have been a prebreak already emitted for it, and when hitting the RET that comes after, we will try to insert the current (i.e. break) BB into the graph even though it will be unreachable. This makes the SSA code sad. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0 11.1" <[email protected]>
* nvc0/ir: fold postfactor into immediateIlia Mirkin2015-12-021-0/+6
| | | | | | | | SM20-SM50 can't emit a post-factor in the presence of a long immediate. Make sure to fold it in. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0 11.1" <[email protected]>
* nv50/ir: allow immediate 0 to be loaded anywhereIlia Mirkin2015-12-021-0/+6
| | | | | | | There's a post-RA fixup to replace 0's with $r63 (or $r127 if too many regs are used), so just as nvc0, let an immediate 0 be loaded anywhere. Signed-off-by: Ilia Mirkin <[email protected]>
* i965: Add INTEL_DEBUG=perf information for GS recompiles.Kenneth Graunke2015-12-021-0/+58
| | | | | | | Surprisingly, this didn't exist at all. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: De-duplicate key_debug() function.Kenneth Graunke2015-12-023-21/+10
| | | | | | | | | | | | This appeared in brw_vs.c and brw_wm.c, should have appeared in brw_gs.c, and was soon going to have to be in brw_tcs.c and brw_tes.c as well. So, instead, move it to a central location (which has to know about both struct brw_context and perf_debug()). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* nv50/ir/gk110: add memory barriers support for GK110Samuel Pitoiset2015-12-021-0/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: do not call textureMask() for surface opsSamuel Pitoiset2015-12-021-1/+2
| | | | | | | | | | | That texture mask thing doesn't seem to be needed for surface ops, so just as nve4+, let do that only for texture ops. This fixes a segfault with 'test_surface_st' from gallium/tests/trivial/compute.c on Fermi because this test uses sustp. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* appveyor: Initial integration.Jose Fonseca2015-12-021-0/+62
| | | | | | | | | | | | | | AppVeyor doesn't require an appveyor.yml in the repos (in fact it has some limitations as noted in comments below), but doing so has two great advantages over the web UI: - appveyor.yml can be revisioned together with the code, so instructions should always be in synch with the code - appveyor.yml can be reused for people's private repositories (be on fdo or GitHub, etc.) Acked-by: Roland Scheidegger <[email protected]>
* util/blitter: Fix "SO C90 forbids mixed declarations and code".Jose Fonseca2015-12-021-2/+4
| | | | Trivial.
* mesa: print enum string in compressed_subtexture_error_check() error msgBrian Paul2015-12-021-2/+2
| | | | Trivial.
* gallium/util: Fix util_blitter_clear_depth_stencil() for num_layers>1Edward O'Callaghan2015-12-021-4/+12
| | | | | | | | | Previously util_blitter_clear_depth_stencil() could not clear more than the first layer. We need to generalise this as we did for util_blitter_clear_render_target(). Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/util: Fix util_blitter_clear_render_target() for num_layers>1Edward O'Callaghan2015-12-021-3/+12
| | | | | | | | | Previously util_blitter_clear_render_target() could not clear more than the first layer. We need to generalise this so that ARB_clear_texture can pass the 3d piglit test. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: fix VIEWPORT_INDEX_PROVOKING_VERTEX and LAYER_PROVOKING_VERTEX queriesRoland Scheidegger2015-12-023-2/+8
| | | | | | | | | | | | | These are implementation-dependent queries, but so far we just returned the value of whatever the current provoking vertex convention was set to, which was clearly wrong. Just make this a variable in the context constants like for other things which are implementation dependent (I assume all drivers will want to set this to the same value for both queries), and set it to GL_UNDEFINED_VERTEX which is correct for everybody (and drivers can override it). Reviewed-by: Brian Paul <[email protected]> CC: <[email protected]>
* Remove Sun CC specific code.Jose Fonseca2015-12-0210-55/+11
| | | | | Reviewed-by: Matt Turner <[email protected]> Acked-by: Alan Coopersmith <[email protected]>
* configure.ac: Refuse to build with Sun C compiler.Jose Fonseca2015-12-021-0/+7
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=93189 Reviewed-by: Matt Turner <[email protected]> Tested-by: Vinson Lee <[email protected]> Acked-by: Alan Coopersmith <[email protected]>
* travis: Add a test build with scons.Eric Anholt2015-12-011-6/+15
| | | | | | | | | Since I just broke the scons build, I figured I'd make Travis test that I don't break it again in the future. The script runs the builds in parallel across VMs, so it still takes just 5 minutes to turn around results. Reviewed-by: Jose Fonseca <[email protected]>
* i965: Increase BRW_MAX_UBO to 14.Kenneth Graunke2015-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | The NVIDIA binary driver and Intel's closed source driver both expose 14 here, rather than the GL minimum of 12. Let's follow suit. Without this, Shadow of Mordor fails to render correctly and triggers OpenGL errors: Mesa: User error: GL_INVALID_VALUE in glBindBufferBase(index=68) Mesa: User error: GL_INVALID_VALUE in glUniformBlockBinding(block binding 68 >= 60) There are 5 stages (VS, TCS, TES, GS, FS), and 12 * 5 = 60 is too small. 14 * 5 = 70 will work just fine. Tapani believes this will also help Alien Isolation. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Acked-by: Tapani Pälli <[email protected]> Acked-by: Matt Turner <[email protected]>
* i965: Do dead-code elimination in a single pass.Matt Turner2015-12-013-29/+16
| | | | | | | | | | | | The first pass marked dead instructions as opcode = NOP, and a second pass deleted those instructions so that the live ranges used in the first pass wouldn't change. But since we're walking the instructions in reverse order, we can just do everything in one pass. The only thing we have to do is walk the blocks in reverse as well. Reviewed-by: Francisco Jerez <[email protected]>
* glsl: Rename safe_reverse -> reverse_safe.Matt Turner2015-12-013-7/+7
| | | | | | To match existing foreach_in_list_reverse_safe. Reviewed-by: Francisco Jerez <[email protected]>
* i965: Don't mark dead instructions' sources live.Matt Turner2015-12-012-0/+8
| | | | | | | Removes dead code from glsl-mat-from-int-ctor-03.shader_test. Reported-by: Juan A. Suarez Romero <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* r600: set mega fetch count to 16 for gs copy shaderDave Airlie2015-12-021-0/+1
| | | | | | Seems like MFC should be set for this shader. Signed-off-by: Dave Airlie <[email protected]>
* r600: increment ring index after emit vertex not before.Dave Airlie2015-12-021-18/+24
| | | | | | | The docs say we should send the emit after the ring writes, so lets do that and not have an ALU in between. Signed-off-by: Dave Airlie <[email protected]>
* r600: add alu + cf nop to copy shader on r600Dave Airlie2015-12-021-0/+10
| | | | | | | SB suggests we do this for r600, so lets do it, for the copy shader. Signed-off-by: Dave Airlie <[email protected]>
* r600: SMX returns CONTEXT_DONE early workaroundDave Airlie2015-12-022-1/+13
| | | | | | | | | streamout, gs rings bug on certain r600s, requires a wait idle before each surface sync. Reviewed-by: Marek Olšák <[email protected]> Cc: "10.6 11.0 11.1" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: do SQ flush ES ring rolling workaroundDave Airlie2015-12-023-1/+8
| | | | | | | | | Need to insert a SQ_NON_EVENT when ever geometry shaders are enabled. Reviewed-by: Marek Olšák <[email protected]> Cc: "10.6 11.0 11.1" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nv50,nvc0: allow to create resources other than buffersSamuel Pitoiset2015-12-015-4/+9
| | | | | | | | | | | | For the compute support, we might stick buffers as surfaces. This fixes an assertion when executing src/gallium/tests/trivial/compute. To avoid using these "restricted" surfaces as render targets, these assertions have been moved. Note that it's already handled for the framebuffer thing on nvc0. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* glapi: work-around MSVC 65K string length limitation for enums.cBrian Paul2015-12-011-3/+10
| | | | | | | | | | | String literals cannot exceed 65535 characters for MSVC. Instead of emiting a string, emit an array of characters. v2: fix indentation and add comment in the gl_enums.py file about this ugliness. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi: Fix enums.c build with other build systems.Eric Anholt2015-12-012-2/+2
| | | | | Tested with scons (by both myself and Mark Janes), Android is just copy and paste.
* travis: Initial import of travis instructions.Eric Anholt2015-12-011-0/+92
| | | | | | | | | | | | This just builds/installs our dependencies, and runs "make check". I'm interested in integrating more tests into it, but this seems like a pretty easy first start. If your personal branches of Mesa are on github, you can enable it on your account and the repository (see https://docs.travis-ci.com/user/for-beginners), then any pushes you do will get their HEAD commit tested, and any pull requests to your tree will get their merge commits tested.
* mesa: Drop the blacklisting of new GL enums.Eric Anholt2015-12-012-269/+2
| | | | | | | | | | | | | Now when people need new extensions, they can skip the entire enum-definition process, and we can stop reviewing new extension XML for its enum content. This also brings in a new enum that I wanted to use in enum_strings.cpp for testing the code generator. v2: Drop comment about disabled GL_1PASS_EXT test. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Use a 32-bit offset for the enums.c string offset table.Eric Anholt2015-12-011-3/+1
| | | | | | | With GLES 3.1, GL 4.5, and many new vendor extensions about to get their enums added, we jump up to 85k of table. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Prefer newer names to older ones among names present in core.Eric Anholt2015-12-011-17/+8
| | | | | | | | | | | | Sometimes GL likes to rename an old enum when it grows a more general purpose, and we should prefer the new name. Changes from this: GL_POINT/LINE_SIZE_* (1.1) -> GL_SMOOTH_POINT/LINE_SIZE_* (1.2) GL_FOG_COORDINATE_* (1.4) -> GL_FOG_COORD_* (1.5) GL_SOURCE[012]_RGB/ALPHA (1.3) -> GL_SRC0_RGB (1.5) GL_COPY_READ/WRITE_BUFFER (3.1) -> GL_COPY_READ_BUFFER_BINDING (4.2) Reviewed-by: Ian Romanick <[email protected]>
* mesa: Drop bitfield "enums" from the enum-to-string table.Eric Anholt2015-12-012-21/+23
| | | | | | | | | | | | | | Asking the table for bitfield names doesn't make any sense. For 0x10, do you want GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV or GL_COLOR_BUFFER_BIT4_QCOM or GL_POLYGON_STIPPLE_BIT or GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV? Giving a useful answer would depend on a whole lot of context. This also fixes a bad enum table entry, where we chose GL_HINT_BIT instead of GL_ABGR_EXT for 0x8000, so we can now fix its entry in the enum_strings test. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Switch to using the Khronos registry for generating enums.Eric Anholt2015-12-012-39/+370
| | | | | | | | | | | | | | | | | | | | | | | | I've used a bunch of python code to cut out new enums so that the two generated files can be diffed. I'll remove all that hardcoding in the following commits. All remaining differences between the generated code: - GL_TEXTURE_BUFFER_FORMAT didn't appear in GL3 when TBOs got merged to core, so it now gets an _ARB suffix instead. - Blacklisting can't keep EXT_sso's GL_ACTIVE_PROGRAM_EXT from becoming GL_ACTIVE_PROGRAM -- in our hash table, GL_ACTIVE_PROGRAM_EXT points at the GLES2 enum's value (aka GL_CURRENT_PROGRAM). By not blacklisting the core name, we get both enums translated. - GL_DRAW_FRAMEBUFFER_BINDING and GL_FRAMEBUFFER_BINDING both appeared in GL3 as synonyms, and the new code happens to choose GL_FRAMEBUFFER_BINDING instead. - GL_TEXTURE_COMPONENTS and GL_TEXTURE_INTERNAL_FORMAT both appear in 1.1, and the new code chooses GL_TEXTURE_INTERNAL_FORMAT instead (which seems better, to me) Reviewed-by: Ian Romanick <[email protected]>
* mesa: Remove the python mode bits from gl_enums.py.Eric Anholt2015-12-011-1/+0
| | | | | | | emacs whines at me every time I open the file about these unsafe variables, and the file was reformatted from 8 space to 4 space long ago. Reviewed-by: Ian Romanick <[email protected]>