summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: remove struct st_tracked_stateMarek Olšák2017-05-0822-398/+118
| | | | | | | | | It contains only one member: the update function. Let's use the update function directly. Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: split per-patch from per-vertex indicesNicolai Hähnle2017-05-083-21/+42
| | | | | | | Make it a bit clearer that the index spaces are logically seperate by having them defined in different functions. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: clarify documentation of existing SI workaroundNicolai Hähnle2017-05-081-1/+3
| | | | | | | Limiting LS-HS to a single wave is required on all SI chips due to an issue with a power management feature. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix gl_PrimitiveID in tessellation with instanced draws on SINicolai Hähnle2017-05-081-0/+14
| | | | | Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: load patch_id for TES-as-ES when exporting for PSNicolai Hähnle2017-05-081-2/+2
| | | | | | | For some reason, this change is only necessary on SI. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix primitive ID in fragment shader when using tessellationNicolai Hähnle2017-05-081-10/+17
| | | | | | | | | | | In a VS->TCS->TES->PS pipeline, the primitive ID is read from TES exports, so it is as if TES were using the primitive ID. Specifically, this fixes a bug where the primitive ID is not reset at the start of a new instance. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: mark fast-cleared textures as compressed when dirtyingNicolai Hähnle2017-05-081-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | There are a bunch of piglit fast clear tests that regressed on SI, for example ./bin/ext_framebuffer_multisample-fast-clear single-sample. The problem is that a texture is bound as a framebuffer, cleared, and then rendered from in a loop that loops through different clear colors. The texture is never rebound during all this, so the change to tex->dirty_level_mask during fast clear was not taken into account when checking for compressed textures. I have considered simply reverting the problematic commit. However, I think this solution is better. It does require looping through all bound textures after a fast clear, but the alternative would require visiting more textures needless on every draw. Draws are much more common than clears. Note that the rendering feedback loop rules do not apply here, because the framebuffer binding is changed between the glClear and the draw that samples from the texture that was cleared. Fixes: bdd644976952 ("radeonsi: don't mark non-dirty textures with CMASK as compressed") Cc: 17.1 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: use designated initializersEmil Velikov2017-05-081-8/+7
| | | | | | | | All the compilers used to build Mesa support them. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: drop unneeded sentinel from level_strings[]Emil Velikov2017-05-081-2/+2
| | | | | | | | | | The array is local so we already know its size. v2: Correct loop condition (Bartosz) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove suprous header eglcompiler.hEmil Velikov2017-05-087-52/+4
| | | | | | | | | The header is used only to provide STATIC_ASSERT. The latter is already available in utils/macros.h so use that instead and kill of the header. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove unneeded else statement in _eglInitLoggerEmil Velikov2017-05-081-3/+0
| | | | | | | | | The variable level is already initialized to -1 which is already interpreted as FALLBACK_LOG_LEVEL. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove no longer needed logger infraEmil Velikov2017-05-082-49/+6
| | | | | | | | | | As of last commit nobody requires anything else but the _eglDefaultLogger(). As such use it directly and simplify the implementation. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: fold Android logger into main/Emil Velikov2017-05-083-35/+36
| | | | | | | | Will allow us to greatly simplify a lot of the code in egllog.c Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove unused _eglSetLogLevel()Emil Velikov2017-05-082-25/+0
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* glsl: apply the image format for members of structuresSamuel Pitoiset2017-05-081-8/+29
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: store the image format in glsl_struct_fieldSamuel Pitoiset2017-05-083-1/+11
| | | | | | | | ARB_bindless_texture allows to declare image types inside structures, which means we need to keep track of the format. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: don't use rzalloc_array() when it's unnecessarySamuel Pitoiset2017-05-081-6/+6
| | | | | | | | When the arrays are initialized later on with -1, that's useless to use rzalloc_array(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv: check return value of anv_execbuf_add_boLionel Landwerlin2017-05-081-2/+7
| | | | | | | CID: 1405919 (Error handling issues) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* anv: avoid null pointer dereferenceLionel Landwerlin2017-05-081-1/+2
| | | | | | | | | The application might not give an output structure. CID: 1405765 (Null pointer dereferences) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* egl: avoid dereferencing a null displayEric Engestrom2017-05-081-1/+3
| | | | | | Fixes: ddb99127a6f6c ("egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attribute") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965: Update gen6_depth_stencil_state to use genX macro.Rafael Antognolli2017-05-071-1/+1
| | | | | | | | | While moving depth stencil state to use genxml, this one was left behind. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move MOCS macros to brw_state.h.Rafael Antognolli2017-05-072-42/+42
| | | | | | | | brw_state.h is a better place to keep them, instead of brw_context.h. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* i965: Don't try to unmap NULL program cache BO.Kenneth Graunke2017-05-071-4/+7
| | | | | | | | | | | | | | | | When running shader-db with intel_stub and recent Mesa, context creation fails when making a logical hardware context. In this case, we call intelDestroyContext(), which gets here and tries to unmap the cache BO. But there isn't one - we haven't made it yet. So we try to unmap a NULL pointer, which used to be safe (it did nothing), but crashes after commit 7c3b8ed87859bfdfb985d21685115a729f9cd138. The result is that we crash rather than failing context creation with a nice message. Either way nothing works, but this is more polite. Cc: "17.1" <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* Revert "mesa: Require mipmap completeness for glCopyImageSubData(), sometimes."Kenneth Graunke2017-05-071-23/+2
| | | | | | | | | | | | | | | | | | This reverts commit c5bf7cb52942cb7df9f5d73746ffbf3c102d12cc. This broke rendering in "Total War: WARHAMMER", which uses a single level RGBA_UINT32 texture and the default filter modes of GL_LINEAR and GL_NEAREST_MIPMAP_LINEAR. However, the texture max level is 0, so it is actually mipmap complete - it's the integer + linear rule that causes the error. I'm working with Khronos to find a real solution. However it turns out, this patch is not correct and breaks real programs, so let's revert it for now. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100690 Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224 Cc: "17.1" <[email protected]>
* glsl: destroy function and subroutine hash tablesGrazvydas Ignotas2017-05-081-0/+10
| | | | | | | | | Just like other type hash tables are destroyed in _mesa_glsl_release_types(), also destroy the ones for function and subroutine types. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radv: fix regression in blit2d push constant change.Dave Airlie2017-05-081-1/+1
| | | | | | | | | These were being fed to the shader as floats via the vertex path, so also push them as floats here. This fixes missing overlay in Sascha Willems demos. Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: cleanup some unused code pathDave Airlie2017-05-082-34/+1
| | | | | | | | After moving everything to using push constants, these paths are no longer needed. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: port blit to using push constantsDave Airlie2017-05-081-100/+65
| | | | | | | Remove use of vertex buffer. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: move blit2d to using push constantsDave Airlie2017-05-082-75/+59
| | | | | | | This allows us to drop the vertex buffer. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: move clear color to using push constantsDave Airlie2017-05-082-130/+78
| | | | | | | | | | | | The color clear value is uniform and needs only to be emitted from the frag shader, so just push it down via a push constant, and remove the vertex buffer completely. The depth clear value needs to be emitted from the vertex shader, but is only a single value. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: use novertex save path for resolve pass.Dave Airlie2017-05-082-2/+2
| | | | | | | This was missing in the original change. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: set base/ranges for push constant loads.Dave Airlie2017-05-086-0/+26
| | | | | | | | | This isn't necessary yet but I'd like to use the range in some future patches. [airlied: add new resolve pass] Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: drop resolve hack workaroundsDave Airlie2017-05-073-104/+1
| | | | | | | | | This drops the resolve workarounds that change an image tiling mode behinds it's back, this is horrible and breaks the image_view->image relationship. Remove all this. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: select resolve pathsDave Airlie2017-05-071-8/+50
| | | | | | | | | | | | | | | | There are 3 resolve paths, the fastest being the hw resolver but it has restriction on tile modes and can't do subresolves, the compute resolver is next speed wise, but can't handle DCC destinations, the fragment resolver handles that case. This will end up with a slow down as currently we hack the hw resolver paths when they shouldn't work, but we shouldn't keep doing that. The next patch removes the hacks. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: add resolve pass using fragment/vertex shadersDave Airlie2017-05-076-2/+699
| | | | | | | | | | | In order to resolve into DCC enabled dests we need to use the fragment shader. This reuses the code from the compute path and implements a resolve path in vertex/fragment shader. This code isn't used until later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add subpass resolve compute pathDave Airlie2017-05-072-0/+94
| | | | | | | | | | This adds a path to allow compute resolves to be used for subpass resolves. This isn't used yet, but will be later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/resolve: split resolve emission out for computeDave Airlie2017-05-071-63/+78
| | | | | | | This will allow to add a subpass compute resolve path. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: split out core part of resolve shaderDave Airlie2017-05-073-113/+140
| | | | | | | | I want to reuse the same code for the fragment shader version of the resolve shaders. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: add srgb conversion to end of resolve shader.Dave Airlie2017-05-073-5/+61
| | | | | | | | | | | If we are resolving into an srgb dest, we need to convert to linear so the store does the conversion back. This should fix some wierdness seen when we subresolves hit the compute path. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nir: Fix missing snprintf symbol on Windows.Jose Fonseca2017-05-071-0/+4
| | | | | | | | | | Copy nir_print.c's snprintf definition for now, to unbreak Windows builds. We can and should cleanup all snprintf definitions in a follow up change, but I rather not leave Windows build broken any further. Trivial.
* nv50/ir: Replace NV50_PROGRAM_IR_* by PIPE_SHADER_IR_*Pierre Moreau2017-05-075-10/+7
| | | | | Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Remove unused translation methodsPierre Moreau2017-05-072-10/+3
| | | | | | | This code was merged commented out, and has stayed that way ever since. Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Free target if we failed to create a programPierre Moreau2017-05-071-1/+3
| | | | | Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Fail if encountering unknown shader typePierre Moreau2017-05-071-2/+2
| | | | | Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* radv: set PERF_MOD in sample state like radeonsi.Dave Airlie2017-05-071-1/+2
| | | | | | | This just aligns the code with radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: apply the tess+GS hang workaround to Polaris12 as wellDave Airlie2017-05-071-1/+2
| | | | | | | | | As I pointed out for radeonsi, and AMD confirmed, so fix this in radv as well. Cc: "17.1" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: small texture targetIndex tidy upTimothy Arceri2017-05-071-5/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix broken indentationTimothy Arceri2017-05-071-7/+6
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: some C99 tidy upsTimothy Arceri2017-05-071-24/+10
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: add KHR_no_error support to copy buffer subdata functionsTimothy Arceri2017-05-074-3/+43
| | | | Reviewed-by: Eric Anholt <[email protected]>