summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: fix VGT_PRIMITIVE_TYPE emit for CIKAlex Deucher2013-06-281-1/+4
| | | | Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: register updates for CIKAlex Deucher2013-06-281-65/+931
| | | | Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: initial PM4 changes for CIKAlex Deucher2013-06-282-8/+15
| | | | | | note which packets are removed and add new ones. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: initial support for CIK chipsAlex Deucher2013-06-283-1/+22
| | | | | | | Add the infrastructure to differentiate them. Just treat them like SI for now. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: rename SI chip class from TAHITI to SIAlex Deucher2013-06-283-4/+4
| | | | | | Covers the entire family. Signed-off-by: Alex Deucher <[email protected]>
* r600g: Fix buildTom Stellard2013-06-281-2/+2
| | | | | Broken since 2840bec56f79347b95dec5458b20d4a46d1aa445 when opencl is disabled.
* mesa: Return ZeroVec/dummyReg instead of NULL pointerAnuj Phogat2013-06-281-4/+2
| | | | | | | | | | | | Assertions are not sufficient to check for null pointers as they don't show up in release builds. So, return ZeroVec/dummyReg instead of NULL pointer in get_{src,dst}_register_pointer(). This should calm down the warnings from static analysis tool. Note: This is a candidate for the 9.1 branch. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix build with older gcc since update of glext.hTom Stellard2013-06-283-10/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* r600g/compute: Accept LDS size from the LLVM backendTom Stellard2013-06-285-20/+44
| | | | | | And allocate the correct amount before dispatching the kernel. Tested-by: Aaron Watry <[email protected]>
* r600g/compute: Move compute_shader_create() function into evergreen_compute.cTom Stellard2013-06-283-37/+23
| | | | Tested-by: Aaron Watry <[email protected]>
* svga: pass svga_compile_key by reference instead of valueBrian Paul2013-06-281-7/+7
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* svga: use switch statement in svga_shader_type()Brian Paul2013-06-281-5/+10
| | | | | | | Safer in case the PIPE_SHADER_x tokens get renumbered (as Marek wanted to do). Reviewed-by: Jose Fonseca <[email protected]>
* ilo: clean up states that use ilo_view_surfaceChia-I Wu2013-06-281-13/+10
| | | | Use variables that are easier to remember what they are.
* ilo: remove ilo_cbuf_state::countChia-I Wu2013-06-284-17/+12
| | | | We can derive it from enabled_mask.
* ilo: clean up ilo_set_constant_buffer()Chia-I Wu2013-06-281-29/+44
| | | | Add loops that will be optimized away.
* ilo: clean up states that take a start_slotChia-I Wu2013-06-281-73/+99
| | | | They are similar, so clean them up to make them look similar.
* glsl: Initialize member variable is_ubo_var in constructor.Vinson Lee2013-06-271-1/+1
| | | | | | | Fixes "Uninitialized scalar field" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* ilo: use shorter names for dirty flagsChia-I Wu2013-06-287-141/+138
| | | | | The new names match those of ilo_context's members respectively, and are shorter.
* ilo: track if primitive restart has changedChia-I Wu2013-06-283-1/+8
| | | | Re-emit 3DSTATE_INDEX_BUFFER to enable/disable primitive restart.
* ilo: avoid potential dangling pointer dereferenceChia-I Wu2013-06-281-0/+3
| | | | Set pipe_draw_info to NULL after draw_vbo().
* mesa: Remove GL_EXT_clip_volume_hintIan Romanick2013-06-275-16/+2
| | | | | | | | | As far as I can tell, no driver has enabled this extension since c6499a7 back in 2007. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965,i915: Return early if miptree allocation failsChad Versace2013-06-272-0/+4
| | | | | | | | | | | | If allocation fails in intel_miptree_create_layout(), don't proceed to dereference the miptree. Return an early NULL. Fixes static analysis error reported by Klocwork. Note: This is a candidate for the 9.1 branch. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* llvmpipe: handle offset_clampRoland Scheidegger2013-06-273-2/+24
| | | | | | | | | | | | | | | This was just ignored (unless for some reason like unfilled polys draw was handling this). I'm not convinced of that code, putting the float for the clamp in the key isn't really a good idea. Then again the other floats for depth bias are already in there too anyway (should probably have a jit_context for the setup function), so this is just a quick fix. Also, the "minimum resolvable depth difference" used isn't really right as it should be calculated according to the z values of the current primitive and not be a constant (of course, this only makes a difference for float depth buffers), at least for d3d10, so depth biasing is still not quite right. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: remove never reached code for timestamp queries.Roland Scheidegger2013-06-271-2/+0
| | | | | timestamp queries are always binned in an active scene, therefore always have a result.
* llvmpipe: fix a bug in opaque optimizationRoland Scheidegger2013-06-273-14/+20
| | | | | | | | | If there are queries active the opaque optimization reseting the bin needs to be disabled. (Not really tested since the bug was discovered by code inspection not an actual test failure.) Reviewed-by: Jose Fonseca <[email protected]>
* radeonsi/compute: Fix memory leak in radeonsi_launch_grid.Vinson Lee2013-06-271-0/+1
| | | | | | Fixes "Resource leak" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]>
* clover: Fix build with LLVM 3.4Tom Stellard2013-06-271-6/+6
| | | | Reported on IRC by lordheavy
* docs: updated instructions for Mesa on WindowsBill York2013-06-271-1/+18
| | | | Signed-off-by: Brian Paul <[email protected]>
* postprocess: handle partial intialization failures.Matthew McClure2013-06-277-95/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes segfaults observed when enabling the post processing features. When the format is not supported, or a texture cannot be created, the code must gracefully handle failure and report the error to the calling code for proper failure handling. To accomplish this the following changes were made to the filters.h prototypes: - bool return for pp_init_func - Added pp_free_func for filter specific resource destruction Fixes segfaults from backtraces: * util_destroy_blit pp_free * u_transfer_inline_write_vtbl pp_jimenezmlaa_init_run pp_init This patch also uses tgsi_alloc_tokens to allocate temporary tokens in pp_tgsi_to_state, instead of allocating the array on the stack. This fixes the following stack corruption segfault in pp_run.c: * _int_free aaline_delete_fs_state pp_free Bug Number: 1021843 Reviewed-by: Brian Paul <[email protected]>
* glx: return True/False instead of GL_TRUE/GL_FALSEBrian Paul2013-06-271-11/+11
| | | | | | Just to be consistent with the functions' Bool return type. Reviewed-by: Jose Fonseca <[email protected]>
* glx: move declarations before codeBrian Paul2013-06-272-9/+9
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: move declarations before codeBrian Paul2013-06-271-2/+3
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* glsl: Use the C99 variadic macro syntax.José Fonseca2013-06-272-4/+4
| | | | | | | MSVC does not support the old GCC syntax. See also http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html
* scons: Add dependencies to all .xml files.José Fonseca2013-06-271-4/+10
| | | | | Should prevent stuck builds when only some of the included .xml files change.
* ilo: plug a potential index buffer leakChia-I Wu2013-06-271-0/+1
| | | | | This is harmless since st_context and u_vbuf both set index buffer to NULL before destroying themselves. But we do not want to rely on that behavior.
* softpipe: honor predication for clear_render_target and clear_depth_stencilRoland Scheidegger2013-06-261-2/+40
| | | | | | trivial, copied from llvmpipe Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: add support for nested / overlapping queriesRoland Scheidegger2013-06-2610-40/+45
| | | | | | | | | | | | | | | | OpenGL doesn't support this but d3d10 does. It is a bit of a pain as it is necessary to keep track of queries still active at the end of a scene, which is also why I cheat a bit and limit the amount of simultaneously active queries to (arbitrary) 16 (simplifies things because don't have to deal with a real list that way). I can't think of a reason why you'd really want large numbers of overlapping/nested queries so it is hopefully fine. (This only affects queries which need to be binned.) v2: don't copy remainder of array when deleting an entry simply replace the deleted entry with the last one (order doesn't matter). Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: rework query logicRoland Scheidegger2013-06-267-81/+92
| | | | | | | | | | | | | | | | | | | | | | | | Previously lp_rast_begin_query commands were always inserted into each bin, and re-issued if the scene was restarted, while lp_rast_end_query commands were executed for each still active query at the end of tile rasterization. Also, the ps_invocations and vis_counter were set to zero when the respective command was encountered. This however cannot work for multiple queries of the same type (note that occlusion counter and occlusion predicate while different type were also affected). So, change the logic to always set the ps_invocations and vis_counter to zero at the start of tile rasterization, and then use "start" and "end" per-thread query values when encountering the begin/end query commands instead, which should work for multiple queries of the same type. This also means queries do not have to be reissued in a new scene, however they still need to be finished at end of tile rasterization, so a list of queries still active at the end of a scene needs to be maintained. Also while here don't bin the queries which don't do anything in rasterization. (This change does not actually handle multiple queries of the same type yet, as the list of active queries is just a simple fixed array and setup can still only have one query active per type.) Reviewed-by: Jose Fonseca <[email protected]>
* i965: Move the remaining intel code to the i965 directory.Eric Anholt2013-06-2667-11392/+11367
| | | | | | | | | Now that i915's forked off, they don't need to live in a shared directory. Acked-by: Kenneth Graunke <[email protected]> Acked-by: Chad Versace <[email protected]> Acked-by: Adam Jackson <[email protected]> (and I hear second hand that idr is OK with it, too)
* i915: Fork the shared code from i965.Eric Anholt2013-06-2643-25/+14731
| | | | | | | | | | | | | Of this 15000 lines of code in intel/, we've identified 4000 lines that are trivially unnecessary for i915, and another 1000 that are pointless for i965, and expect to find more as time goes on. Split the i915 driver off, so that we can continue active development on i965 without worrying about breaking i915. Acked-by: Kenneth Graunke <[email protected]> Acked-by: Chad Versace <[email protected]> Acked-by: Adam Jackson <[email protected]> (and I hear second hand that idr is OK with it, too)
* i915: Remove dead symlink.Eric Anholt2013-06-261-1/+0
|
* glx: Fix another missed glMultiDrawElementsEXT const change.Eric Anholt2013-06-261-1/+1
| | | | | The build was broken for me since b7d9478f36bde0f7b27321378c1bb799fdd4eaa1.
* glsl: Move all var decls to the front of the IR list in reverse orderIan Romanick2013-06-261-0/+18
| | | | | | | | | | | | | | | | | | This has the (intended!) side effect that vertex shader inputs and fragment shader outputs will appear in the IR in the same order that they appeared in the shader code. This results in the locations being assigned in the declared order. Many (arguably buggy) applications depend on this behavior, and it matches what nearly all other drivers do. Fixes the (new) piglit test attrib-assignments. NOTE: This is a candidate for stable release branches (and requires the previous commit to prevent a regression in OpenGL ES 2.0 conformance test stencil_plane_operation). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Be more careful with the interleaved user array upload optimizationIan Romanick2013-06-261-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | The checks to determine when the data can be uploaded in an interleaved fashion can be tricked by certain data layouts. For example, float data[...]; glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 16, &data[0]); glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, 16, &data[4]); glDrawArrays(GL_POINTS, 0, 1); will hit the interleaved path with an incorrect size (16 bytes instead of 32 bytes). As a result, the data for attribute 1 never gets uploaded. The single element draw case is the only sensible case I can think of for non-interleaved-that-looks-like-interleaved data, but there may be others as well. To fix this, make sure that the end of the element in the array being checked is within the stride "window." Previously the code would check that the begining of the element was within the window. NOTE: This is a candidate for stable branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* mesa: add const qualifier to glMultiDrawElementsEXT() indices paramBrian Paul2013-06-263-3/+3
| | | | | | | | | | The 20130624 version of glext.h changed this to match the glMultiDrawElements() function which already had the extra const qualifier. Fixes warnings/errors that seem to vary from one compiler to the next. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove const from glDebugMessageCallbackARB() function parameterBrian Paul2013-06-263-4/+4
| | | | | | | The new 20130624 version of glext.h removed the const qualifier on the 'userParam' parameter. Reviewed-by: Jose Fonseca <[email protected]>
* i965/vs: Combine code generation's inst->opcode switch statements.Kenneth Graunke2013-06-261-163/+166
| | | | | | | | | | | | | | | | | | | vec4_visitor::generate_code() switches on vec4_instruction::opcode and calls into the brw_eu_emit.c layer to generate code for some of them. It then has a default case which calls generate_vec4_instruction() to handle the rest...which switches on opcode and handles the rest of the cases. The split apparently is that generate_code() handles the actual hardware opcodes (BRW_OPCODE_*) while generate_vec4_instruction() handles the virtual opcodes (SHADER_OPCODE_* and VS_OPCODE_*). But this looks fairly arbitrary, and it makes more sense to combine the two switches. This patch moves the cases from generate_code() into the helper function so that generate_code() isn't as large. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove broken source type assertions from brw_alu3().Kenneth Graunke2013-06-261-14/+5
| | | | | | | | | | | | | | | | | | | Commit 526ffdfc033ab01cf133cb7e8290c65d12ccc9be attempted to generalize the source register type assertions to allow D and UD. However, the src1 and src2 assertions actually checked src0.type against D and UD due to a copy and paste bug. It also began setting the source and destination register types based on dest.type, ignoring src0/src1/src2.type completely. BFE and BFI2 may actually pass mixed D/UD types and expect them to be ignored, which is arguably a bit sloppy, but not too crazy either. This patch simply removes the source register assertions as those values aren't used anyway. It also clarifies the comment above the block that sets the register types. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Add back strict type assertions for MAD and LRP.Kenneth Graunke2013-06-261-2/+16
| | | | | | | | | | | | Commit 526ffdfc033ab01cf133cb7e8290c65d12ccc9be relaxed the type assertions in brw_alu3 to allow D/UD types (required by BFE and BFI2). This lost us the strict type checking for MAD and LRP, which require all four types to be float. This patch adds a new ALU3F wrapper which checks these once again. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* glsl: Streamline the built-in type handling code.Kenneth Graunke2013-06-266-694/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over the last few years, the compiler has grown to support 7 different language versions and 6 extensions that add new built-in types. With more and more features being added, some of our core code has devolved into an unmaintainable spaghetti of sorts. A few problems with the old code: 1. Built-in types are declared...where exactly? The types in builtin_types.h were organized in arrays by the language version or extension they were introduced in. It's factored out to avoid duplicates---every type only exists in one array. But that means that sampler1D is declared in 110, sampler2D is in core types, sampler3D is a unique global not in a list...and so on. 2. Spaghetti call-chains with weird parameters: generate_300ES_types calls generate_130_types which calls generate_120_types and generate_EXT_texture_array_types, which calls generate_110_types, which calls generate_100ES_types...and more Except that ES doesn't want 1D types, so we have a skip_1d parameter. add_deprecated also falls into this category. 3. Missing type accessors. Common types have convenience pointers (like glsl_type::vec4_type), but others may not be accessible at all without a symbol table (for example, sampler types). 4. Global variable declarations in a header file? #include "builtin_types.h" in two C++ files would break the build. The new code addresses these problems. All built-in types are declared together in a single table, independent of when they were introduced. The macro that declares a new built-in type also creates a convenience pointer, so every type is available and it won't get out of sync. The code to populate a symbol table with the appropriate types for a particular language version and set of extensions is now a single table-driven function. The table lists the type name and GL/ES versions when it was introduced (similar to how the lexer handles reserved words). A single loop adds types based on the language version. Explicit extension checks then add additional types. If they were already added based on the language version, glsl_symbol_table simply ignores the request to add them a second time, meaning we don't need to worry about duplicates and can simply list types where they belong. v2: Mark uvecs and shadow samplers as ES3 only, and 1DArrayShadow as unsupported in ES entirely. Add a touch more doxygen. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>