summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* freedreno/ir3: SSBO/atomic supportRob Clark2017-05-046-13/+309
| | | | | | | | TODO cwabbott pointed out a write-after-read hazzard, which effects both this and arrays. A write needs to depend on *all* reads since the last write, not just the last read. Signed-off-by: Rob Clark <[email protected]>
* freedreno: core SSBO supportRob Clark2017-05-045-0/+73
| | | | | | The generation-independent support for binding shader buffer objects. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: resync instr-a3xx.h/disasm-a3xx.cRob Clark2017-05-047-20/+161
| | | | | | | Sync to the same files from freedreno.git to correct decoding of ldgb/ stgb instructions. Signed-off-by: Rob Clark <[email protected]>
* mesa/st: compute support for glsl_to_nirRob Clark2017-05-044-1/+32
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* nir: add pass to lower atomic counters to SSBORob Clark2017-05-043-0/+220
| | | | | | | | This is equivalent to what mesa/st does in glsl_to_tgsi. For most hw there isn't a particularly good reason to treat these differently. Signed-off-by: Rob Clark <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* nir: add a C wrapper for glsl_type::get_interface_instance()Rob Clark2017-05-042-0/+16
| | | | Signed-off-by: Rob Clark <[email protected]>
* mapi_abi.py: remove no longer used --mode optionEmil Velikov2017-05-045-13/+8
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mapy_abi.py: remove dead output_for_app generatorEmil Velikov2017-05-041-48/+0
| | | | | | Used by the OpenVG codebase. Signed-off-by: Emil Velikov <[email protected]>
* mapi: replace mapi_table abstractionEmil Velikov2017-05-047-28/+25
| | | | | | | | | | Replace all instances of mapi_table with the actual struct _glapi_table. The former may have been needed when the OpenVG was around. But since that one is long gone, there' no point in having the current confusing mix of the two. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mesa/tests: remove no longer needed HAVE_SHARED_GLAPI defineEmil Velikov2017-05-041-2/+0
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gl_table.py: always regenerate the complete struct _glapi_tableEmil Velikov2017-05-041-6/+0
| | | | | | | | | | | Currently we would generate a partial one as we do non-shared glapi. At the same time since it's local, we don't care that much if we have a few extra bytes of space in the table. Drop the guard, which allows us to simplify both build system and code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glx/apple: remove empty variable SHARED_GLAPI_CFLAGSEmil Velikov2017-05-041-1/+0
| | | | | | Cc: Jeremy Huddleston Sequoia <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glx/windows: remove empty variable SHARED_GLAPI_CFLAGSEmil Velikov2017-05-041-1/+0
| | | | | | Cc: Jon Turney <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glx: automake: scons: remove unneeded GLX_SHARED_GLAPI defineEmil Velikov2017-05-042-5/+0
| | | | | | | There's no users in-tree that use it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* targets/libgl-xlib: remove unneeded GLX_SHARED_GLAPI defineEmil Velikov2017-05-041-2/+0
| | | | | | | There's no users in-tree that use it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* drivers/x11: remove unneeded GLX_SHARED_GLAPI defineEmil Velikov2017-05-041-2/+0
| | | | | | | There's no users in-tree that use it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glx: glX_proto_send.py: use correct compile guard GLX_INDIRECT_RENDERINGEmil Velikov2017-05-042-4/+4
| | | | | | | | | | | | | The code itself has nothing to do with shared glapi, thus having it behind GLX_SHARED_GLAPI is misleading. Use GLX_INDIRECT_RENDERING instead. The latter macro is set at global scope by the Autotools and Scons build systems. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mapi/es*api: remove unneeded HAVE_SHARED_GLAPI guardEmil Velikov2017-05-041-4/+0
| | | | | | | Always true, since GLES* requires shared glapi. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/dri: remove unneeded HAVE_SHARED_GLAPI guardEmil Velikov2017-05-041-5/+1
| | | | | | | | | | | Always true, since the dri modules required shared glapi. With earlier commit (da410e6afad "configure: explicitly require shared glapi for enable-dri") we even made that explicit during the configure stage. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/dri: remove unneeded HAVE_SHARED_GLAPI guardEmil Velikov2017-05-041-5/+1
| | | | | | | | | | | Always true, since the dri modules required shared glapi. With earlier commit (da410e6afad "configure: explicitly require shared glapi for enable-dri") we even made that explicit during the configure stage. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/dri: always link against shared glapiEmil Velikov2017-05-041-7/+9
| | | | | | | | | Analogous to previous commit. Check with the extensive commit description and bug report referenced. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/dri: always link against shared glapiEmil Velikov2017-05-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the early days of Xorg and Mesa we had multiple providers of the GLAPI. All of those were the ones responsible for dlopening the DRI module. Hence it was perfectly fine, and actually expected, for the DRI modules to have unresolved symbols. Since then we've moved the API to a separate shared library and no other libraries provide the symbols. Here comes the picky part: It's possible that one uses old Xorg (where libglx.so provides the GLAPI) and new Mesa (with DRI modules linking against libglapi.so). That should still work, since the the libglx.so symbols will take precedence over the libglapi.so ones. I've verified this while running 1.14 series Xorg alongside this (and next) patch. It may seem a bit fragile, but that's of reasonably OK since all of the affected Xorg versions have been EOL for years. The final one being the 1.14 series, which saw its final bug fix release 1.14.7 in June 2014. To ensure that the binaries do not have unresolved symbols add -no-undefined and $(LD_NO_UNDEFINED), just like we do everywhere else throughout mesa. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98428 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* anv: fix anv_gem_mmap comment to not mention NULLEmil Velikov2017-05-041-1/+1
| | | | | | | | The function cannot return NULL, update the comment accordingly. Fixes: b546c9d ("anv: anv_gem_mmap() returns MAP_FAILED as mapping error") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* eg: explicitly size dri2_to_egl_attribute_map[]Emil Velikov2017-05-041-1/+1
| | | | | | | | | This way we'll get an implicit zero initialization of the remaining members, as required by dri2_add_config(). Fixes: e5efaeb85c3 ("egl: polish dri2_to_egl_attribute_map[]") Cc: Tomasz Figa <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* dri_interface.h: define __DRI_ATTRIB_MAXEmil Velikov2017-05-041-0/+1
| | | | | | | | | | | | | Thus we can use the value to explicitly size arrays, instead of __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE + 1. The latter seems magical and is error prone, as we add more dri attributes. v2: Fix off by one error (Tomasz) Cc: Tomasz Figa <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* scons: update for LLVM 4.0Ben Boeckel2017-05-041-2/+20
| | | | | | | | | | | | LLVMDemangle, LLVMGlobalISel, and LLVMDebugInfoMSF are new. Also update the comment to add irreader to the list of components. CC: <[email protected]> Reviewed-by: Chuck Atkins <[email protected]> Signed-off-by: Ben Boeckel <[email protected]> Acked-by: Emil Velikov <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* c11/threads: rework Windows thrd_current() commentEmil Velikov2017-05-041-3/+7
| | | | | | | | | | | | Drop the misleading "will not match the one returned by thread_create" hunk and provide more clarity as to what/why GetCurrentThread() isn't the solution we're looking for. v2: Places brackets after function names (Eric) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]>
* egl/platform/drm: Don't take display ownership until gbm is initializedAdam Jackson2017-05-041-1/+1
| | | | | | | | | | If the gbm_create_device() call here actually did fail, any subsequent eglTerminate on the display would segfault. Cc: <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attributeAdam Jackson2017-05-043-8/+14
| | | | | | | | | | Introduce _egl_display::Options::Platforms for private storage. For X11 platforms we can use it for the screen number as set by EGL_PLATFORM_X11_SCREEN_EXT. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* anv: vkBindImageMemory() should return VK_ERROR_OUT_OF_{HOST,DEVICE}_MEMORY ↵Samuel Iglesias Gonsálvez2017-05-041-1/+1
| | | | | | | | | | | | | | on failure According to the spec we get VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_OUT_OF_DEVICE_MEMORY on vkBindImageMemory failure. Fixes returned value changed by b546c9d. Fixes: b546c9d ("anv: anv_gem_mmap() returns MAP_FAILED as mapping error") Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Cc: "17.0 17.1" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* glsl: reject memory qualifiers with uniform blocksSamuel Pitoiset2017-05-041-2/+10
| | | | | | | | | | | | | The spec allows memory qualifiers to be used with image variables, buffers variables and shader storage blocks. This patch also fixes validate_memory_qualifier_for_type(). Fixes the following ARB_uniform_buffer_object test: uniform-block-memory-qualifier.frag Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: reject format qualifiers with non-image types everywhereSamuel Pitoiset2017-05-041-0/+2
| | | | | | | | | | | Including structures, interfaces and uniform blocks. Fixes the following ARB_shader_image_load_store test: format-layout-with-non-image-type.frag Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: rework validate_image_qualifier_for_type()Samuel Pitoiset2017-05-041-9/+27
| | | | | | | | | | | | It makes more sense to have two separate validate functions, mainly because memory qualifiers are allowed with members of shader storage blocks. validate_memory_qualifier_for_type() will be fixed in a separate patch. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: rename image_* qualifiers to memory_*Samuel Pitoiset2017-05-0412-103/+103
| | | | | | | | | It doesn't make sense to prefix them with 'image' because they are called "Memory Qualifiers" and they can be applied to members of storage buffer blocks. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* anv: anv_gem_mmap() returns MAP_FAILED as mapping errorSamuel Iglesias Gonsálvez2017-05-042-6/+4
| | | | | | | | | | | | | | Take it into account when checking if the mapping failed. v2: - Remove map == NULL and its related comment (Emil) Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Fixes: 6f3e3c715a7 ("vk/allocator: Add a BO pool") Fixes: 9919a2d34de ("anv/image: Memset hiz surfaces to 0 when binding memory") Cc: "17.0 17.1" <[email protected]>
* nir/lower_tex: Fix minor error in YUV color conversion matrixJohnson Lin2017-05-031-3/+3
| | | | | | | | | | | | | | | The matrix used for YCbCr to RGB is listed in: https://en.wikipedia.org/wiki/YCbCr There was an error in converting the offsets from integers to unorm values: 0.0625=16/256 should be 16.0/255,and 0.5=128.0/256 should be 128.0/255. With this fix, the CSC result is bit aligned with wikipedia's conversion result and FFMPeg's result. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100854 Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* i965: Port gen4+ state emitting code to genxml.Rafael Antognolli2017-05-035-230/+174
| | | | | | | | | | | | | | | | On this patch, we port: - brw_polygon_stipple - brw_polygon_stipple_offset - brw_line_stipple - brw_drawing_rect v2: - Also emit states for gen4-5 with this code. v3: - Style fixes and remove excessive checks (Ken). Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ 3DSTATE_CC_STATE_POINTERS state to genxml.Rafael Antognolli2017-05-034-95/+50
| | | | | Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ multisample state emitting code to genxml.Rafael Antognolli2017-05-035-136/+96
| | | | | | | | | | | Emit 3DSTATE_MULTISAMPLE using brw_batch_emit. v3: - Remove dead code (Ken) - Simplify #if/#endif (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen4+ emit vertices code to genxml.Rafael Antognolli2017-05-034-792/+556
| | | | | | | | | | | | | | | | | | | Some code that was placed in brw_draw_upload.c and exported to be used by gen8+ was also moved to genX_state_upload, and the respective symbols are not exported anymore. v2: - Remove code from brw_draw_upload too - Emit vertices for gen4-5 too. - Use helper to setup brw_address (Kristian) - Use macros for MOCS values. - Do not use #ifndef NDEBUG on code that is actually used (Ken) v3: - Style and code clenup (Ken) - Keep some of the common code inside brw_draw_upload.c (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port push constant code to genxml.Rafael Antognolli2017-05-039-385/+226
| | | | | | | | | | | | | | | | | | | The following states are ported on this patch: - gen6_gs_push_constants - gen6_vs_push_constants - gen6_wm_push_constants - gen7_tes_push_constants v2: - Use helper to setup brw_address (Kristian) v3: - Do not use macro for upload_constant_state (Ken) - Do not re-declare MOCS macro (Ken) v4: (by Ken) - Drop more dead code, change brw->gen checks to GEN_GEN, style nits Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ 3DSTATE_SCISSOR_STATE_POINTERS to use genxml.Rafael Antognolli2017-05-034-116/+87
| | | | | | | | | | | | Emit 3DSTATE_SCISSOR_STATE_POINTERS using brw_batch_emit, and pack the scissor states using GENX(SCISSOR_RECT_pack), generated from genxml. v3: - Remove old code (Ken) - Style fixes (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen7+ 3DSTATE_TE to genxml.Rafael Antognolli2017-05-034-71/+39
| | | | | | | Emit 3DSTATE_TE on Gen7+ using brw_batch_emit helper. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ blend state code to genxml.Rafael Antognolli2017-05-035-522/+312
| | | | | | | | | | | | | | Upload blend states using GENX(BLEND_STATE_ENTRY_pack), generated from genxml. v3: - style fixes (Ken) - cleanup to remove excessive #ifdef's (Ken) - remove memset (Ken) - disable blend.AlphaToCoverageDitherEnable on gen6 (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ state emitting code to genxml.Rafael Antognolli2017-05-0313-1180/+471
| | | | | | | | | | | | | | | Ported in this patch: - 3DSTATE_DS - 3DSTATE_GS - 3DSTATE_HS - 3DSTATE_VIEWPORT_STATE_POINTERS_SF_CL v3: - Remove NEW_TRANSFORM blocks (Ken) - Bring back some comments and workaround for Ivybridge (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ 3DSTATE_VS to genxml.Rafael Antognolli2017-05-036-304/+124
| | | | | | | | | | | | | | Emit 3DSTATE_VS on Gen6+ using brw_batch_emit helper, that uses pack structs from genxml. v2: - Use render_bo helper to setup brw_address (Kristian) v3: - Bring back some comments for gen6 and remove _NEW_TRANSFORM blocks from gen7+. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen8+ 3DSTATE_PS_EXTRA to genxml.Rafael Antognolli2017-05-034-150/+88
| | | | | | | | | | | Emit 3DSTATE_PS_EXTRA on Gen8+ using brw_batch_emit helper, that uses pack structs from genxml. v3: - Style fixes and moving code around to be cleaner (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen6+ 3DSTATE_WM to genxml.Rafael Antognolli2017-05-036-435/+185
| | | | | | | | | | | | | | | Emit 3DSTATE_WM on Gen6+ using brw_batch_emit helper, that uses pack structs from genxml. v2: - Use render_bo helper to setup brw_address (Kristian) - Remove TODO and use BRW_PSCDEPTH_OFF. v3: - A couple of style fixes (Ken) - Enable RASTRULE_UPPER_RIGHT on gen6+ instead of gen8+ (Ken) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen7+ 3DSTATE_PS to genxml.Rafael Antognolli2017-05-034-255/+134
| | | | | | | | | | | | | | | Emit 3DSTATE_PS on Gen7+ using brw_batch_emit helper, that uses pack structs from genxml. v2: - Use render_bo helper to setup brw_address (Kristian) v3: - Style fixes and code cleanup (Ken) v4: - More style fixes and code cleanup missed in v3 Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Port gen7+ 3DSTATE_SOL to genxml.Rafael Antognolli2017-05-035-412/+338
| | | | | | | | | | | | | | | Emit 3DSTATE_SOL on Gen7+ using brw_batch_emit helper, that uses pack structs from genxml. v2: - Add helpers to assign struct brw_address (Kristian) v3: - Rename MOCS -> SOBufferMOCS - Do not re-declare MOCS macros (Ken). - Style and code reorganization (Ken). Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>