summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nir: Delete most of the constant_initializer supportJason Ekstrand2016-12-055-146/+12
| | | | | | | | | | | Constant initializers have been a constant (ha!) pain for quite some time. While they're useful from a language perspective, people writing passes or backends really don't want deal with them most of the time. This commit removes most of the constant initializer support from NIR. It is expected that you call nir_lower_constant_initializers VERY EARLY to ensure that they're gone before you do anything interesting. Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir: Simplify nir_lower_gs_intrinsicsJason Ekstrand2016-12-051-21/+16
| | | | | | | It's only ever called on single-function shaders. At this point, there are a lot of helpers that can make it all much simpler. Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/lower_returns: Stop using constant initializersJason Ekstrand2016-12-051-4/+5
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* glsl/nir: Call nir_lower_constant_initializersJason Ekstrand2016-12-051-0/+2
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* anv/pipeline: Call nir_lower_constant_initializersJason Ekstrand2016-12-051-0/+13
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir: Add a pass for lowering away constant initializersJason Ekstrand2016-12-053-0/+115
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* Revert "i965: use nir_lower_indirect_derefs() for GLSL"Jason Ekstrand2016-12-053-10/+23
| | | | | This reverts commit 9404439a754e5640ccd98df40fa694835c0d8759. I didn't intend to push it and it breaks clip and cull distance.
* i965: Delete the meta-base CopyImageSubData implementationJason Ekstrand2016-12-054-328/+0
| | | | | | | | | | | | | | | | | | | When I originally implemented the ARB_copy_image extension, the fast-path was written in meta using texture views. This path only worked if both images were uncompressed color images. All of the other cases fell back to the blitter or, in the worst case, mapping and memcpy on the CPU. Now that we have the blorp path, it handles all copies ever and the old meta, blitter, and CPU paths are only used on gen5 and below. The primary reason why we needed the meta path (apart from having a slow blitter on later hardware) was to handle multisampling which gen5 and earlier don't support anyway. Since the blitter is reasonably fast on gen5, we can just delete the meta path and get rid of all that terrible code. If we decide that we're ok with just disabling ARB_copy_image on gen5 and earlier (I personally am), then we could get rid of another 300 lines or so of semi-hairy code. Reviewed-by: Anuj Phogat <[email protected]>
* i965/copy_image: Re-implement the blitter path with emit_miptree_blitJason Ekstrand2016-12-053-97/+80
| | | | | | | | | | By using emit_miptree_blit which does chunking, this fixes the blitter path for the case where the image is too tall to blit normally. We also pull it into intel_blit as intel_miptree_copy. This matches the naming of the blorp blit and copy functions brw_blorp_blit and brw_blorp_copy. Reviewed-by: Anuj Phogat <[email protected]> Cc: "13.0" <[email protected]>
* i965/blit: Break the guts of intel_miptree_blit into a helperJason Ekstrand2016-12-051-67/+84
| | | | | Reviewed-by: Anuj Phogat <[email protected]> Cc: "13.0" <[email protected]>
* i965: use nir_lower_indirect_derefs() for GLSLTimothy Arceri2016-12-053-23/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the nir_lower_indirect_derefs() call into brw_preprocess_nir() so thats is called by both OpenGL and Vulkan and removes that call to the old GLSL IR pass lower_variable_index_to_cond_assign() We want to do this pass in nir to be able to move loop unrolling to nir. There is a increase of 1-3 instructions in a small number of shaders, and 2 Kerbal Space program shaders that increase by 32 instructions. Shader-db results BDW: total instructions in shared programs: 8705873 -> 8706194 (0.00%) instructions in affected programs: 32515 -> 32836 (0.99%) helped: 3 HURT: 79 total cycles in shared programs: 74618120 -> 74583476 (-0.05%) cycles in affected programs: 528104 -> 493460 (-6.56%) helped: 47 HURT: 37 LOST: 2 GAINED: 0
* swr: mark PIPE_CAP_NATIVE_FENCE_FD unsupportedTim Rowley2016-12-051-0/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr: include llvm version and vector width in renderer stringTim Rowley2016-12-051-1/+11
| | | | | | Uses llvmpipe's string formating. Reviewed-by: Bruce Cherniak <[email protected]>
* gallivm: use getHostCPUFeatures on x86/llvm-4.0+.Tim Rowley2016-12-051-0/+15
| | | | | | | Use llvm provided API based on cpuid rather than our own manually mantained list of mattr enabling/disabling. Reviewed-by: Roland Scheidegger <[email protected]>
* st/va: declare vlVaBuffer before vlVaContextJuan A. Suarez Romero2016-12-051-15/+15
| | | | | | | | | | And declare coded_buf in vlVaContext as "vlVaBuffer *" instead of "struct vlVaBuffer *". This fixes several warnings later about assignment from incompatible pointer type. Reviewed-by: Emil Velikov <[email protected]>
* st/va: remove unused variable pbuffJuan A. Suarez Romero2016-12-051-1/+0
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Elie Tournier <[email protected]>
* st/va: automake: cleanup C{PP,}FLAGSEmil Velikov2016-12-051-12/+0
| | | | | | | | Remove some transitional left overs from the gallium pipe-loader rework and kill off unneeded AM_CPPFLAGS. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]>
* configure.ac: Move llvm_set_environment_variables higher.Tobias Droste2016-12-0511-11/+11
| | | | | | | | | | | | | | | | This moves the function to get the LLVM environment variables higher in the file. It still needs to be below the "--enable-opencl" because it uses $enable_opencl. It can be called without condition now as it only throws errors if openCL is enabled. v5: HAVE_MESA_LLVM is only used for gallium. Rename it to HAVE_GALLIUM_LLVM. In order to only link LLVM when it is needed, HAVE_GALLIUM_LLVM is only set if "$enable-gallium-llvm" is yes. Signed-off-by: Tobias Droste <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/va: fix gop size for rate controlBoyuan Zhang2016-12-052-6/+14
| | | | | | | | | | | | | The gop_size in rate control is the budget window for internal rate control calculation, and shouldn't always equal to idr period. Define a coefficient to let budget window contains a number of idr period for proper rate control calculation. Adjust the number of i/p frame remaining accordingly. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98005 Signed-off-by: Boyuan Zhang <[email protected]> Acked-by: Christian König <[email protected]>
* st/va: force to submit two consecutive single jobsBoyuan Zhang2016-12-053-7/+27
| | | | | | | | | | | | | | | The gop_size in rate control is the budget window for internal rate control calculation, and shouldn't always equal to idr period. Define a coefficient to let budget window contains a number of idr period for proper rate control calculation. Adjust the number of i/p frame remaining accordingly. v2: fixed regression issues introduced by previous version Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98005 Signed-off-by: Boyuan Zhang <[email protected]> Acked-by: Christian König <[email protected]>
* st/vdpau: fix compiler warning in vlVdpVideoMixerRenderNayan Deshmukh2016-12-051-1/+1
| | | | | Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]>
* i965: Release aux buffer when disabling ccsTopi Pohjolainen2016-12-051-0/+3
| | | | | | | | Otherwise subsequent render cycles keep on using compression and/or fast clear. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* ac/nir: Only use the first component for SSBO atomics.Bas Nieuwenhuizen2016-12-051-2/+2
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: fix another regression since shadow fixes.Dave Airlie2016-12-051-1/+1
| | | | | | | | This fixes: dEQP-VK.glsl.texture_gather.basic.2d.depth32f.* Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* spirv: Builtin Layer is an input for fragment shadersIago Toral Quiroga2016-12-031-1/+6
| | | | | | | This change makes it so we emit a load_input intrinsic when Layer is read in a fragment shader. Reviewed-by: Jason Ekstrand <[email protected]>
* swr: Fix active_queries countBruce Cherniak2016-12-021-6/+7
| | | | | | | The active_query count was incorrect for query types that don't require a begin_query. Removed the unnecessary assert. Reviewed-by: Tim Rowley <[email protected]>
* swr: Fix type to match parameters of std::max()George Kyriazis2016-12-021-7/+7
| | | | | | Include propagation of comparisons further down. Reviewed-by: Tim Rowley <[email protected]>
* swr: [rasterizer jitter] include cstdarg in builder_misc.cppTim Rowley2016-12-021-1/+2
| | | | | | | | Fixes build problem with llvm-svn. v2: use cstdarg instead of stdarg.h Reviewed-by: Bruce Cherniak <[email protected]>
* nir: Get rid of nir_constant_dataJason Ekstrand2016-12-027-105/+98
| | | | | | | | This has bothered me for about as long as NIR has been around. Why do we have two different unions for constants? No good reason other than one of them is a direct port from GLSL IR. Reviewed-by: Iago Toral Quiroga <[email protected]>
* Revert "st/mesa: get Version from gl_program rather than gl_shader_program"Timothy Arceri2016-12-021-1/+4
| | | | | | | This reverts commit 6bf63b011992dbbc899a28bde5692070dbcf965a. A patch that adds a reference to gl_shader_program_data to gl_program needs to land befor this one.
* st/mesa: get Version from gl_program rather than gl_shader_programTimothy Arceri2016-12-021-4/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa/glsl: move Version to gl_shader_program_dataTimothy Arceri2016-12-026-21/+27
| | | | | | | | | | | This is mostly just used during linking however the st uses it when updating textures. In order to store gl_program in the CurrentProgram array rather than gl_shader_program we need to move this field to the shared gl_shader_program_data struct. Reviewed-by: Nicolai Hähnle <[email protected]>
* freedreno: no-op render when we need a fenceRob Clark2016-12-013-7/+40
| | | | | | | | | If app tries to create a fence but there is no rendering to submit, we need a dummy/no-op submit. Use a string-marker for the purpose.. mostly since it avoids needing to realize that the packet format changes in later gen's (so one less place to fixup for a5xx). Signed-off-by: Rob Clark <[email protected]>
* freedreno: native fence fd supportRob Clark2016-12-017-8/+69
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: some fence cleanupRob Clark2016-12-019-27/+23
| | | | | | | | Prep-work for next patch, mostly move to tracking last_fence as a pipe_fence_handle (created now only in fd_gmem_render_tiles()), and a bit of superficial renaming. Signed-off-by: Rob Clark <[email protected]>
* gallium: support for native fence fd'sRob Clark2016-12-0118-2/+91
| | | | | | | This enables gallium support for EGL_ANDROID_native_fence_sync, for drivers which support PIPE_CAP_NATIVE_FENCE_FD. Signed-off-by: Rob Clark <[email protected]>
* gallium: wire up server_wait_syncRob Clark2016-12-012-1/+11
| | | | | | | | This will be needed for explicit synchronization with devices outside the gpu, ie. EGL_ANDROID_native_fence_sync. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: add EGL_ANDROID_native_fence_syncRob Clark2016-12-017-7/+119
| | | | | | | | | | With fixes from Chad squashed in, plus fixes for issues that Rafael found while writing piglit tests. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* egl: un-fallthrough sync attr parsingRob Clark2016-12-011-3/+3
| | | | | | | | | | Doesn't work so well when you start having more than one possible attrib. Prep-work for next patch. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* egl: initialize SyncCondition after attr parsingRob Clark2016-12-011-1/+2
| | | | | | | | | | | Reduce the noise in the next patch. For EGL_SYNC_NATIVE_FENCE_ANDROID the sync condition is conditional on EGL_SYNC_NATIVE_FENCE_FD_ANDROID attribute. Signed-off-by: Rob Clark <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* tgsi: store writes_primid when scanning tgsiTim Rowley2016-12-012-0/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: only verify that enabled arrays have backing buffersIlia Mirkin2016-12-011-1/+1
| | | | | | | | | | | | We were previously also verifying that no backing buffers were available when an array wasn't enabled. This is has no basis in the spec, and it causes GLupeN64 to fail as a result. Fixes: c2e146f487 ("mesa: error out in indirect draw when vertex bindings mismatch") Cc: [email protected] Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* vc4: Avoid false scheduling dependencies for LOAD_IMMs.Eric Anholt2016-11-302-0/+9
| | | | | | | | | | Noticed in shaders with branching, where we ended up scheduling delay slots near the start of a block for the uniforms reset setup. total instructions in shared programs: 93970 -> 93951 (-0.02%) instructions in affected programs: 3117 -> 3098 (-0.61%) 3DMMES performance +0.423087% +/- 0.133521% (n=9,10)
* vc4: Try to schedule QIR instructions between writing to and reading math.Eric Anholt2016-11-301-0/+22
| | | | | | | | | This helps us get the delay slots between SFU writes and reads filled. total instructions in shared programs: 94494 -> 93970 (-0.55%) instructions in affected programs: 59206 -> 58682 (-0.89%) 3DMMES performance +1.89967% +/- 0.157611% (n=10,9)
* vc4: Improve interleaving of texture coordinates vs results.Eric Anholt2016-11-301-3/+3
| | | | | | | | | | | | | | | | | | | | The latency_between was trying to handle the delay between the coordinate write ("before") and the corresponding sample read ("after"), but we were handing in the two instructions swapped. This meant that we tried to fit things between a tex_s and its *preceding* tex_result. This made us only interleave normal texture coordinates by accident, and pessimized UBO reads by pushing the tex_result collection earlier until there was nothing but it (and then its preceding coordinate setup) left. In addition to latency reduction, things end up packing better (probably due to reduced live ranges of the texture results): total instructions in shared programs: 98121 -> 94775 (-3.41%) instructions in affected programs: 91196 -> 87850 (-3.67%) 3DMMES performance +1.15569% +/- 0.124714% (n=8,10)
* vc4: Fix stray "." on no-op MUL packs.Eric Anholt2016-11-301-6/+6
| | | | | This happened when the PM bit was set for R4 unpacks, where the MUL pack was NOP.
* vc4: Allow merging instructions with SF set where the other writes NOP.Eric Anholt2016-11-301-0/+1
| | | | | | | | | | | | | I'm not sure how I managed to write the SF merge code (7d8b79f398f18ed7bb48a74b1b82950e2f08abad) without allowing merges with NOPs. *Everything* we try to merge with will have a NOP on one or the other side of the instruction, and that's why that commit showed no benefit. total instructions in shared programs: 99347 -> 95128 (-4.25%) instructions in affected programs: 91906 -> 87687 (-4.59%) 3DMMES performance +2.57105% +/- 0.135276% (n=6,8)
* vc4: In a loop break/continue, jump if everyone has taken the path.Eric Anholt2016-11-301-10/+17
| | | | | | | | | | | | | | | | | This should be a win for most loops, which tend to have uniform control flow. More importantly, it exposes important information to live variables: that the break/continue here means that our jump target may have access to values that were live on our input. Previously, we were just setting the exec mask and letting control flow fall through, so an intervening def between the break and the end of the loop would appear to live variables as if it screened off the variable, when it didn't actually. Fixes a regression in glsl-vs-loop-redundant-condition.shader_test when a perturbing of register allocation caused a live variable to get stomped. Cc: 13.0 <[email protected]>
* anv: expose support for VK_KHR_sampler_mirror_clamp_to_edgeIlia Mirkin2016-11-301-0/+4
| | | | | | | This is already supported in genX_state.c, expose the extension string. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/cmd_buffer: Actually use the stencil dimensionJason Ekstrand2016-11-301-1/+1
| | | | | | | | In an attempt to fix 3DSTATE_DEPTH_BUFFER for stencil-only cases, I accidentally kept setting the SurfaceType to 2D in the stencil-only case thanks to a copy+paste error. Reviewed-by: Nanley Chery <[email protected]>