summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: GL_TEXTURE_BORDER_COLOR exists in OpenGL 1.0, so don't depend on ↵Ian Romanick2017-06-281-1/+9
| | | | | | | | | | | | | | | | | | | | | GL_ARB_texture_border_clamp On NV20 (and probably also on earlier NV GPUs that lack GL_ARB_texture_border_clamp) fixes the following piglit tests: gl-1.0-beginend-coverage gltexparameter[if]{v,} push-pop-texture-state texwrap 1d texwrap 1d proj texwrap 2d proj texwrap formats All told, 49 more tests pass on NV20 (10de:0201). No changes on Intel CI run or RV250 (1002:4c66). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: Fix Android buildChad Versace2017-06-281-1/+1
| | | | | | | | The format_fallback.py script wants two arguments: 'csv-file' and 'out-file'. Fixes: 20c99eaece "mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]" Reported-by: Rob Herring <[email protected]>
* i965: Fix anisotropic filtering for mag filterEero Tamminen2017-06-281-1/+1
| | | | | | | | | | | | | | Commit f8d69beed49c64f883bb8ffb28d4960306baf575 moving sampler handling to genxml messed up change done by commit 6a7c5257cac23cd9767aa4bc8fdab68925b11157. This broke rendering in SynMark CSDof and TexFilterAniso tests. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101607 Thanks to Kevin, who spotted the actual typo! Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/dri: Support R8G8B8A8 and R8G8B8X8 configsChad Versace2017-06-282-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Android framework requires support for EGLConfigs with HAL_PIXEL_FORMAT_RGBX_8888 and HAL_PIXEL_FORMAT_RGBA_8888. Even though all RGBX formats are disabled on gen9 by brw_surface_formats.c, the new configs work correctly on Broxton thanks to _mesa_format_fallback_rgbx_to_rgba(). On GLX, this creates no new configs, and therefore breaks no existing apps. See in-patch comments for explanation. I tested with glxinfo and glxgears on Skylake. On Wayland, this also creates no new configs, and therfore breaks no existing apps. (I tested with mesa-demos' eglinfo and es2gears_wayland on Skylake). The reason differs from GLX, though. In dri2_wl_add_configs_for_visual(), the format table contains only B8G8R8X8, B8G8R8A8, and B5G6B5; and dri2_add_config() correctly matches EGLConfig to format by inspecting channel masks. On Android, in Chrome OS, I tested this on a Broxton device. I confirmed that the Google Play Store's EGLSurface used HAL_PIXEL_FORMAT_RGBA_8888, and that an Asteroid game's EGLSurface used HAL_PIXEL_FORMAT_RGBX_8888. Both apps worked well. (Disclaimer: I didn't test this patch on Android with Mesa master. I backported this patch series to an older Android branch). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: do not use format string as literal stringJuan A. Suarez Romero2017-06-281-2/+2
| | | | | | | | | | | | | | | | This fixes a couple of errors when building in Android: external/mesa3d/src/mesa/main/shaderapi.c:293:49: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] _mesa_error(ctx, GL_INVALID_OPERATION, caller); ^~~~~~ external/mesa3d/src/mesa/main/shaderapi.c:293:49: note: treat the string as an argument to avoid this _mesa_error(ctx, GL_INVALID_OPERATION, caller); ^ Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Juan A. Suarez Romero <[email protected]>
* scons: add code to generate format_fallback.c fileBrian Paul2017-06-281-0/+7
| | | | | | | | Fixes: a1983223d8839a0c9 "mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]" Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: add KHR_no_error support for glClear()Samuel Pitoiset2017-06-282-0/+10
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add clear() helperSamuel Pitoiset2017-06-281-23/+31
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBindAttribLocation()Samuel Pitoiset2017-06-282-0/+14
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add bind_attrib_location() helperSamuel Pitoiset2017-06-281-19/+29
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for gl*ReadBuffer()Samuel Pitoiset2017-06-282-0/+38
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: create read_buffer_err() and always inline read_buffer()Samuel Pitoiset2017-06-281-18/+31
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glVertex*AttribBinding()Samuel Pitoiset2017-06-282-0/+30
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glShaderStorageBlockBinding()Samuel Pitoiset2017-06-282-0/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add shader_storage_block_binding() helperSamuel Pitoiset2017-06-281-9/+19
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glUniformBlockBinding()Samuel Pitoiset2017-06-282-0/+15
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add uniform_block_binding() helperSamuel Pitoiset2017-06-281-9/+16
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glFenceSync()Samuel Pitoiset2017-06-282-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add fence_sync() helperSamuel Pitoiset2017-06-281-17/+25
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glClientWaitSync()Samuel Pitoiset2017-06-282-0/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add client_wait_sync() helperSamuel Pitoiset2017-06-281-16/+26
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glCheckFramebufferStatus()Samuel Pitoiset2017-06-282-0/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for gl*Renderbuffers()Samuel Pitoiset2017-06-282-0/+22
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: prepare create_render_buffers() for KHR_no_error supportSamuel Pitoiset2017-06-281-7/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for gl*ProgramPipelines()Samuel Pitoiset2017-06-282-0/+20
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: prepare create_program_pipelines() for KHR_no_error supportSamuel Pitoiset2017-06-281-12/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for gl*Samplers()Samuel Pitoiset2017-06-282-0/+21
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: prepare create_samplers() helper for KHR_no_error supportSamuel Pitoiset2017-06-281-12/+19
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for gl*Textures()Samuel Pitoiset2017-06-282-0/+22
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: prepare create_textures() helper for KHR_no_error supportSamuel Pitoiset2017-06-281-10/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fix an error message in create_textures()Samuel Pitoiset2017-06-281-1/+1
| | | | | | | Trivial. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for gl*Buffers()Samuel Pitoiset2017-06-282-0/+22
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: prepare create_buffers() helper for KHR_no_error supportSamuel Pitoiset2017-06-281-17/+24
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glBindTextureUnit()Samuel Pitoiset2017-06-282-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add bind_texture_unit() helperSamuel Pitoiset2017-06-281-22/+34
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glDepthRangeIndexed()Samuel Pitoiset2017-06-282-0/+12
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glDepthFunc()Samuel Pitoiset2017-06-282-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add depth_func() helperSamuel Pitoiset2017-06-282-22/+31
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glFrontFace()Samuel Pitoiset2017-06-282-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add front_face() helperSamuel Pitoiset2017-06-282-11/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glCullFace()Samuel Pitoiset2017-06-282-0/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add cull_face() helperSamuel Pitoiset2017-06-282-14/+21
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glCreateShader() and ↵Samuel Pitoiset2017-06-282-0/+22
| | | | | | | glCreateShaderObjectARB() Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename create_shader() to create_shader_err()Samuel Pitoiset2017-06-281-10/+19
| | | | | | | And add a no_error variant. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: pass the 'caller' function to create_shader()Samuel Pitoiset2017-06-281-6/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glAttachShader() and glAttachObjectARB()Samuel Pitoiset2017-06-282-1/+21
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: rename attach_shader() to attach_shader_err()Samuel Pitoiset2017-06-281-17/+36
| | | | | | | And add a no_error variant. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: pass the 'caller' function to attach_shader()Samuel Pitoiset2017-06-281-9/+10
| | | | | | | In order to fix GL error messages. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Add a RGBX->RGBA fallback for glEGLImageTextureTarget2D()Chad Versace2017-06-271-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 <[email protected]>
* mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]Chad Versace2017-06-276-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 <[email protected]>