summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* i965: Generalize predicated break pass for use in vec4 backend.Matt Turner2015-10-055-12/+16
| | | | | | | instructions in affected programs: 44204 -> 43762 (-1.00%) helped: 221 Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Use backend_instruction in predicated break peephole.Matt Turner2015-10-051-4/+4
| | | | | | | We're not using any fs_inst fields, and the next commit will make the peephole used by the vec4 backend. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/fs: Remove SNB embedded-comparison support from optimizations.Matt Turner2015-10-052-32/+3
| | | | | | | | | We never emit IF instructions with an embedded comparison (lost in the switch to NIR), so this code is not used. If we want to readd support, we should have a pass that merges a CMP instruction with an IF or a WHILE instruction after other optimizations have run. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Add missing _mm_mfence() before streaming loads.Matt Turner2015-10-051-0/+3
| | | | | | | | | | | | | | | | | According to the Intel Software Development Manual (Volume 1: Basic Architecture, 12.10.3 Streaming Load Hint Instruction): Streaming loads may be weakly ordered and may appear to software to execute out of order with respect to other memory operations. Software must explicitly use fences (e.g. MFENCE) if it needs to preserve order among streaming loads or between streaming loads and other memory operations. That is, a memory fence is needed to preserve the order between the GPU writing the buffer and the streaming loads reading it back. Reported-by: Joseph Nuzman <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Fix intel_miptree_is_fast_clear_capable()Chad Versace2015-10-051-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | There are three types of fast clears: a. fast depth clears b. fast singlesample color clears c. fast multisample color clears Function intel_miptree_is_fast_clear_capable() checks if a miptree supports fast clears of type (b). Rename the function to disambiguate what it does: old: intel_miptree_is_fast_clear_capable new: intel_miptree_supports_non_msrt_fast_clear The functionally accidentally rejected multisampled color surfaces because it thought they were singlesample array surfaces. Fix that by explicitly rejecting surfaces with samples > 1. This fix would have been needed before we enabled layered fast singlesample color clears (introduced in gen8), which we want to do eventually. For now, though, this patch changes no behavior; it just fixes how the driver chooses its behavior. Reviewed-by: Anuj Phogat <[email protected]>
* i965/mt: Declare some functions as staticChad Versace2015-10-052-7/+3
| | | | | | | | intel_tiling_supports_non_msrt_mcs() and intel_miptree_is_fast_clear_capable() are not used outside of intel_mipmap_tree.c. Reviewed-by: Anuj Phogat <[email protected]>
* i965: Make vec4_visitor's destructor virtualIago Toral Quiroga2015-10-051-1/+1
| | | | | | | | | | | | | | | | | | We need a virtual destructor when at least one of the class' methods is virtual. Failure to do so might lead to undefined behavior when destructing derived classes. Fixes the following warning: brw_vec4_gs_visitor.cpp: In function 'const unsigned int* brw::brw_gs_emit(brw_context*, gl_shader_program*, brw_gs_compile*, void*, unsigned int*)': brw_vec4_gs_visitor.cpp:703:11: warning: deleting object of polymorphic class type 'brw::vec4_gs_visitor' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] delete gs; Curro: This shouldn't be causing any actual bugs at the moment because gen6_gs_visitor is the only subclass of vec4_visitor destroyed through a pointer of a base class (vec4_gs_visitor *) and its destructor is basically the same as its parent's. Anyway it seems sensible to change this so it doesn't bite us in the future. Reviewed-by: Francisco Jerez <[email protected]>
* i965: Assert on the number of combined UBO and SSBO binding table entriesIago Toral Quiroga2015-10-052-0/+4
| | | | | | | | In theory we can't break this assertion since the compiler frontend checks that we don't exceed any of the individual limits, but it does not hurt to be extra safe. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Reserve binding table space for SSBO surfacesIago Toral Quiroga2015-10-051-0/+1
| | | | | | | These share the space with UBO surfaces but we need to make sure we allocate enough space for both sets (12 of each) Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Define BRW_MAX_SSBOIago Toral Quiroga2015-10-052-7/+10
| | | | | | Instead of using hard-coded values. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Define BRW_MAX_UBOIago Toral Quiroga2015-10-052-3/+6
| | | | | | Instead of using hard-coded values. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Remove more dead visitor/vertex program code.Matt Turner2015-10-043-23/+0
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Don't print line numbers with INTEL_DEBUG=optimizer.Matt Turner2015-10-041-2/+4
| | | | | | | The thing you want to do with the output files is diff them, which is made more difficult by line numbers changing. Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: reduce memory footprint of uniform_storage structTimothy Arceri2015-10-055-10/+11
| | | | | | | | The uniform will only be of a single type so store the data for opaque types in a single array. Cc: Francisco Jerez <[email protected]> Cc: Ilia Mirkin <[email protected]>
* i965: Remove shader_prog from vec4_gs_visitor.Kenneth Graunke2015-10-043-9/+9
| | | | | | | Unfortunately it has to stay in gen6_gs_visitor. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Use nir->has_transform_feedback_varyings to avoid shader_prog.Kenneth Graunke2015-10-041-1/+1
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* nir: Introduce new nir_intrinsic_load_per_vertex_input intrinsics.Kenneth Graunke2015-10-042-37/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Geometry and tessellation shaders process multiple vertices; their inputs are arrays indexed by the vertex number. While GLSL makes this look like a normal array, it can be very different behind the scenes. On Intel hardware, all inputs for a particular vertex are stored together - as if they were grouped into a single struct. This means that consecutive elements of these top-level arrays are not contiguous. In fact, they may sometimes be in completely disjoint memory segments. NIR's existing load_input intrinsics are awkward for this case, as they distill everything down to a single offset. We'd much rather keep the vertex ID separate, but build up an offset as normal beyond that. This patch introduces new nir_intrinsic_load_per_vertex_input intrinsics to handle this case. They work like ordinary load_input intrinsics, but have an extra source (src[0]) which represents the outermost array index. v2: Rebase on earlier refactors. v3: Use ssa defs instead of nir_srcs, rebase on earlier refactors. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: automatically set per-sample interpolation if using SampleID/PosMarek Olšák2015-10-032-2/+10
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: set force_persample_interp if ARB_sample_shading is usedMarek Olšák2015-10-034-0/+12
| | | | | | | This is only a half of the work. The next patch will handle gl_SampleID/SamplePos, which is the other half of ARB_sample_shading. Reviewed-by: Ilia Mirkin <[email protected]>
* st/mesa: add ST_DEBUG=precompile support for tessellation shadersMarek Olšák2015-10-031-0/+20
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: remove Driver.BindImageTextureMarek Olšák2015-10-032-15/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.DeleteSamplerObjectMarek Olšák2015-10-032-20/+10
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.EndCallListMarek Olšák2015-10-036-22/+2
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.BeginCallListMarek Olšák2015-10-036-12/+2
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.EndListMarek Olšák2015-10-036-11/+2
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.NewListMarek Olšák2015-10-036-11/+2
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.NotifySaveBeginMarek Olšák2015-10-037-16/+3
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.SaveFlushVerticesMarek Olšák2015-10-037-10/+5
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.FlushVerticesMarek Olšák2015-10-037-16/+14
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.BeginVerticesMarek Olšák2015-10-033-8/+2
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.BindArrayObjectMarek Olšák2015-10-033-18/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.DeleteArrayObjectMarek Olšák2015-10-034-9/+2
| | | | | | | Nothing reimplements it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.NewArrayObjectMarek Olšák2015-10-035-7/+3
| | | | | | | Nothing reimplements it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.HintMarek Olšák2015-10-035-10/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.ColorMaskIndexedMarek Olšák2015-10-033-22/+5
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove some Driver.Blend* hooksMarek Olšák2015-10-032-16/+0
| | | | | | | Nothing sets them. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.AccumMarek Olšák2015-10-035-11/+0
| | | | | | | Nothing calls it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.ResizeBuffersMarek Olšák2015-10-034-11/+3
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.DeleteShaderProgramMarek Olšák2015-10-034-8/+8
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.NewShaderProgramMarek Olšák2015-10-035-6/+7
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.DeleteShaderMarek Olšák2015-10-034-7/+7
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/wm: Make compute_barycentric_interp_modes take a nir_shader and a devinfoJason Ekstrand2015-10-021-24/+15
| | | | | | | Now that everything comes in through NIR, we can pick this directly out of the shader source and don't need to reference the gl_fragment_program. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Use nir_foreach_variableJason Ekstrand2015-10-024-7/+7
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/nir: Remove the prog parameter from brw_nir_lower_inputsJason Ekstrand2015-10-021-4/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/shader: Get rid of the shader, prog, and shader_prog fieldsJason Ekstrand2015-10-0219-99/+68
| | | | | | | | | | Unfortunately, we can't get rid of them entirely. The FS backend still needs gl_program for handling TEXTURE_RECTANGLE. The GS vec4 backend still needs gl_shader_program for handling transfom feedback. However, the VS needs neither and we can substantially reduce the amount they are used. One day we will be free from their tyranny. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs,vec4: Get rid of the sanity_param_countJason Ekstrand2015-10-025-31/+0
| | | | | | | | It doesn't exist for anything other than an assert that, as far as I can tell, isn't possible to trip. Soon, we will remove prog from the visitor entirely and this will become even more impossible to hit. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Use nir info instead of pulling things out of [shader_]progJason Ekstrand2015-10-023-10/+9
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Use the nir info instead of pulling things out of [shader_]progJason Ekstrand2015-10-023-20/+19
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Move sampler unit lookup into rescale_texcoordJason Ekstrand2015-10-023-14/+13
| | | | | | | | | The texunit variable we create and assign in nir_emit_texture gets passed through two more layers of function calls before it gets to its sole use in rescale_texcoord. The best part is that we already pass the sampler into rescale_texcoord so we can just look it up there. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/cs: Remove the prog argument from local_id_payload_dwordsJason Ekstrand2015-10-023-7/+5
| | | | Reviewed-by: Kenneth Graunke <[email protected]>