summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-06-28mesa: add KHR_no_error support for gl*Renderbuffers()Samuel Pitoiset4-2/+24
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: prepare create_render_buffers() for KHR_no_error supportSamuel Pitoiset1-7/+17
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for gl*ProgramPipelines()Samuel Pitoiset4-2/+22
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: prepare create_program_pipelines() for KHR_no_error supportSamuel Pitoiset1-12/+17
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for gl*Samplers()Samuel Pitoiset4-2/+23
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: prepare create_samplers() helper for KHR_no_error supportSamuel Pitoiset1-12/+19
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for gl*Textures()Samuel Pitoiset4-2/+24
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: prepare create_textures() helper for KHR_no_error supportSamuel Pitoiset1-10/+18
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: fix an error message in create_textures()Samuel Pitoiset1-1/+1
Trivial. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for gl*Buffers()Samuel Pitoiset4-2/+24
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: prepare create_buffers() helper for KHR_no_error supportSamuel Pitoiset1-17/+24
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for glBindTextureUnit()Samuel Pitoiset3-1/+12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add bind_texture_unit() helperSamuel Pitoiset1-22/+34
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for glDepthRangeIndexed()Samuel Pitoiset3-1/+13
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for glDepthFunc()Samuel Pitoiset3-1/+12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add depth_func() helperSamuel Pitoiset2-22/+31
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for glFrontFace()Samuel Pitoiset3-1/+12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add front_face() helperSamuel Pitoiset2-11/+18
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for glCullFace()Samuel Pitoiset3-1/+12
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add cull_face() helperSamuel Pitoiset2-14/+21
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for glCreateShader() and ↵Samuel Pitoiset3-2/+24
glCreateShaderObjectARB() Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: rename create_shader() to create_shader_err()Samuel Pitoiset1-10/+19
And add a no_error variant. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: pass the 'caller' function to create_shader()Samuel Pitoiset1-6/+6
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: add KHR_no_error support for glAttachShader() and glAttachObjectARB()Samuel Pitoiset3-3/+23
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: rename attach_shader() to attach_shader_err()Samuel Pitoiset1-17/+36
And add a no_error variant. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mesa: pass the 'caller' function to attach_shader()Samuel Pitoiset1-9/+10
In order to fix GL error messages. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-06-28mapi: Enable assembly language API acceleration for PPC64LE (V2)Ben Crocker5-2/+386
Implement assembly language API acceleration for PPC64LE, analogous to long-standing implementations for X86 and X86-64. See also similar implementation in libglvnd. Tested with Piglit. Signed-off-by: Ben Crocker <bcrocker@redhat.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Bill Schmidt <wschmidt@linux.vnet.ibm.com>
2017-06-27i965: Add a RGBX->RGBA fallback for glEGLImageTextureTarget2D()Chad Versace1-2/+16
This enables support for importing RGBX8888 EGLImage textures on Skylake. Chrome OS needs support for RGBX8888 EGLImage textures because because the Android framework produces HAL_PIXEL_FORMAT_RGBX8888 winsys surfaces, which the Chrome OS compositor consumes as dma_bufs. On hardware for which RGBX is unsupported or disabled, normally core Mesa provides the RGBX->RGBA fallback during glTexStorage. But the DRIimage code bypasses core Mesa, so we must do the fallback in i965. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-06-27mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]Chad Versace6-0/+128
The new function takes a mesa_format and, if the format is an alpha format with a non-alpha variant, returns the non-alpha format. Otherwise, it returns the original format. Example: input -> output // Fallback exists MESA_FORMAT_R8G8B8X8_UNORM -> MESA_FORMAT_R8G8B8A8_UNORM MESA_FORMAT_RGBX_UNORM16 -> MESA_FORMAT_RGBA_UNORM16 // No fallback MESA_FORMAT_R8G8B8A8_UNORM -> MESA_FORMAT_R8G8B8A8_UNORM MESA_FORMAT_Z_FLOAT32 -> MESA_FORMAT_Z_FLOAT32 i965 will use this for EGLImages and DRIimages. v2 (Jason Ekstrand): - Use mako - Rework to be easier to read - Write directly to the output file Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-06-27radeonsi: move instance divisors into a constant bufferMarek Olšák7-28/+93
Shader key size: 107 -> 47 Divisors of 0 and 1 are encoded in the shader key. Greater instance divisors are loaded from a constant buffer. The shader code doing the division is huge. Is it something we need to worry about? Does any app use instance divisors >= 2? VS prolog disassembly: s_load_dwordx4 s[12:15], s[0:1], 0x80 ; C00A0300 00000080 s_nop 0 ; BF800000 s_waitcnt lgkmcnt(0) ; BF8C007F s_buffer_load_dword s14, s[12:15], 0x4 ; C0220386 00000004 s_waitcnt lgkmcnt(0) ; BF8C007F v_cvt_f32_u32_e32 v4, s14 ; 7E080C0E v_rcp_iflag_f32_e32 v4, v4 ; 7E084704 v_mul_f32_e32 v4, 0x4f800000, v4 ; 0A0808FF 4F800000 v_cvt_u32_f32_e32 v4, v4 ; 7E080F04 v_mul_hi_u32 v5, v4, s14 ; D2860005 00001D04 v_mul_lo_i32 v6, v4, s14 ; D2850006 00001D04 v_cmp_eq_u32_e64 s[12:13], 0, v5 ; D0CA000C 00020A80 v_sub_i32_e32 v5, vcc, 0, v6 ; 340A0C80 v_cndmask_b32_e64 v5, v6, v5, s[12:13] ; D1000005 00320B06 v_mul_hi_u32 v5, v5, v4 ; D2860005 00020905 v_add_i32_e32 v6, vcc, v5, v4 ; 320C0905 v_subrev_i32_e32 v4, vcc, v5, v4 ; 36080905 v_cndmask_b32_e64 v4, v4, v6, s[12:13] ; D1000004 00320D04 v_mul_hi_u32 v5, v4, v1 ; D2860005 00020304 v_add_i32_e32 v4, vcc, s8, v0 ; 32080008 v_mul_lo_i32 v6, v5, s14 ; D2850006 00001D05 v_add_i32_e32 v7, vcc, 1, v5 ; 320E0A81 v_cmp_ge_u32_e64 s[12:13], v1, v6 ; D0CE000C 00020D01 v_sub_i32_e32 v6, vcc, v1, v6 ; 340C0D01 v_cmp_le_u32_e32 vcc, s14, v6 ; 7D960C0E v_cndmask_b32_e64 v8, 0, -1, s[12:13] ; D1000008 00318280 v_cndmask_b32_e64 v6, 0, -1, vcc ; D1000006 01A98280 v_and_b32_e32 v6, v8, v6 ; 260C0D08 v_cmp_eq_u32_e32 vcc, 0, v6 ; 7D940C80 v_cndmask_b32_e32 v6, v7, v5, vcc ; 000C0B07 v_add_i32_e32 v5, vcc, -1, v5 ; 320A0AC1 v_cmp_eq_u32_e32 vcc, 0, v8 ; 7D941080 v_cndmask_b32_e32 v5, v6, v5, vcc ; 000A0B06 v_add_i32_e32 v5, vcc, s9, v5 ; 320A0A09 v2: set prefer_mono for fetched instance divisors Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-27radeonsi: check nr_cbufs in other places before flushing CBMarek Olšák1-2/+4
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-27radeonsi: use #pragma pack to pack si_shader_keyMarek Olšák1-0/+8
sizeof(struct si_shader_key): Before reverting the 2 commits: 120 bytes After reverting the 2 commits: 128 bytes With #pragma pack: 107 bytes Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-27Revert "radeonsi: use uint32_t to declare si_shader_key.opt.kill_outputs"Marek Olšák3-10/+6
This reverts commit 7b2240ac9ce3ba9bd86f4ae8aac53af8878c0b10. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-27Revert "radeonsi: remove 8 bytes from si_shader_key with uint32_t ↵Marek Olšák3-14/+5
ff_tcs_inputs_to_copy" This reverts commit 6b6fed3a3c81c2b0d319ef121df20a0dc914705f. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-27mesa: optimize GL_PRIMITIVE_RESTART_NV moreMarek Olšák1-10/+9
And other client state changes don't have to call update_derived_primitive_restart_state. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-27mesa: fix clip plane enable breakageMarek Olšák1-1/+6
Broken by: commit 00173d91b70ae4dcea7c6324ee4858c498cae14b Author: Marek Olšák <marek.olsak@amd.com> Date: Sat Jun 10 12:09:43 2017 +0200 mesa: don't flag _NEW_TRANSFORM for st/mesa if possible It also optimizes the case slightly for GL core. It doesn't try to fix that glEnable might be a bad place to do the clip plane transformation. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-06-27radeon/vcn: enable h264 decode entension supportLeo Liu2-0/+3
It's enabled through message buffer for UVD Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
2017-06-27svga: clean up format_cap_tableCharmaine Lee1-403/+92
Per Jose's suggestion, this patch cleans up format_cap_table to remove the unnecessary default cap value for vgpu10 formats since those devcap values can be retrieved from the device. Tested with MTT conform, glretrace, piglit in HWv13 and HWv8. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-06-27svga: fix the default devcap for SVGA3D_Z_D24S8_INTCharmaine Lee1-4/+1
The default devcap for format SVGA3D_Z_D24S8_INT in HWv8 when its devcap is not explicitly advertised should be set to zero to match the default value in the device. Tested with MTT piglit in HW version 8. Reviewed-by: Neha Bhende <bhenden@vmware.com>
2017-06-27svga: create buffer surfaces for incompatible bind flagsCharmaine Lee4-27/+217
In cases where certain bind flags cannot be enabled together, such as CONSTANT_BUFFER cannot be combined with any other flags, a separate host surface will be created. For example, if a stream output buffer is reused as a constant buffer, two host surfaces will be created, one for stream output, and another one for constant buffer. Data will be copied from the stream output surface to the constant buffer surface. Fixes piglit test ext_transform_feedback-immediate-reuse-index-buffer, ext_transform_feedback-immediate-reuse-uniform-buffer Tested with MTT piglit, MTT glretrace, Nature, NobelClinician Viewer, Tropics. v2: Fix bind flags compatibility check as suggested by Brian. v3: Use the list utility to maintain the buffer surface list. v4: Use the SAFE rev of LIST_FOR_EACH_ENTRY Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-06-27svga: do not unconditionally enable streamout bind flagCharmaine Lee4-11/+78
Currently we unconditionally enable streamout bind flag at buffer resource creation time. This is not necessary if the buffer is never used as a streamout buffer. With this patch, we enable streamout bind flag as indicated by the state tracker. If the buffer is later bound to streamout and does not already has streamout bind flag enabled, we will recreate the buffer with the new set of bind flags. Buffer content will be copied from the old buffer to the new one. Tested with MTT piglit, Nature, Tropics, Lightsmark. v2: Fix bind flags check as suggested by Brian. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-06-27svga: pass tobind_flags to svga_buffer_handleCharmaine Lee8-15/+26
This is to prepare for more bind_flags optimization in subsequent patches. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-06-27svga: pass bind_flags to surface create functionsCharmaine Lee3-26/+34
This is to prepare for other bind_flags optimization in subsequent patches. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2017-06-27pipe_loader_sw: fix compilation warningBrian Paul1-1/+2
Add the new 'flags' parameter to pipe_loader_sw_create_screen(). Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-06-27mesa: add missing includeEric Engestrom1-0/+1
src/mesa/drivers/x11/xm_dd.c:688:7: warning: implicit declaration of function ‘_mesa_update_draw_buffer_bounds’; did you mean ‘_mesa_has_ARB_draw_buffers_blend’? [-Wimplicit-function-declaration] _mesa_update_draw_buffer_bounds(ctx, ctx->DrawBuffer); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Marek Olšák <marek.olsak@amd.com> Fixes: 585c5cf8a514783d9ed3 ("mesa: don't update draw buffer bounds in _mesa_update_state") Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-27i965: perf: add support for GeminilakeLionel Landwerlin4-1/+9131
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2017-06-27i965: perf: add support for KabylakeLionel Landwerlin5-1/+20970
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2017-06-27i965: perf: use gen_device_info rather then brw_contextLionel Landwerlin1-2/+2
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-06-27i965: perf: ensure isolated timer reports while idle don't confuse filteringRobert Bragg1-1/+17
From experimentation in IGT, we found that the OA unit might label some report as "idle" (using an invalid context ID), right after a report for a given context. Deltas generated by those reports actually belong to the previous context, even though they're not labelled as such. This change makes ensure that while reading OA reports, we only consider the GPU actually idle after 2 reports with an invalid context ID. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-06-27i965: perf: keep on reading reports until delimiting timestampLionel Landwerlin1-20/+113
Due to an underlying hardware race condition, we have no guarantee that all the reports coming from the OA buffer related to the workload we're trying to measure have landed to memory by the time all the work submitted has completed. That means we need to keep on reading the OA stream until we read a report with a timestamp more recent than the timestamp recored by the MI_REPORT_PERF_COUNT at the end of the performance query. v2: fix uninitialized offset variable to 0 (Lionel) v3: rework the reading to avoid blocking the user of the API unless requested (Rob) v4: fix a bug that makes the i965 driver reading the perf stream when not necessary, leading to very long counter accumulation times (Lionel) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>