summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gallium/radeon: remove DBG_TEXMIPMarek Olšák2015-12-033-4/+2
| | | | | | we don't need 2 flags for dumping texture info Reviewed-by: Michel Dänzer <[email protected]>
* gallium/aux/util: Trivial, we already have format use itEdward O'Callaghan2015-12-031-1/+1
| | | | | | | No need to dereference again, fixup for clarity. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* automake: Fix typo in MSVC2008 compat flags.Jose Fonseca2015-12-031-1/+1
| | | | | | | | | It should be MSVC2008_COMPAT_CFLAGS and not MSVC2008_COMPAT_CXXFLAGS. This is why the recent util_blitter breakage went unnoticed on autotools builds. Trivial.
* ttn: Whitelist from -Werror=declaration-after-statement.Jose Fonseca2015-12-031-0/+4
| | | | | | | | | nir is the exception among gallium/auxiliary -- we don't need to compile it with MSVC2008 yet. And this enables us to use -Werror=declaration-after-statement in the next commit as we should, without complicated fixes to tgsi_to_nir module. Trvial. Tested with GCC and Clang.
* mesa: rework the meaning of gl_debug_message::lengthEmil Velikov2015-12-031-16/+24
| | | | | | | | | | | | | | | | | | | Currently it stores strlen(buf) whenever the user originally provided a negative value for length. Although I've not seen any explicit text in the spec, CTS requires that the very same length (be that negative value or not) is returned back on Pop. So let's push down the length < 0 checks, tweak the meaning of gl_debug_message::length and fix GetDebugMessageLog to add and count the null terminators, as required by the spec. v2: return correct total length in GetDebugMessageLog v3: rebase (drop _mesa_shader_debug hunk). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: errors: validate the length of null terminated stringEmil Velikov2015-12-031-3/+17
| | | | | | | | | We're about to rework the meaning of gl_debug_message::length to only store the user provided data. Thus we should add an explicit validation for null terminated strings. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: accept TYPE_PUSH/POP_GROUP with glDebugMessageInsertEmil Velikov2015-12-031-1/+1
| | | | | | | | | | | | | | | | | | These new (relative to ARB_debug_output) tokens, have been explicitly separated from the existing ones in the spec text. With the reference to glDebugMessageInsert was dropped. At the same time, further down the spec says: "The value of <type> must be one of the values from Table 5.4" ... and these two are listed in Table 5.4. The GL 4.3 and GLES 3.2 do not give any hints on the former 'definition', plus CTS requires that the tokens are valid values for glDebugMessageInsert. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add SEVERITY_NOTIFICATION to default stateEmil Velikov2015-12-031-2/+3
| | | | | | | | | | | | As per the spec quote: "All messages are initially enabled unless their assigned severity is DEBUG_SEVERITY_LOW" We already had MEDIUM and HIGH set, let's toggle NOTIFICATION as well. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: return the correct value for GroupStackDepthEmil Velikov2015-12-031-1/+1
| | | | | | | | We already have one group (the default) as specified in the spec. So lets return its size, rather than the index of the current group. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* 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]>
* 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-029-49/+11
| | | | | Reviewed-by: Matt Turner <[email protected]> Acked-by: Alan Coopersmith <[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.
* 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]>