summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* mesa: Return number of result bits for GL_ANY_SAMPLES_PASSED_CONSERVATIVEDanylo Piliaiev2018-06-271-0/+1
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106986 Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* nir: Remove old-school deref chain supportJason Ekstrand2018-06-222-2/+0
| | | | | | | Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st,ir3,radeonsi: push lower_deref_instrs back into driverRob Clark2018-06-221-2/+0
| | | | | | | | | | | | | vc4+vc5 is not really effected by the deref chain to deref instr conversion, so it no longer needs this pass. For others, now that all the passes mesa/st uses are using deref instructions, push the lowering to deref chains back into driver. Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: convert lower_samplers_as_deref to deref instructionsRob Clark2018-06-221-3/+3
| | | | | | | | | | This also removes the legacy version of lower_samplers. Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/st: re-enable lower_io_to_elements()Rob Clark2018-06-221-1/+1
| | | | | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: convert lower_io_arrays_to_elements to deref instructionsRob Clark2018-06-221-2/+2
| | | | | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/st/nir: convert lower_builtins to deref instructionsRob Clark2018-06-222-26/+41
| | | | | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/st: temporarily disable lower_io_to_elements()Rob Clark2018-06-221-1/+1
| | | | | | | | | | | | Not required for correctness, and makes the order of converting passes to deref instructions hard to get right for both prog_to_nir and glsl_to_nir cases. Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: convert lower_io_to_scalar to deref instructionsRob Clark2018-06-221-1/+1
| | | | | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* move lower_deref_instrsRob Clark2018-06-221-2/+1
| | | | | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Use derefs in nir_lower_samplersJason Ekstrand2018-06-221-2/+0
| | | | | | | | | | | We change glsl_to_nir to provide derefs for bot textures and samplers while we're at it. This makes the lowering much easier since we only either replace sources or remove them. Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir/lower_samplers: split out _legacy version for deref chainsRob Clark2018-06-221-1/+1
| | | | | | | | | | | | | | | | | | To simplify the transition, and make things bisectable, split out a legacy copy or lower_samplers. This way the i965 and gallium drivers can independently switch over to deref instructions. Since the lower_samplers_as_deref pass is only used by gallium drivers, it can be converted in lock-step with moving the lower_deref_instrs pass, and so does not need a corresponding _legacy clone. This legacy pass will be removed in a future commit. Signed-off-by: Rob Clark <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>