summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ilo: avoid brw_wm_barycentric_interp_mode in compilerChia-I Wu2014-04-141-17/+46
| | | | In preparation for genhw.
* ilo: add TOY_OPCODE_DOChia-I Wu2014-04-146-7/+10
| | | | | We used to give BRW_OPCODE_DO a special meaning, while we should have used TOY_OPCODE_DO.
* gtest: Update to 1.7.0.Vinson Lee2014-04-1431-1508/+2509
| | | | | | | | | This patch fixes gtest build errors on Mac OS X 10.9. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73106 Signed-off-by: Vinson Lee <[email protected]> Tested-by: Ian Romanick <[email protected]> Acked-by: Ian Romanick <[email protected]>
* mesa: Consider gl_VertexID and gl_InstanceID active attribsChris Forbes2014-04-131-0/+9
| | | | | | | Fixes piglit's spec/gl-3.2/get-active-attrib-returns-all-inputs. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Extract is_active_attrib() in shaderapiChris Forbes2014-04-131-8/+19
| | | | | | | | | | The rules are about to get a bit more complex to account for gl_InstanceID and gl_VertexID, which are system values. Extracting this first avoids introducing duplication. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Fix typo in interface block commentChris Forbes2014-04-131-1/+1
| | | | Signed-off-by: Chris Forbes <[email protected]>
* egl-static: fix build after recent radeon winsys changesSimone Scanzoni2014-04-131-0/+4
| | | | Signed-off-by: Marek Olšák <[email protected]>
* mesa: Fix typo in error messageChris Forbes2014-04-131-1/+1
| | | | Signed-off-by: Chris Forbes <[email protected]>
* i965: glClearBuffer() should only clear a single buffer.Iago Toral Quiroga2014-04-133-3/+7
| | | | | | | | | | | | | | | | glClearBuffer() is currently clearing all active draw color buffers (all buffers that have not been set to GL_NONE when calling glDrawBuffers) instead of only clearing the one it receives as parameter. Altough brw_clear() receives a bit mask indicating the color buffers that should be cleared, this mask is ignored when calling brw_blorp_clear_color(). This was breaking the 'fbo-drawbuffers-none glClearBuffer' piglit test. The patch provides the bit mask to brw_blorp_clear_color() so it can limit clearing to the color buffers present in the mask. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76832 Reviewed-by: Eric Anholt <[email protected]>
* i965: Add comment to explain the weird-looking shadow compares.Chris Forbes2014-04-131-5/+16
| | | | | | | | | | | This always looks crazy when I stumble across it, until I remember what the hardware is doing. Describing it ought to short-circuit that process next time :) V2: Fix indents to 6 spaces, not 7. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Ignore loop-too-large heuristic if there's bad variable indexing.Kenneth Graunke2014-04-111-3/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many shaders use a pattern such as: for (int i = 0; i < NUM_LIGHTS; i++) { ...access a uniform array, or shader input/output array... } where NUM_LIGHTS is a small constant (such as 2, 4, or 8). The expectation is that the compiler will unroll those loops, turning the array access into constant indexing, which is more efficient, and which may enable array splitting and other optimizations. In many cases, our heuristic fails - either there's another tiny nested loop inside, or the estimated number of instructions is just barely beyond the threshold. So, we fail to unroll the loop, leaving the variable indexing in place. Drivers which don't support the particular flavor of variable indexing will call lower_variable_index_to_cond_assign(), which generates piles and piles of immensely inefficient code. We'd like to avoid generating that. This patch detects unsupported forms of variable-indexing in loops, where the array index is a loop induction variable. In that case, it bypasses the loop-too-large heuristic and forces unrolling. Improves performance in various microbenchmarks: Gl32PSBump8 by 47%, Gl32ShMapVsm by 80%, and Gl32ShMapPcf by 27%. No changes in shader-db. v2: Check ir->array for being an array or matrix, rather than the ir_dereference_array itself. v3: Fix and expand statistics in commit message. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Rename loop_unroll_count::fail to "nested_loop."Kenneth Graunke2014-04-111-4/+5
| | | | | | | | | | | The "fail" flag is set if loop_unroll_count encounters a nested loop; calling the flag "nested_loop" is a bit clearer. The original reasoning was that count is inaccurate (too small) if there are nested loops, as we don't do any sort of analysis on the inner loop. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Pass gl_shader_compiler_optimizations to unroll_loops().Kenneth Graunke2014-04-113-9/+16
| | | | | | | Loop unrolling will need to know a few more options in the future. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Drop do_common_optimization's max_unroll_iterations parameter.Kenneth Graunke2014-04-118-16/+8
| | | | | | | | | | | | Now that we pass in gl_shader_compiler_options, it makes sense to just use options->MaxUnrollIterations, rather than passing a separate parameter. Half of the invocations already passed options->MaxUnrollIterations, while the other half passed in a hardcoded value of 32. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Use EmitNoIndirect flags in lower_variable_index_to_cond_assign.Kenneth Graunke2014-04-111-8/+7
| | | | | | | This will prevent the two from getting out of sync again. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Correct EmitNoIndirect shader compiler option flags.Kenneth Graunke2014-04-111-3/+2
| | | | | | | | These were out of sync with the flags used to control lower_variable_index_to_cond_assign in brw_shader.cpp. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Reset reg_from when we can't coalesce.Matt Turner2014-04-111-0/+1
| | | | | | | | | | | | Not setting this would prevented coalescing after a failed attempt if the sources for both MOVs were the same. total instructions in shared programs: 1654531 -> 1650224 (-0.26%) instructions in affected programs: 423167 -> 418860 (-1.02%) GAINED: 2 LOST: 0 Reviewed-by: Eric Anholt <[email protected]>
* i965: Fill in a bunch of gen7/hsw data cache-related disasm.Eric Anholt2014-04-111-7/+103
| | | | | | | | This gets us disasm of atomic ops. v2: Fix fallthrough on pre-gen7. (bug caught by Ilia Mirkin). Reviewed-by: Matt Turner <[email protected]>
* i965: Stop setting up a 1:1 "attrib" member in our vertex inputs.Eric Anholt2014-04-114-5/+2
| | | | | | | | | It's just the array index, so we can just go look at the array and see which element we are. No significant performance difference (n=140) Reviewed-by: Ian Romanick <[email protected]>
* i965: Skip a bunch of IB BO refcount twiddling.Eric Anholt2014-04-111-13/+13
| | | | | | Improves cairo performance on glamor by 1.64828% +/- 1.04742% (n=65). Reviewed-by: Ian Romanick <[email protected]>
* i965/gen7: Skip repeated NULL depth/stencil state emits.Eric Anholt2014-04-114-0/+20
| | | | | | Improves cairo performance on glamor by 2.87752% +/- 0.966977 (n=57). Reviewed-by: Ian Romanick <[email protected]>
* docs: Fix ubo indexing descriptionChris Forbes2014-04-121-1/+1
| | | | | | | Ian points out that this being unrestricted was an oversight in the spec, and is corrected in GLSL4.40. Signed-off-by: Chris Forbes <[email protected]>
* draw: remove unused 'start' variable in draw_stats_clipper_primitives()Brian Paul2014-04-111-5/+2
| | | | | | It was computed, but never actually used. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Try vectorizing when seeing a repeated assignment to a channel.Kenneth Graunke2014-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | When considering assignment expressions like: v.x += u.x; v.x += u.x; the vectorizer would incorrectly keep going, attempting to find more instructions to vectorize. It would overwrite the saved assignment to point at the second one, and increment channels a second time, resulting in try_vectorize thinking the expression was a vec2 instead of a float. Instead, if we see a repeated assignment to a channel, just try to vectorize everything we've found so far. This clears the saved state so it will start over. Fixes Piglit's repeated-channel-assignments.vert. Cc: "10.1" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Propagate explicit binding information from the AST all the way to the ↵Ian Romanick2014-04-114-2/+30
| | | | | | | | | | | | | | | | | linker Information about the binding was not being properly communicated from the front-end compiler to the linker. As a result, the linker never knew that any UBOs had explicit bindings! Fixes the piglit test arb_shading_language_420pack-binding-layout. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: [email protected] [v0] Cc: "10.1" <[email protected]> Cc: [email protected]
* linker: Set binding for all elements of UBO arrayIan Romanick2014-04-111-2/+34
| | | | | | | | | | | | | | | | | | Previously, a UBO like layout(binding=2) uniform U { ... } my_constants[4]; wouldn't get any bindings set. The code would try to set the binding of U, but that would fail. It should instead set the bindings for U[0], U[1], ... Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.1" <[email protected]> Cc: [email protected]
* linker: Set block bindings based on UniformBlocks rather than UniformStorageIan Romanick2014-04-111-11/+21
| | | | | | | | | | | | | | | | | | | For blocks, gl_shader_program::UniformStorage isn't very useful. The names stored there are the names of the elements of the block, so finding blocks with an instance name is hard. There is also only one entry in ::UniformStorage for each element of a block array, and that is a deal breaker. Using ::UniformBlocks is what _mesa_GetUniformBlockIndex does. I contemplated sharing code between set_block_binding and _mesa_GetUniformBlockIndex, but building the stand-alone compiler and the unit tests make this hard. I plan to return to this effort shortly. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.1" <[email protected]> Cc: [email protected]
* linker: Clean up "unused parameter" warningsIan Romanick2014-04-111-8/+4
| | | | | | | | | | | | | ../../src/glsl/link_uniform_initializers.cpp:87:1: warning: unused parameter 'mem_ctx' [-Wunused-parameter] ../../src/glsl/link_uniform_initializers.cpp:87:1: warning: unused parameter 'type' [-Wunused-parameter] ../../src/glsl/link_uniform_initializers.cpp:127:1: warning: unused parameter 'mem_ctx' [-Wunused-parameter] ../../src/glsl/link_uniform_initializers.cpp:127:1: warning: unused parameter 'type' [-Wunused-parameter] Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.1" <[email protected]> Cc: [email protected]
* linker: Fold set_uniform_binding into call siteIan Romanick2014-04-111-21/+12
| | | | | | | | | | | | | | | | In the next patch, we'll see that using gl_shader_program::UniformStorage is not correct for uniform blocks. That means we can't use ::UniformStorage to select between the sampler path and the block path. Instead we want to just use the type of the variable. That's never passed to set_uniform_binding, and it's easier to just remove the function (especially for later patches in the series) than to add another parameter. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.1" <[email protected]> Cc: [email protected]
* linker: Various trivial clean-ups in set_sampler_bindingIan Romanick2014-04-111-18/+18
| | | | | | | | | | | | | | | - Remove the spurious block left from the previous commit and re-indent. - Constify elements. - Make the spec reference in the code look like other spec references in the compiler. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.1" <[email protected]> Cc: [email protected]
* linker: Split set_uniform_binding into separate functions for blocks and ↵Ian Romanick2014-04-111-3/+39
| | | | | | | | | | | | | | | | | | samplers The two code paths are quite different, and there are some problems in the handling of uniform blocks. Future changes will cause these paths to diverge further. Ultimately, selecting between the two functions will happen at the set_uniform_binding call site, and set_uniform_binding will be deleted. NOTE: This patch just moves code around. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323 Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.1" <[email protected]> Cc: [email protected]
* softpipe: fix shadow samplingHeinrich Janzing2014-04-111-68/+51
| | | | | | | | And remove nonsensical approximation of linear interpolation behavior for shadow samplers. Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]>
* softpipe: add PIPE_CAP_MIN/MAX_TEXTURE_GATHER_OFFSET query casesBrian Paul2014-04-111-0/+3
| | | | | | To silence compiler warnings. Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: use _mesa_get_srgb_format_linear() in sRGB texstore functionsBrian Paul2014-04-111-25/+5
| | | | | | | Instead of switch statements. Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* swrast: use macros to initialize texfetch_funcs[] tableBrian Paul2014-04-111-937/+172
| | | | Reviewed-by: Ian Romanick <[email protected]>
* swrast: fix more fetch_texel function namesBrian Paul2014-04-112-37/+37
| | | | | | | | | | These were missed/typo'd in the previous patch series: s/R8G8B8A/R8G8B8A8/ s/rgba_16/RGBA_UNORM16/ s/rgba_uint/RGBA_UINT/ s/rgba_int/RGBA_SINT/ Reviewed-by: Ian Romanick <[email protected]>
* egl-static: Fix missing radeon_surface.h includes.José Fonseca2014-04-111-0/+16
| | | | | | | | | | Fixes fatal error: radeon_surface.h: No such file or directory when libdrm is not present, or non-Linux OSes. Trivial.
* gallium/radeon: fix missing winsys include in pipe-loader.Knut Andre Tidemann2014-04-114-1/+4
| | | | | | | | | | | The commit 3b0b44f7def0acb4f7a7aef086c0bece321418a6 introduced a build error: error: dereferencing pointer to incomplete type This patch fixes this issue in all the affected files. Reviewed-by: Tom Stellard <[email protected]>
* st/omx/enc: separate input buffer private and task structureChristian König2014-04-112-59/+127
| | | | | | | Keep tasks as linked list, this way we can associate more than one encoding task with each buffer. Signed-off-by: Christian König <[email protected]>
* radeon/vce: implement B-frame supportChristian König2014-04-112-22/+53
| | | | | Signed-off-by: Slava Grigorev <[email protected]> Signed-off-by: Christian König <[email protected]>
* radeon/vce: add proper CPB backtrackChristian König2014-04-113-23/+123
| | | | | | Remember what frames we encoded at which position. Signed-off-by: Christian König <[email protected]>
* vl: add interface for H264 B-frame encodingChristian König2014-04-113-6/+16
| | | | Signed-off-by: Christian König <[email protected]>
* radeon/vce: remove RVCE_NUM_CPB_EXTRA_FRAMESChristian König2014-04-113-4/+2
| | | | | | Doesn't seems to be needed any more. Signed-off-by: Christian König <[email protected]>
* docs/relnotes: Fix consistency, add i965 to ARB_buffer_storage.Chris Forbes2014-04-111-2/+2
| | | | Signed-off-by: Chris Forbes <[email protected]>
* i965: Fix missing _NEW_SCISSOR in Broadwell SF_CLIP_VIEWPORT state.Kenneth Graunke2014-04-101-2/+2
| | | | | | | | | | | | | The _Xmin/_Xmax/_Ymin/_Ymax values need to be guarded by _NEW_SCISSOR. Fixes Piglit's scissor-many, and rendering in GNOME Shell. Hopefully fixes similar issues with Unity and ChromeOS. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75879 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: James Ausmus <[email protected]> Tested-by: Timo Aaltonen <[email protected]>
* mesa/st: set min/max texture gather offset to driver-reported valueIlia Mirkin2014-04-101-0/+3
| | | | | | | | It was always getting set to -8/7 unconditionally. Use the driver-reported value instead. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add a way to query min/max texture gather offsetsIlia Mirkin2014-04-1013-0/+30
| | | | | | | | Defaults to providing the same offsets as MIN/MAX_TEXEL_OFFSET. For nvc0, the offset can be -32/31. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* configure.ac: require libdrm_radeon 2.4.53Marek Olšák2014-04-101-1/+1
| | | | We need latest radeon_drm.h.
* winsys/radeon: fix a race condition in initialization of radeon_winsys::screenMarek Olšák2014-04-109-114/+39
| | | | | | | | Create the screen in the winsys while the mutex is locked. This also results in a nice code cleanup! Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]>
* winsys/radeon: fix a race condition between winsys_create and winsys_destroyMarek Olšák2014-04-106-24/+33
| | | | | | | | | This also hides the reference count from drivers. v2: update the reference count while the mutex is locked in winsys_create Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]>