summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* i965: Use ShaderCacheSerializeDriverBlob driver functionJordan Justen2018-07-093-11/+7
| | | | | | | | This function is called just before the gl_program::driver_cache_blob is saved out as part of the gl_program serialization. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: Use ShaderCacheSerializeDriverBlob driver functionJordan Justen2018-07-091-0/+2
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: Skip serializing driver_cache_blob if it existsJordan Justen2018-07-091-0/+3
| | | | | | | | | | Previously the mesa core code would not call to serialize the driver_cache_blob if it existed. We will update it to always call to serialize the driver_cache_blob meaning we should avoid re-serializing it under mesa/state_tracker. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Add disk shader cache driver blob callbackJordan Justen2018-07-091-0/+15
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965/icl: Don't set float blend optimization bit in CACHE_MODE_SSAnuj Phogat2018-07-091-4/+0
| | | | | | | | | | | | CACHE_MODE_SS is not listed in gfxspecs table for user mode non-privileged registers. So, making any changes from Mesa will do nothing. Kernel is already setting this bit in CACHE_MODE_SS register which is saved/restored to/from the HW context image. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* swrast: Fix eglMakeCurrent(dpy, NULL, NULL, ctx) (v2)Adam Jackson2018-07-091-21/+20
| | | | | | | | | | Fixes 14 piglits, mostly in egl_khr_create_context. v2: Also short-circuit the same-context-no-drawables case (Eric Anholt) Fixes: https://github.com/anholt/libepoxy/issues/177 Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* mesa: verify MaxVertexAttribStride for GLES 3.1Erik Faye-Lund2018-07-091-0/+1
| | | | | | | | | | | | | The OpenGL 3.1 specification, table Table 20.41 ("Implementation Dependent Values"), defines the minimum-maximum value for MAX_VERTEX_ATTRIB_STRIDE to be 2048. So we shouldn't enable OpenGL ES 3.1 on implementations where this isn't the case. Let's add a check for this Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: verify MaxVertexAttribStride for GL 4.4Erik Faye-Lund2018-07-091-0/+1
| | | | | | | | | | | | | The OpenGL 4.4 specification, table Table 23.55 ("Implementation Dependent Values"), defines the minimum-maximum value for MAX_VERTEX_ATTRIB_STRIDE to be 2048. So we shouldn't enable OpenGL 4.4 on implementations where this isn't the case. Let's add a check for this. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: fix clear color bo address relocationLionel Landwerlin2018-07-071-1/+1
| | | | | | Fixes: 7987d041fda0c9 ("i965/surface_state: Emit the clear color address instead of value.") Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* python: Stop using the Python 2 exception syntaxMathieu Bridon2018-07-061-1/+1
| | | | | | | | | | | | | | We could have made this compatible with Python 3 by using: except Exception as e: But since none of this code actually uses the exception objects, let's just drop them entirely. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* python: Use the print functionMathieu Bridon2018-07-064-34/+40
| | | | | | | | | | | | In Python 2, `print` was a statement, but it became a function in Python 3. Using print functions everywhere makes the script compatible with Python versions >= 2.6, including Python 3. Signed-off-by: Mathieu Bridon <[email protected]> Acked-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* st/nir: Disable varying packing when doing transform feedback.Eric Anholt2018-07-051-1/+9
| | | | | | | | | | | | | | | | The varying packing would result in st_nir_assign_var_locations() picking new driver_locations, despite the pipe_stream_output already being set up for the old driver location. This left the gallium driver with no way to work back to what varying was referenced by pipe_stream_output. Fixes these tests on V3D: dEQP-GLES3.functional.transform_feedback.random.separate.points.3 dEQP-GLES3.functional.transform_feedback.random.separate.points.7 dEQP-GLES3.functional.transform_feedback.random.separate.points.9 dEQP-GLES3.functional.transform_feedback.random.separate.triangles.3 dEQP-GLES3.functional.transform_feedback.random.separate.triangles.8 Reviewed-by: Timothy Arceri <[email protected]>
* mesa/st: draw_vbo: initialize restart_index tooGert Wollny2018-07-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | restart_index is later always used in a comparison, so it should be initialized properly. Fixes valgrind warning: Conditional jump or move depends on uninitialised value(s) at 0xB8D682F: r600_draw_vbo (r600_state_common.c:2153) by 0xB71F743: u_vbuf_draw_vbo (u_vbuf.c:1156) by 0xB3B92DB: st_draw_vbo (st_draw.c:235) by 0xB36B1AE: vbo_draw_arrays (vbo_exec_array.c:391) by 0xB36BB0D: vbo_exec_DrawArrays (vbo_exec_array.c:550) by 0x10A989: piglit_display (textureSize.c:157) by 0x4F8F174: run_test (piglit_fbo_framework.c:52) by 0x4F7BA12: piglit_gl_test_run (piglit-framework-gl.c:229) by 0x10A60A: main (textureSize.c:71) Uninitialised value was created by a stack allocation at 0xB3B90B0: st_draw_vbo (st_draw.c:143) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: enable ARB_direct_state_access in OpenGL 4.5 compat profileTimothy Arceri2018-07-052-100/+100
| | | | | | | | | Its unlikely anyone will add proper ARB_direct_state_access compat support before we branch 18.2. Enabling the extension in 4.5 at least allows users to make use of MESA_GL_VERSION_OVERRIDE=4.5COMPAT for games like No Mans Sky. Reviewed-by: Marek Olšák <[email protected]>
* Shorten u_queue namesMarek Olšák2018-07-041-1/+1
| | | | | | | | There is a 15-character limit for thread names shared by the queue name and process name. Shorten the thread name to make space for the process name. Reviewed-by: Timothy Arceri <[email protected]>
* i965: Use the new nir atomic counter linker for SPIR-V shadersNeil Roberts2018-07-031-0/+2
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* i965: enable AtomicStorage capability for gen7+Alejandro Piñeiro2018-07-031-0/+1
| | | | | | That is the same gen requirement for ARB_shader_atomic_counters. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glspirv: lower workgroup access to offsetsAntia Puentes2018-07-031-0/+1
| | | | | | This will perform the CS shared lowering. See 8761a04d0d93 Reviewed-by: Timothy Arceri <[email protected]>
* i965: Fix BRW_NEW_NUM_SAMPLES to be in .brw, not .mesaKenneth Graunke2018-07-021-2/+2
| | | | | | | | This is the wrong kind of dirty bit. Caught by GCC warnings, due to 64-bit values being truncated to 32 bits. Fixes: b95b0e2918c052068caeb4f6c2802ba89be043a3 (intel/anv,blorp,i965: Implement the SKL 16x MSAA SIMD32 workaround) Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: Also check for PIPE_FORMAT_A8R8G8B8_SRGB for texture_sRGBTomeu Vizoso2018-07-021-1/+3
| | | | | | | | | | | | | and PIPE_FORMAT_R8G8B8A8_SRGB, as well. The reason for this is that when Virgl runs with GLES on the host, it cannot directly upload textures in BGRA. So to avoid a conversion step, consider the RGB sRGB formats as well for this extension. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: Fall back to R8G8B8A8_SRGB for ETC2Tomeu Vizoso2018-07-021-3/+12
| | | | | | | | | | | | | | | | | If the driver doesn't support PIPE_FORMAT_B8G8R8A8_SRGB, fall back to PIPE_FORMAT_R8G8B8A8_SRGB. Drivers such as Virgl will have a hard time supporting PIPE_FORMAT_B8G8R8A8_SRGB when the host runs GLES, as GL_BGRA isn't as well suported there. So go with PIPE_FORMAT_R8G8B8A8_SRGB so these drivers can avoid a conversion copy. v2: Fix typo in commit message Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa/i965: Allow decompressing ETC2 to GL_RGBATomeu Vizoso2018-07-024-25/+40
| | | | | | | | | | | | | | | | | | | | | When Mesa itself implements ETC2 decompression, it currently decompresses to formats in the GL_BGRA component order. That can be problematic for drivers which cannot upload the texture data as GL_BGRA, such as Virgl when it's backed by GLES on the host. So this commit adds a flag to _mesa_unpack_etc2_format so callers can specify the optimal component order. In Gallium's case, it will be requested if the format isn't in PIPE_FORMAT_B8G8R8A8_SRGB format. For i965, it will remain GL_BGRA, as before. v2: * Remove unnecesary include (Emil Velikov) Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add header for share bptc decompress functionsDenis Pauk2018-07-013-1434/+1761
| | | | | | | | | | | | | | | | | | | | | | Move shared bptc functions to texcompress_bptc_tmp.h: * fetch_rgba_unorm_from_block * fetch_rgb_float_from_block * compress_rgba_unorm * compress_rgb_float Create decompress functions: * decompress_rgba_unorm * decompress_rgb_float Functions will be reused in gallium/auxiliary code. v2: Add block decompress function v3: Move all shared code to header Suggested-by: Marek Olšák <[email protected]> Signed-off-by: Denis Pauk <[email protected]> CC: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: enable ARB_vertex_attrib_64bit in compat profileTimothy Arceri2018-06-303-13/+14
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add outstanding ARB_vertex_attrib_64bit dlist supportTimothy Arceri2018-06-301-0/+178
| | | | Reviewed-by: Marek Olšák <[email protected]>
* vbo_save: add support for doubles to display list codeDave Airlie2018-06-304-12/+29
| | | | | | Required for ARB_vertex_attrib_64bit compat profile support. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add compat profile support for ARB_multi_draw_indirectTimothy Arceri2018-06-302-3/+76
| | | | | | v2: add missing ARB_base_instance support Reviewed-by: Marek Olšák <[email protected]>
* mesa: make valid_draw_indirect_multi() accessible externallyTimothy Arceri2018-06-302-12/+15
| | | | | | | We will use this to add compat support to ARB_multi_draw_indirect in the following patch. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add ARB_draw_indirect support to compat profileTimothy Arceri2018-06-303-4/+72
| | | | | | v2: add missing ARB_base_instance support Reviewed-by: Marek Olšák <[email protected]>
* mesa: generate GL_INVALID_OPERATION using draw indirect in dlistTimothy Arceri2018-06-301-0/+47
| | | | | | | | The spec doesn't explicitly say to generate an error but since DrawArraysInstanced* and DrawElementsInstanced* do, it makes sense to do it for these functions also. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add missing display list support for ARB_compute_shaderTimothy Arceri2018-06-301-0/+39
| | | | | | | | | | | The extension is enabled for compat profile but there is currently no display list support. I filed a spec bug and it has been agreed that glDispatchComputeIndirect should generate an INVALID_OPERATION error when called during display list compilation. Reviewed-by: Marek Olšák <[email protected]>
* mesa: expose some ARB_viewport_array dependent extensions in compatTimothy Arceri2018-06-301-2/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: enable ARB_viewport_array in compat profileTimothy Arceri2018-06-302-9/+10
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add ARB_viewport_array display list supportTimothy Arceri2018-06-301-0/+211
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: enable ARB_shader_subroutine in compat profileTimothy Arceri2018-06-302-11/+10
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add glUniformSubroutinesuiv() display list supportTimothy Arceri2018-06-301-0/+34
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: stop hiding remaining query parameters from OpenGL compatTimothy Arceri2018-06-301-5/+1
| | | | | | I managed to miss these two in my last pass at this. Reviewed-by: Marek Olšák <[email protected]>
* mesa: enable ARB_gpu_shader_fp64 in compat profileTimothy Arceri2018-06-302-20/+20
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add ProgramUniform*d display list supportTimothy Arceri2018-06-301-0/+514
| | | | | | This is required for fp64 to be enabled in compat profile. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add Uniform*d support to display listsTimothy Arceri2018-06-301-0/+493
| | | | | | This is required so we can enable fp64 support in compat profile. Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_nir: run lower_output_reads on !PIPE_CAP_TGSI_CAN_READ_OUTPUTSKarol Herbst2018-06-291-0/+6
| | | | | | | this is required for Drivers which don't allow reading from outputs. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* gallium: plumb invariant output attrib thru TGSIJoe M. Kniss2018-06-291-2/+6
| | | | | | | | | | | | Add support for glsl 'invariant' modifier for output data declarations. Gallium drivers that use TGSI serialization currently loose invariant modifiers in glsl shaders. v2: use boolean for invariant instead of unsigned. Tested: chromiumos on qemu with virglrenderer. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* intel/anv,blorp,i965: Implement the SKL 16x MSAA SIMD32 workaroundJason Ekstrand2018-06-281-0/+17
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/fs: Add fields to wm_prog_data for SIMD32 dispatchJason Ekstrand2018-06-282-0/+3
| | | | Reviewed-by: Matt Turner <[email protected]>
* i965: Add plumbing for shader time in 32-wide FS dispatch mode.Francisco Jerez2018-06-283-2/+11
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel/compiler: Add and use helpers for working with KSP indicesJason Ekstrand2018-06-282-23/+47
| | | | | | | | The pixel shader dispatch table is kind-of a confusing mess. This adds some helpers for dealing with it and for easily extracting the correct data from wm_prog_data. Reviewed-by: Matt Turner <[email protected]>
* i965: Re-arrange shader kernel setup in WM stateJason Ekstrand2018-06-281-37/+57
| | | | Reviewed-by: Matt Turner <[email protected]>
* i965/bufmgr: Use the correct argument order for bo_alloc_internalJason Ekstrand2018-06-271-2/+2
| | | | | | | The memzone and flags parameters were accidentally flipped in the call from brw_bo_alloc_tiled_2d. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: small cleanup in blorp debug printing output (trivial)Tapani Pälli2018-06-271-1/+1
| | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: add a space between headers and source (trivial)Tapani Pälli2018-06-271-0/+1
| | | | | | | There used to be one and it looks like it was removed by eb63640c1d. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]>