summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Don't call _mesa_ClipControl from glPopAttrib when unsupported.Kenneth Graunke2014-11-031-1/+2
| | | | | | | Otherwise, calling glPopAttrib on drivers that don't support ARB_clip_control gives you a GL error, which is surprising at best. Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Disable fast color clears on Skylake for now.Kenneth Graunke2014-11-031-1/+1
| | | | | | | | We're not programming the clear values yet, so this won't work. This patch should be (effectively) reverted eventually. Signed-off-by: Kenneth Graunke <[email protected]>
* i965/skl: Use new MOCS for SKLKristian Høgsberg2014-11-036-17/+33
| | | | | | | | | | | | On Skylake, the MOCS bits are an index into a table of 63 different, configurable cache configurations. As for previous GENs, we only care about WB and WT, which are available in the documented default set. Define SKL_MOCS_WB and SKL_MOCS_WT to the indices for those configucations and use those for the Skylake MOCS values. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Implement workaround for VF Invalidate issueJordan Justen2014-11-031-0/+9
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Update Viewport Z Clip Test Enable bits for Skylake.Kenneth Graunke2014-11-032-2/+10
| | | | | | | | | Skylake has separate controls for enabling the Z Clip Test for the near and far planes. For now, maintain the legacy behavior by setting both. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Emit extra zeros in 3DSTATE_DS on Skylake.Kenneth Graunke2014-11-031-10/+5
| | | | | | | | | Skylake's 3DSTATE_DS packet has a few more fields; we don't support domain shaders yet though. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Init instructions compaction tables for SKLKristian Høgsberg2014-11-031-0/+1
| | | | | | | They are the same as for BDW, so just add a case for SKL to the init switch. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/skl: Add fast clear resolve rect multipliers for SKLKristian Høgsberg2014-11-031-2/+5
| | | | | | | | SKL updates the resolve rectangle scaling factors again. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Always emit 3DSTATE_BINDING_TABLE_POINTERS_* on Skylake.Kenneth Graunke2014-11-031-1/+1
| | | | | | | | | | | On SKL, 3DSTATE_CONSTANT_* command is not committed until we give the corresponding 3DSTATE_BINDING_TABLE_POINTERS_* command. If we fail to do so, the constant buffers wont be read and push constants will be wrong. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Allocate 16 DWords for SURFACE_STATE on Skylake.Kenneth Graunke2014-11-031-1/+1
| | | | | | | | | Otherwise they overlap and horrible things happen. All the new DWords are for fast color clear values, which we don't do yet. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Refactor surface state allocation.Kenneth Graunke2014-11-031-10/+16
| | | | | | | | | | We will need to allocate more DWords on Skylake. v2: Don't mark brw_context parameter const. It's modified. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Emit extra zeros in STATE_BASE_ADDRESS on Skylake.Kenneth Graunke2014-11-031-2/+11
| | | | | | | | | Skylake introduces a new base address for a feature we don't yet expose. Setting these to 0 should be safe. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Update stencil reference handling for Skylake.Kenneth Graunke2014-11-033-6/+28
| | | | | | | | | Skylake uploads the stencil reference values in DW3 of the 3DSTATE_WM_DEPTH_STENCIL packet, rather than in COLOR_CALC_STATE. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Set mask bits in PIPELINE_SELECT on Skylake.Kenneth Graunke2014-11-031-1/+1
| | | | | | | | | | | Skylake has some extra bits in PIPELINE_SELECT, none of which are interesting for a 3D driver. In order to selectively change them, it also introduces new "mask bits" in 15:8. We care about the "Pipeline Selection" bits (1:0), so set the mask to 0x3. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Set max OpenGL version the same as gen7/8Jordan Justen2014-11-031-0/+1
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965/skl: Update 3DSTATE_SBE for Skylake.Damien Lespiau2014-11-032-2/+34
| | | | | | | | | | | | | This commands has seen the addition of 2 dwords that allow to specify which channels of which attributes need to be forwarded to the fragment shader. v2: Rebase forward a year (done by Ken). Signed-off-by: Damien Lespiau <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* glsl: Improve the CSE pass debugging output.Kenneth Graunke2014-11-031-1/+8
| | | | | | | | The CSE pass now prints out why it thinks a value is not a candidate for adding to the AE set. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Don't compute_to_mrf() on Gen >= 7.Matt Turner2014-11-031-0/+4
| | | | | | No differences in shader-db on Haswell (Gen 7.5). Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Remove now useless dot optimization on basis vectMatt Turner2014-11-033-92/+3
| | | | | | | The optimization in commit d056863b covers these cases, which were the first optimizations I added to the GLSL compiler. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Emit mul instead of dot if only one component left.Matt Turner2014-11-031-1/+4
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85683 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85691 Reviewed-by: Ian Romanick <[email protected]>
* clover: Fix clBuildProgram piglit regressionTom Stellard2014-11-031-4/+4
| | | | | | | | | | | Should trigger CL_INVALID_VALUE if device_list is NULL and num_devices is greater than zero. Introduced by e5468dfa523be2a7a0d04bb9efcf8ae780957563 Reported by: EdB Reviewed-by: Francisco Jerez <[email protected]>
* gallivm: Disable frame-pointer-omission on x86 to ensure right stack alignment.José Fonseca2014-11-031-1/+3
| | | | | | | | | | | | | | | | | | | Between release 3.2 and 3.3 LLVM stopped aligning properly when certain conditions (no allocas, but large number of vectors causing spills to the stack, and frame pointer omission enabled). We were already disabling frame-pointer-omission on several build types, but we now disable it on all build types. It's not clear whether this affects 32-bits x86 processes only, or if it can also affect 64-bits x86_64 processes when AVX registers are available and used. So disable frame-pointer-omission on both x86/x86_64 to be on the safe side. See also: - http://llvm.org/PR21435 Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: When disassemble a function, start by printing out its name.José Fonseca2014-11-031-0/+1
| | | | | | To help recognize what's supposed to do. Reviewed-by: Roland Scheidegger <[email protected]>
* i965/chv: Increase VS and GS thread countsBen Widawsky2014-11-021-2/+2
| | | | | | | | AFAICT the number of threads is 80, not 70. I am not sure if Ken knows something I do not. Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/docs: fix NRM, NRM4 docsBrian Paul2014-11-011-12/+24
| | | | | | | | | Need to do a sqrt(). FWIW, the html that Sphinx 1.1.3 generates for the math expressions looks completely broken. Reviewed-by: José Fonseca <[email protected]>
* softpipe: use the tgsi_free_tokens() functionBrian Paul2014-10-311-6/+6
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* tgsi: add a tgsi_free_tokens() functionBrian Paul2014-10-312-0/+13
| | | | | | To match tgsi_alloc_tokens(). Reviewed-by: Charmaine Lee <[email protected]>
* util: simplify u_pstipple.c codeBrian Paul2014-10-311-123/+62
| | | | | | | Use the new helper functions in the tgsi_transform.h file to emit declarations and instructions. Reviewed-by: Charmaine Lee <[email protected]>
* util: simplify temp register selection in u_pstipple.cBrian Paul2014-10-311-27/+18
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* util: simplify util_pstipple_create_fragment_shader() paramsBrian Paul2014-10-313-38/+28
| | | | | | | | Pass and return tgsi_token buffers instead of pipe_shader_state. And update softpipe driver (the only user of this function). Reviewed-by: Charmaine Lee <[email protected]>
* softpipe: remove unused softpipe_create_fs_variant_exec() parameterBrian Paul2014-10-313-5/+3
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* softpipe: check for SP_NEW_STIPPLE when building quad pipelineBrian Paul2014-10-311-0/+1
| | | | | | | Fixes polygon stipple if both DO_PSTIPPLE_IN_DRAW_MODULE and DO_PSTIPPLE_IN_HELPER_MODULE are zero/off. Reviewed-by: Charmaine Lee <[email protected]>
* r600g: Fix build with opencl and radeonsi disabledTom Stellard2014-10-311-6/+6
|
* clover: Fix bug when binary programs are passed to clBuildProgram() v2Tom Stellard2014-10-312-6/+14
| | | | | | | | | | | | | This was a regression introduced by 611d66fe4513e53bde052dd2bab95d448c909a2a Passing a binary program to clBuildProgram() is legal, but passing one to clCompileProgram() is not. v2: - Code cleanups. Reviewed-by: Francisco Jerez <[email protected]>
* clover: Factor input validation of clCompileProgram into a new function v2Tom Stellard2014-10-311-10/+23
| | | | | | | | | This factors out the validation that is common with clBuildProgram(). v2: - Code cleanups. Reviewed-by: Francisco Jerez <[email protected]>
* radeonsi/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders v2Tom Stellard2014-10-314-59/+127
| | | | | | v2: - Drop dependency on LLVM >= 3.5.1 - Rename si_create_shader() to si_shader_binary_read()
* r600g/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders v2Tom Stellard2014-10-318-97/+180
| | | | | v2: - Drop dependency on LLVM >= 3.5.1
* gallium/radeon: Add query for symbol specific config informationTom Stellard2014-10-313-0/+86
| | | | | | | This adds a query which allows drivers to access the config information of a specific function within the LLVM generated ELF binary. This makes it possible for the driver to handle ELF binaries with multiple kernels / global functions.
* r300g: remove enabled/disabled hyperz and AA compression messagesMarek Olšák2014-10-301-2/+0
| | | | | | It's annoying with octave. Reported by Michael Burian. Cc: 10.2 10.3 <[email protected]>
* r600g: Delete unused variable 'max_global_size' in 'r600_get_compute_param'Dieter Nützel2014-10-301-1/+0
| | | | Signed-off-by: Dieter Nützel <[email protected]>
* mesa: protect the debug state with a mutexChia-I Wu2014-10-302-47/+126
| | | | | | | | | | We are about to change mesa to spawn threads for deferred glCompileShader and glLinkProgram, and we need to make sure those threads can send compiler warnings/errors to the debug output safely. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: protect glsl_type with a mutexChia-I Wu2014-10-302-10/+62
| | | | | | | | | | glsl_type has several static hash tables and a static ralloc context. They need to be protected by a mutex as they are not thread-safe. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69200 Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: protect anonymous struct id with a mutexChia-I Wu2014-10-301-2/+8
| | | | | | | | | There may be two contexts compiling shaders at the same time, and we want the anonymous struct id to be globally unique. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* util: initialize locale_t with a static objectChia-I Wu2014-10-301-10/+8
| | | | | | | | | | | | _mesa_strtod and _mesa_strtof may be called from multiple threads. They need to be thread-safe. v2: platform checks are now done in configure.ac Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* configure: check for xlocale.h and strtofChia-I Wu2014-10-303-8/+11
| | | | | | | | With the assumptions that xlocale.h implies newlocale and strtof_l. SCons is updated to define HAVE_XLOCALE_H on linux and darwin. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* util: add _mesa_strtod and _mesa_strtofChia-I Wu2014-10-3010-40/+21
| | | | | | | | | Both core mesa and glsl have their own wrappers for strtof_l. Merge and move them to util/. They are compiled with a C++ compiler so that we can make them thread-safe in a following commit. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/gallium: Signal _NEW_TRANSFORM from glClipControl.Mathias Fröhlich2014-10-302-13/+6
| | | | | | | | | This removes the need for the gallium rasterizer state to listen to viewport changes. Thanks to Marek Olšák <[email protected]>. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
* Revert "i965/compaction: Disable compaction on SNB temporarily."Matt Turner2014-10-291-6/+0
| | | | | | | | This reverts commit cabc93c5adc9ea62be901621eff5ce4cb9574791. Mark thinks the failures on the SNB GT2 in the lab are actually because of faulty hardware, not instruction compaction. The GT1 didn't see any problems after changes to the compaction code.
* i965/vec4: Perform CSE on MAD instructions with final arguments switched.Matt Turner2014-10-291-1/+5
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Perform CSE on MAD instructions with final arguments switched.Matt Turner2014-10-291-1/+5
| | | | | | | | Multiplication is commutative. instructions in affected programs: 48314 -> 47954 (-0.75%) Reviewed-by: Kenneth Graunke <[email protected]>