summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove unused _mesa_create_nameless_texture()Brian Paul2015-10-082-23/+0
| | | | | Reviewed-by: Anuj Phogat <[email protected]> Tested-by: Mark Janes <[email protected]>
* mesa: remove unneeded error check in create_textures()Brian Paul2015-10-081-9/+2
| | | | | | | | | Callers of create_texture() will either pass target=0 or a validated GL texture target enum so no need to do another error check inside the loop. Reviewed-by: Anuj Phogat <[email protected]> Tested-by: Mark Janes <[email protected]>
* i965: Link compiler unit tests to libi965_compiler.laKristian Høgsberg Kristensen2015-10-081-6/+2
| | | | | | | | | | | | We can now link the unit tests against just libi965_compiler.la. This lets us drop a lot of DRI driver dependencies, but we still pull in all of libmesa and more. This also provides a few standalone users of libi965_compiler.la, which will help us accidentally using i965_dri.so functions from the compiler. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965: Break out backend compiler to its own libraryKristian Høgsberg Kristensen2015-10-082-77/+81
| | | | | | | | | This introduces a new libtool helper library, libi965_compiler.la. This library is moderately self-contained, but still needs to link to all of libmesa.la among other things. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965/cs: Get max_cs_threads from brw_compiler devinfoKristian Høgsberg Kristensen2015-10-081-2/+3
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965: Move brw_get_shader_time_index() call out of emit functionsKristian Høgsberg Kristensen2015-10-0811-31/+40
| | | | | | | | | | brw_get_shader_time_index() is all tangled up in brw_context state and we can't call it from the compiler. Thanks the Jasons recent refactoring, we can just get the index and pass to the emit functions instead. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965: Move brw_select_clip_planes() to brw_shader.cppKristian Høgsberg Kristensen2015-10-082-25/+26
| | | | | | | We call this from the compiler so move it to brw_shader.cpp. Reviewed-by: Topi Pohjolainen <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965: Use util_next_power_of_two() for brw_get_scratch_size()Kristian Høgsberg Kristensen2015-10-082-13/+6
| | | | | | | | | | | | This function computes the next power of two, but at least 1024. We can do that by bitwise or'ing in 1023 and calling util_next_power_of_two(). We use brw_get_scratch_size() from the compiler so we need it out of brw_program.c. We could move it to brw_shader.cpp, but let's make it a small inline function instead. Reviewed-by: Topi Pohjolainen <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965: Move brw_mark_surface_used() to brw_shader.cppKristian Høgsberg Kristensen2015-10-082-10/+10
| | | | | | | | brw_program.c won't be part of the compiler library, but we need brw_mark_surface_used() in the compiler. Move to brw_shader.cpp. Reviewed-by: Topi Pohjolainen <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965/cs: Split out helper for building local id payloadKristian Høgsberg Kristensen2015-10-084-78/+77
| | | | | | | | | | | | The initial motivation for this patch was to avoid calling brw_cs_prog_local_id_payload_dwords() in gen7_cs_state.c from the compiler. This commit ends up refactoring things a bit more so as to split out the logic to build the local id payload to brw_fs.cpp. This moves the payload building closer to the compiler code that uses the payload layout and makes it available to other users of the compiler. Reviewed-by: Topi Pohjolainen <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965: Move brw_link_shader() and friends to new file brw_link.cppKristian Høgsberg Kristensen2015-10-084-249/+284
| | | | | | | | We want to use the rest of brw_shader.cpp with the rest of the compiler without pulling in the GLSL linking code. Reviewed-by: Topi Pohjolainen <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965: Configure bufmgr debug options from intel_screen.cKristian Høgsberg Kristensen2015-10-083-17/+15
| | | | | | | | | | | | | | We need the debug flag parsing and INTEL_DEBUG in the compiler, but we don't want the dependency on bufmgr (libdrm_intel) in there. Move to intel_screen.c. There are now only two lines left in brw_process_intel_debug_variable(), but we keep it in intel_debug.h to avoid having to expose 'debug_control' as a global variable. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* util: Move DRI parse_debug_string() to utilKristian Høgsberg Kristensen2015-10-089-47/+112
| | | | | | | | | | We want to use intel_debug.c in code that doesn't link to dri common. v2: Remove unnecessary stddef.h include (Topi), use util/debug.h in all DRI driver and remove driParseDebugString() (Iago). Reviewed-by: Topi Pohjolainen <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* i965: Move brw_dump_ir() out of brw_*_emit() functionsKristian Høgsberg Kristensen2015-10-087-23/+12
| | | | | | | We move these calls one level up into the codegen functions. Reviewed-by: Topi Pohjolainen <[email protected]> Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
* gallium/ddebug: add missing dd_util.h to sources listEmil Velikov2015-10-081-1/+2
| | | | Signed-off-by: Emil Velikov <[email protected]>
* gallium/ddebug: automake: sort sources alphabeticallyEmil Velikov2015-10-081-2/+2
| | | | Signed-off-by: Emil Velikov <[email protected]>
* nir/sweep: Reparent the shader nameJason Ekstrand2015-10-081-0/+2
| | | | | | | | | | Previously the name of the nir shader was being freed prematurely during nir_sweep. Since 756613ed35d the name was later being used to generate filenames for the optimiser debug output and these would end up with garbage from the dangling pointer. Co-authored-by: Neil Roberts <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* c11/threads: initialize timeout structureJan Vesely2015-10-081-0/+6
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* docs/relnotes: document EGL_KHR_create_context on llvmpipe and softpipeBoyan Ding2015-10-081-0/+1
| | | | Signed-off-by: Boyan Ding <[email protected]>
* i965/gs/gen6: Maximum allowed size of SEND messages is 15 (4 bits)Iago Toral Quiroga2015-10-081-12/+18
| | | | | | | Comit d48ac9306619 addressed this for VS, but we forgot to do the same for URB writes generated by the gen6 GS. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Define FIRST_SPILL_MRF and FIRST_PULL_LOAD_MRF only once and in one placeIago Toral Quiroga2015-10-084-7/+6
| | | | | | That should make tracking where we do spills and pull loads a bit easier. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: make pull constant loads in gen6 start at MRFs 16/17Iago Toral Quiroga2015-10-082-3/+6
| | | | | | | So they do not conflict with our (un)spills (MRF 21..23) or our URB writes (MRF 1..15) Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix remove_duplicate_mrf_writes so it can handle 24 MRFs in gen6Iago Toral Quiroga2015-10-081-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: include bad type in error string of _mesa_pack_depth_spanTapani Pälli2015-10-081-1/+2
| | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: add varyings to resource list only with SSOTapani Pälli2015-10-081-4/+7
| | | | | | | | | | | | | | | | | | | | Varyings can be considered inputs or outputs of a program only when SSO is in use. With multi-stage programs, inputs contain only inputs for first stage and outputs contains outputs of the final shader stage. I've tested that fix works for Assault Android Cactus (demo version) and does not cause Piglit or CTS regressions in glGetProgramiv tests. Following ES 3.1 CTS separate shader tests that do query properties of varyings in SSO shader programs pass: ES31-CTS.program_interface_query.separate-programs-vertex ES31-CTS.program_interface_query.separate-programs-fragment Signed-off-by: Tapani Pälli <[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92122
* mesa: Correctly handle GL_BGRA_EXT in ES3 format_and_type checksJason Ekstrand2015-10-071-2/+19
| | | | | | | | | | | | | | | | | | | | | The EXT_texture_format_BGRA8888 extension (which mesa supports unconditionally) adds a new format and internal format called GL_BGRA_EXT. Previously, this was not really handled at all in _mesa_ex3_error_check_format_and_type. When the checks were tightened in commit f15a7f3c, we accidentally tightened things too far and GL_BGRA_EXT would always cause an error to be thrown. There were two primary issues here. First, is that _mesa_es3_effective_internal_format_for_format_and_type didn't handle the GL_BGRA_EXT format. Second is that it blindly uses _mesa_base_tex_format which returns GL_RGBA for GL_BGRA_EXT. This commit fixes both of these issues as well as adds explicit checks that GL_BGRA_EXT is only ever used with GL_BGRA_EXT and GL_UNSIGNED_BYTE. Signed-off-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92265 Reviewed-by: Ian Romanick <[email protected]> Cc: "11.0" <[email protected]>
* Revert "mesa: enable KHR_debug for ES contexts"Emil Velikov2015-10-072-2/+1
| | | | | | | This reverts commit b69cfbdf18fa64606a76761b20bc268f4ac731e5. This isn't quite baked yet. Seems that despite building the ES piglits, none of them got executed.
* egl/dri2: Properly dereference array.Matt Turner2015-10-071-3/+3
| | | | | | | | | | Fixes a regression that broke EGL since commit 858f2f2ae6d72f338fdd6d544b0c733814e22724 Author: Emil Velikov <[email protected]> Date: Sun Sep 13 12:25:27 2015 +0100 egl/dri2: ease srgb __DRIconfig conditionals
* radeonsi: fix a GS hang on VIMarek Olšák2015-10-072-0/+19
| | | | | | | Broken by one of the cleanups: 0d46c3bc9d09b376d74f7399e1a2d1b0a923640b Not applicable to stable. Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: remove TC L2 cache flush for index buffers on VIMarek Olšák2015-10-071-3/+3
| | | | Reviewed-by: Alex Deucher <[email protected]>
* svga: whitespace fixes in svga_sampler_view.cBrian Paul2015-10-071-8/+16
|
* svga: whitespace fixes in svga_resource_buffer.cBrian Paul2015-10-071-26/+27
|
* mesa: Remove GL_ARB_sampler_object depth compare error checking.Stefan Dösinger2015-10-071-18/+10
| | | | | | | | | | | | | | | | | Version 3: Simplify the code comment, word wrap commit description. Version 2: Return GL_FALSE if ARB_shadow is unsupported instead of pretending to store the value as suggested by Brian Paul. This fixes a GL error warning on r200 in Wine. The GL_ARB_sampler_objects extension does not specify a dependency on GL_ARB_shadow or GL_ARB_depth_texture for setting the depth texture compare mode and function. Silently ignore attempts to change these settings. They won't matter without a depth texture being assigned anyway. Reviewed-by: Brian Paul <[email protected]>
* svga: round UBO constant buffer size up/down to multiple of 16 bytesBrian Paul2015-10-071-0/+18
| | | | | | | | | | | | | | The svga3d device requires constant buffers to be a multiple of 16 bytes in size. OpenGL UBOs may not fit that restriction. As a work-around, round the size up if possible, else round down. Note that this patch only effects UBO constant buffers (index 1 or higher), not the 0th/default constant buffer. Fixes the game Grim Fandango Remastered. VMware bug 1510130. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* egl/dri2: enable EGL_KHR_gl_colorspace for swrastEmil Velikov2015-10-074-16/+20
| | | | | | | | | | No driver changes needed for softpipe/llvmpipe - things just work. v2: Whitespace fixes. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Boyan Ding <[email protected]> Acked-by: Alex Deucher <[email protected]>
* egl/dri2: ease srgb __DRIconfig conditionalsEmil Velikov2015-10-072-29/+14
| | | | | | | | One can simplify the if-else chain, by declaring the driconfigs as a two sized array, whist using srgb as a index to the correct entry. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
* mesa: enable KHR_debug for ES contextsEmil Velikov2015-10-072-2/+3
| | | | Signed-off-by: Emil Velikov <[email protected]>
* main/get: make KHR_debug enums available everywhereMatthew Waters2015-10-071-9/+9
| | | | | | | | | | | | | | | Move all the enums but CONTEXT_FLAGS. The spec seems quite explicit about the latter (wrt OpenGL ES) "In OpenGL ES versions prior to and including ES 3.1 there is no CONTEXT_FLAGS state and therefore the CONTEXT_FLAG_DEBUG_BIT cannot be queried." v2 [Emil Velikov] Rebase. v3 [Emil Veliokv] Drop the CONTEXT_FLAGS hunk - not applicable for GLES Signed-off-by: Matthew Waters <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* glapi: add function pointers for KHR_debug for glesMatthew Waters2015-10-072-0/+98
| | | | | | | | | | v2 [Emil Velikov] - Rebase. - Correct version in gles11 dispatch_sanity. - Move the extension enable to a separate patch. Signed-off-by: Matthew Waters <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* egl: move memcpy to bring conf->base operations togetherVarad Gautam2015-10-071-1/+1
| | | | | | Signed-off-by: Varad Gautam <[email protected]> Suggested-by: Emil Velikov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: restore surface type before linking config to its displayVarad Gautam2015-10-071-0/+2
| | | | | | | | | | | | | | commit c2c2e9a (egl: implement EGL_KHR_gl_colorspace (v2)) leaves _EGLConfig->SurfaceType set incorrectly before calling _eglLinkConfig(), and the bad value is passed around to platform_android. set it to zero as earlier. v2: Set SurfaceType to 0, rather than surface_type (Suggested by Emil) Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91596 Signed-off-by: Varad Gautam <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* nouveau: make sure there's always room to emit a fenceIlia Mirkin2015-10-074-2/+8
| | | | | | | | | | | | I started seeing a lot of situations on nv30 where fence emission wouldn't fit into the previous buffer (causing assertions). This ensures that whenever checking for space, we always leave a bit of extra room for the fence emission commands. Adjusts the nv30 and nvc0 fence emission logic to bypass the space checking as well. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] Reviewed-by: Samuel Pitoiset <[email protected]>
* vc4: use nir two-sided-color loweringBoyan Ding2015-10-062-24/+2
| | | | | | | | Similar to 9ffc1049ca (freedreno/ir3: use nir two-sided-color lowering). No piglit regression. Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* vc4: Fix a leak of the last color read/write surface on context destroy.Eric Anholt2015-10-061-0/+3
|
* vc4: Fix a memory leak in the simulator case.Eric Anholt2015-10-061-1/+6
| | | | We validate per draw call, and need to free the shader per draw call, too.
* mesa: remove unneeded #include of colormac.hMark Janes2015-10-061-1/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* radeon/r200: remove unneeded #include of colormac.hMark Janes2015-10-0611-11/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* i965: remove unneeded #include of colormac.hMark Janes2015-10-062-2/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* i915: remove unneeded #include of colormac.hMark Janes2015-10-062-2/+0
| | | | Reviewed-by: Matt Turner <[email protected]>
* i915: Drop broken front_buffer_reading/drawing optimizationVille Syrjälä2015-10-063-41/+15
| | | | | | | | | | | | | | | | | | | | | Bring the following commit over to i915: commit ec542d74578bbef6b55125dd6aba1dc7f5079e65 Author: Eric Anholt <[email protected]> Date: Mon Mar 3 10:43:10 2014 -0800 i965: Drop broken front_buffer_reading/drawing optimization. Not sure if it might fix anything, but since the i965 and i915 used to share a bunch of that code, it would seem reasonable the same problems could be present in the i915 code still, and the i965 approach is well tested by now so bringing it over seems fairly safe. No piglit regressions on 855. v2: Rebase on _mesa_is_front_buffer_* refactor. Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Ian Romanick <[email protected]>