summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* compiler: add additional cs metadata fields to shader infoTimothy Arceri2016-10-262-0/+6
| | | | | | And copy values from GLSL. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/i965/i915/r200: eliminate gl_vertex_programTimothy Arceri2016-10-2646-310/+268
| | | | | | | Here we move the only field in gl_vertex_program to the ARB program fields in gl_program. Reviewed-by: Jason Ekstrand <[email protected]>
* i965: switch vs over to shared shader_infoTimothy Arceri2016-10-262-4/+3
| | | | | | | Note we access shader_info from the program struct rather than the nir_shader pointer because shader cache won't create a nir_shader. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/mesa/st: eliminate gl_geometry_programTimothy Arceri2016-10-2620-90/+45
| | | | | | We now get all the gs metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: set gs shader_info metadata directlyTimothy Arceri2016-10-262-19/+7
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: switch gs over to shared shader_infoTimothy Arceri2016-10-261-4/+7
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: switch gs over to shared shader_infoTimothy Arceri2016-10-261-1/+1
| | | | | | | Note we access shader_info from the program struct rather than the nir_shader pointer because shader cache won't create a nir_shader. Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: add input primative field for gs in shader infoTimothy Arceri2016-10-262-0/+4
| | | | | | And copy the value from GLSL. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/mesa/st: eliminate gl_tess_eval_programTimothy Arceri2016-10-2621-93/+53
| | | | | | We now get all the tes metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: copy tes metadata directly to shared shader infoTimothy Arceri2016-10-262-18/+4
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: switch tes over to shared shader_infoTimothy Arceri2016-10-261-5/+7
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: switch tes over to shared shader_infoTimothy Arceri2016-10-262-8/+8
| | | | | | | Note we access shader_info from the program struct rather than the nir_shader pointer because shader cache won't create a nir_shader. Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: add fields for tes metadata to shader infoTimothy Arceri2016-10-262-0/+18
| | | | | | And copy the values from gl_tess_eval_program struct. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/mesa/st: eliminate gl_tess_ctrl_programTimothy Arceri2016-10-2621-76/+41
| | | | | | We now get all the tcs metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: set tcs shader_info metadata directlyTimothy Arceri2016-10-262-7/+1
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: switch tcs over to shared shader_infoTimothy Arceri2016-10-262-2/+2
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: switch tcs over to shared shader_infoTimothy Arceri2016-10-262-22/+17
| | | | | | | Note we access shader_info from the program struct rather than the nir_shader pointer because shader cache won't create a nir_shader. Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: add temporary copy_shader_info() functionTimothy Arceri2016-10-268-53/+97
| | | | | | | | | | | | | This function is added here to ease refactoring towards using the new shared shader_info. Once refactoring is complete and values are set directly it will be removed. We call it from _mesa_copy_linked_program_data() rather than glsl_to_nir() so that the values will be set for all drivers. In order to do this some calls need to be moved around so that we make sure to call do_set_program_inouts() before _mesa_copy_linked_program_data() Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: add a shader info field to the gl_program typeTimothy Arceri2016-10-263-1/+11
| | | | | | | | | | And use this field as the source for shader info in the nir_shader this will allow us to set some of these fields from GLSL directly. It will also simplify restoring from shader cache and allow the removal of duplicate fields from GLSL. Reviewed-by: Jason Ekstrand <[email protected]>
* nir/i965/anv/radv/gallium: make shader info a pointerTimothy Arceri2016-10-2665-358/+372
| | | | | | | | | | When restoring something from shader cache we won't have and don't want to create a nir_shader this change detaches the two. There are other advantages such as being able to reuse the shader info populated by GLSL IR. Reviewed-by: Jason Ekstrand <[email protected]>
* nir: move nir_shader_info to a common compiler headerTimothy Arceri2016-10-263-97/+134
| | | | | | | This will allow use to stop copying values between structs and will also simplify handling handling these values in the shader cache. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: modify _mesa_copy_linked_program_data() to take gl_linked_shaderTimothy Arceri2016-10-266-32/+34
| | | | | | | | | | This allows us to do some small tidy ups, but will also allow us to call a new function that copies values to a shared shader info from here. In order to make this change this function now requires _mesa_reference_program() to have previously been called. Reviewed-by: Jason Ekstrand <[email protected]>
* vulkan/wsi/wayland: fix ARGB window supportFredrik Höglund2016-10-261-1/+4
| | | | | | | | | | Use an ARGB format for the DRM buffer when the compositeAlpha field in VkSwapchainCreateInfoKHR is set to VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR. Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vulkan/wsi/x11: fix ARGB window supportFredrik Höglund2016-10-261-4/+15
| | | | | | | | | Pass the correct depth to xcb_dri3_pixmap_from_buffer_checked(). Otherwise xcb_present_pixmap() fails with a BadMatch error. Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: mark the fence as submitted and signalled in vkAcquireNextImageKHRFredrik Höglund2016-10-263-9/+18
| | | | | | | | This stops the debug layers from complaining when fences are used to throttle image acquisition. Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* scons: Require libdrm >= 2.4.66 for DRM.Vinson Lee2016-10-251-1/+1
| | | | | | | | | | | | | | | | | configure.ac already requires 2.4.66. Fix SCons build. drmDevicePtr is not available until libdrm 2.4.65. Compiling src/loader/loader.c ... src/loader/loader.c:111:40: error: unknown type name ‘drmDevicePtr’ static char *drm_construct_id_path_tag(drmDevicePtr device) ^ Fixes: 4a183f4d06f8 ("scons: loader: use libdrm when available") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98421 Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Vedran Miletić <[email protected]>
* radv: Replace "abi_versions" with correct "api_version".Matt Turner2016-10-252-2/+2
| | | | | | | | git history shows "abi_versions" was used from the outset. Cc: <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98415 Reviewed-by: Dave Airlie <[email protected]>
* anv: Replace "abi_versions" with correct "api_version".Matt Turner2016-10-252-2/+2
| | | | | | | | git history shows "abi_versions" was used from the outset. Cc: <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98415 Reviewed-by: Dave Airlie <[email protected]>
* nv50/ir: start LocalCSE with getFirst to merge PHI instructionsKarol Herbst2016-10-251-1/+1
| | | | | | | | | | | | | | | total instructions in shared programs : 3499888 -> 3499445 (-0.01%) total gprs used in shared programs : 453866 -> 453803 (-0.01%) total local used in shared programs : 21621 -> 21621 (0.00%) total bytes used in shared programs : 32078952 -> 32074936 (-0.01%) local gpr inst bytes helped 0 39 119 119 hurt 0 0 0 0 Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* nvc0: use correct bufctx when invalidating CP texturesSamuel Pitoiset2016-10-251-1/+1
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Cc: "12.0 13.0" <[email protected]>
* vulkan/wsi/x11: Fix behavior of vkGetPhysicalDeviceSurfaceFormatsKHREduardo Lima Mitev2016-10-251-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | x11_surface_get_formats() is currently asserting that the number of elements in pSurfaceFormats must be greater than or equal to the number of formats available. This is buggy because pSurfaceFormatsCount elements are later copied from the internal formats' array, so if pSurfaceFormatCount is greater, it will overflow it. On top of that, this assertion violates the spec. From the Vulkan 1.0 (revision 32, with KHR extensions), page 579 of the PDF: "If pSurfaceFormats is NULL, then the number of format pairs supported for the given surface is returned in pSurfaceFormatCount. Otherwise, pSurfaceFormatCount must point to a variable set by the user to the number of elements in the pSurfaceFormats array, and on return the variable is overwritten with the number of structures actually written to pSurfaceFormats. If the value of pSurfaceFormatCount is less than the number of format pairs supported, at most pSurfaceFormatCount structures will be written. If pSurfaceFormatCount is smaller than the number of format pairs supported for the given surface, VK_INCOMPLETE will be returned instead of VK_SUCCESS to indicate that not all the available values were returned." So, the correct behavior is: if pSurfaceFormatCount is greater than the internal number of formats, it is clamped to that many formats. But if it is lesser than that, then pSurfaceFormatCount elements are copied, and the call returns VK_INCOMPLETE. Reviewed-by: Dave Airlie <[email protected]>
* mesa: fix error handling in DrawBuffersTapani Pälli2016-10-251-34/+37
| | | | | | | | | | | | | | | | | | | | | | Patch rearranges error checking so that enum checking provided via destmask happens before other checks. It needs to be done in this order because other error checks do not work properly if there were invalid enums passed. Patch also refines one existing check and it's documentation to match GLES 3.0 spec (also in later specs). This was somewhat mysteriously referring to desktop GL but had a check for gles3. Fixes following dEQP tests: dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.draw_buffers no CI regressions observed. Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98134 Cc: "12.0 13.0" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: add check that eglCreateContext gets a valid configTapani Pälli2016-10-251-1/+3
| | | | | | | | | | | | | Fixes following dEQP test: dEQP-EGL.functional.negative_api.create_context v2: don't break EGL_KHR_no_config_context (Eric Engestrom) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Cc: "12.0 13.0" <[email protected]>
* mesa: add missing formats to driGLFormatToImageFormatTapani Pälli2016-10-251-0/+2
| | | | | | | | | | | Fixes following dEQP tests: dEQP-EGL.functional.image.api.create_image_gles2_tex2d_luminance dEQP-EGL.functional.image.api.create_image_gles2_tex2d_luminance_alpha Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98328
* egl: fix type mismatch error type in _eglInitSurfaceTapani Pälli2016-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EGL spec defines EGL_BAD_MATCH for windows, pixmaps and pbuffers in case where user creates a surface but config does not support rendering to such surface type. Following quotes are from EGL 1.5 spec 3.5 "Rendering Surfaces" : for eglCreatePlatformWindowSurface, eglCreateWindowSurface: "If config does not support rendering to windows (the EGL_SURFACE_TYPE attribute does not contain EGL_WINDOW_BIT ), an EGL_BAD_MATCH error is generated." for eglCreatePbufferSurface: "If config does not support pbuffers, an EGL_BAD_MATCH error is generated." for eglCreatePlatformPixmapSurface, eglCreatePixmapSurface: "If config does not support rendering to pixmaps (the EGL_SURFACE_TYPE attribute does not contain EGL_PIXMAP_BIT ), an EGL_BAD_MATCH error is generated." Fixes following dEQP test: dEQP-EGL.functional.negative_api.create_pbuffer_surface Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* Revert "egl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT"Tapani Pälli2016-10-251-2/+0
| | | | | | | | | | This reverts commit b1d636aa007c0c354a217024b4befe15cfb5149f, previous commit sets these values for all egl configs. Signed-off-by: Tapani Pälli <[email protected]> Cc: "12.0 13.0" <[email protected]> Suggested-by: Emil Velikov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/dri2: set max values for pbuffer width and heightTapani Pälli2016-10-251-0/+9
| | | | | | | | | | | | | | | | | | While these max values were previously fixed for pbuffer creation, this change makes also eglGetConfigAttrib() return correct values. Fixes following dEQP tests: dEQP-EGL.functional.create_surface.pbuffer.rgb888_no_depth_no_stencil dEQP-EGL.functional.create_surface.pbuffer.rgb888_depth_stencil dEQP-EGL.functional.create_surface.pbuffer.rgba8888_no_depth_no_stencil dEQP-EGL.functional.create_surface.pbuffer.rgba8888_depth_stencil Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98326 Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Cc: "12.0 13.0" <[email protected]>
* gallium/stapi: fix comment for st_visual::buffer_maskBrian Paul2016-10-241-1/+1
| | | | Trivial.
* isl/format: Correct ASTC entries of format info tableNanley Chery2016-10-241-28/+42
| | | | | | | | | With the isl_format_supports* helpers, we can now conveniently report support for this format on Cherry View. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92925 Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Drop nir_inputs from fs_visitor.Kenneth Graunke2016-10-241-1/+0
| | | | | | | | It's unused. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Don't use nir_assign_var_locations for VS/TES/GS outputs.Kenneth Graunke2016-10-245-62/+12
| | | | | | | | | | | Fixes spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3. v2: Remove nir_outputs field from fs_visitor (caught by Tim and Iago). Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Make split_virtual_grfs() call compact_virtual_grfs().Kenneth Graunke2016-10-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Post-splitting, VGRFs have a maximum size (MAX_VGRF_SIZE). This is required by the register allocator, as we have to create classes for each size of VGRF. We can (and do) allocate virtual registers larger than MAX_VGRF_SIZE, but we must ensure that they are splittable. split_virtual_grfs() asserts that the post-splitting register size is in range. Unfortunately, these trip for completely dead registers which are too large - we only set split points for live registers. So dead ones are never split, and if they happened to be too large, they'd trip asserts. To fix this, call compact_virtual_grfs() to eliminate dead registers before splitting. v2: Add a comment written by Iago. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Drop unnecessary switch statement in nir_setup_outputs()Kenneth Graunke2016-10-241-12/+3
| | | | | | | | | | TCS and FS are skipped above. CS has no output variables. All remaining cases take the same path. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* tgsi: trivial build fix for MSVCBrian Paul2016-10-241-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* nv50/ir: do not perform global membar for shared memorySamuel Pitoiset2016-10-241-1/+4
| | | | | | | | | | Shared memory is local to CTA, thus we should only wait for prior memory writes which are visible to other threads in the same CTA, and not at global level. This should speedup compute shaders which use shared memory. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* st/nine: Fix locking CubeTexture surfaces.Axel Davy2016-10-241-0/+1
| | | | | | | | | | Only one face of Cubetextures was locked when in DEFAULT Pool. Fixes: https://github.com/iXit/Mesa-3D/issues/129 CC: "12.0 13.0" <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix mistake in Volume9 UnlockBoxAxel Davy2016-10-241-1/+1
| | | | | | | | | In the format fallback path, the height was used instead of the depth. CC: "12.0 13.0" <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use align_calloc instead of align_mallocAxel Davy2016-10-245-7/+7
| | | | | | | | | | We are not sure exactly what needs to be 0 initialized, but we are missing some cases. 0 initialize all our current aligned allocation. Fixes Tree of Savior visual issues. Signed-off-by: Axel Davy <[email protected]>
* gallium/util: Add align_callocAxel Davy2016-10-241-0/+8
| | | | | | | | | | | Add implementation for align_calloc, which is align_malloc + memset. v2: add if (ptr) before memset. Fix indentation. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/nine: Fix leak with integer and boolean constantsAxel Davy2016-10-241-21/+18
| | | | | | | | | | | | | | | Leak introduced by: a83dce01284f220b1bf932774730e13fca6cdd20 The patch also moves the part to release changed.vs_const_i and changed.vs_const_b before the if (!cb.buffer_size) check, to avoid reuploading every draw call if integer or boolean constants are dirty, but the shaders use no constants. Signed-off-by: Axel Davy <[email protected]> CC: "13.0" <[email protected]>