summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* svga: set rendered-to flag after updating the texture using PredCopyRegionCharmaine Lee2016-11-031-0/+4
| | | | | | | | | | This patch sets the rendered-to flag for the subresource after it is updated using the PredCopyRegion command. This is to ensure that the GB surface will be sync up properly before it will be directly mapped to. Tested with MTT piglit, glretrace. Reviewed-by: Brian Paul <[email protected]>
* svga: add can_use_upload flagCharmaine Lee2016-11-032-31/+37
| | | | | | | | | This patch adds a flag "can_use_upload" to svga_texture structure to avoid some checking of the upload availability at each transfer map time. Tested with Lightsmark2008, Tropics, MTT glretrace, piglit. Reviewed-by: Brian Paul <[email protected]>
* svga: fix texture upload path conditionCharmaine Lee2016-11-031-30/+60
| | | | | | | | | | | | As Thomas suggested, we'll first try to map directly to a GB surface. If it is blocked, then we'll use texture upload buffer. Also if a texture is already "rendered to", that is, the GB surface is already out of sync, then we'll use the texture upload buffer to avoid syncing the GB surface. Tested with Lightsmark2008, Tropics, MTT piglit, glretrace. Reviewed-by: Brian Paul <[email protected]>
* svga: set rendered_to flag with texture uploaded using TransferFromBuffer ↵Charmaine Lee2016-11-031-0/+4
| | | | | | | | | | | | command This patch sets the rendered_to flag for the texture subresource that is uploaded using the TransferFromBuffer command. This is to ensure that the subresource will be read back or invalidated before it will be directly mapped to. This makes sure that the content of the GB surface will not be accidentally overwritten by the device at suspend/resume time. Reviewed-by: Brian Paul <[email protected]>
* svga: Add render_condition boolean flag in struct svga_contextNeha Bhende2016-11-033-1/+6
| | | | | | | | | | | | | | set render_condition flag when driver performs conditional rendering. Blit using DXPredCopyRegion command gets affected by conditional rendering so We should check this flag while performing blit operation Tested with piglit tests. v2: As per Charmaine's comment, setting render_condition flag if svga_query is valid. Tested with pigit tests. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: Allow DXPredCopyRegion for depth_and_stencil formats.Neha Bhende2016-11-031-4/+5
| | | | | | | | | | | | | | | DXPredCopyRegion supports copy between src and dst for depth_and_stencil formats if src and dst have same formats. tested ith piglit v2: As per Brian's comment, allow DXPredCopyRegion for depth+stencil buffers if the blit mask is PIPE_MASK_ZS. Tested with piglit tests and added new piglit test arb_framebuffer_object-depth-stencil-blit to test this particular testcase. Reviewed-by: Brian Paul <[email protected]>
* svga: fix memory leak in svga_clear_texture()Neha Bhende2016-11-031-2/+7
| | | | | | | | | | | Piglit tests which uses arb_clear_texture extension, have memory leak issue. pipe_surface created in svga_clear_texture() was not deleted which happens to be the cause for memory leak. tested all arb_clear_texture-* piglit tests with valgrid. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: Implement the pipe clear_render_target functionality v2Thomas Hellstrom2016-11-034-1/+138
| | | | | | | | | | | v2: Accounted for the fact that svga_try_clear_render_target also honors conditional rendering. Testing done: Excercised all functions in a separate feature branch. Forced emission of conditional rendering commands when necessary. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: add SVGA_3D_CMD_INVALIDATE_GB_SURFACE supportCharmaine Lee2016-11-032-0/+22
| | | | | | This command will be used in a subsequent patch to invalidate a surface. Reviewed-by: Brian Paul <[email protected]>
* nir: Flip gl_SamplePosition in nir_lower_wpos_ytransform().Francisco Jerez2016-11-031-0/+24
| | | | | | | | | | | | | | | | | | Assuming the hardware is set up to use a screen coordinate system flipped vertically with respect to the GL's window coordinate system, the SYSTEM_VALUE_SAMPLE_POS vector will also be flipped vertically with respect to the value expected by the GL, so we need to give it the same treatment as gl_FragCoord. Fixes the following CTS tests on i965: ES31-CTS.functional.shaders.multisample_interpolation.interpolate_at_offset.at_sample_position.default_framebuffer ES31-CTS.functional.shaders.sample_variables.sample_pos.correctness.default_framebuffer when run with any multisample configuration, e.g. rgba8888d24s8ms4. Cc: <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* isl: Only allow Y-tiling for ASTC texturesNanley Chery2016-11-031-0/+6
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/blorp: Don't create linear ASTC surfaces for buffersNanley Chery2016-11-031-0/+16
| | | | | | | | Such a surface is not possible on our hardware. Without this change, ISL surface creation would fail with the next patch. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/formats: Disallow linear ASTC texturesNanley Chery2016-11-031-0/+4
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/formats: Disallow 1D compressed texturesNanley Chery2016-11-031-0/+11
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Use rzalloc for cfg_tChris Wilson2016-11-031-1/+1
| | | | | | | | | Valgrind reports that we use cfg.cycle_count uninitialised, so zero the cfg_t on construction. Fixes: 52d2b28f7f10 ("ralloc: use rzalloc where it's necessary") Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* pipe-loader: add libamd_common for radeonsiNicolai Hähnle2016-11-031-0/+1
| | | | | | | | | This fixes a build regression of commit 7115e56c21ace07cf04f5073ba73a533e2182099. Sorry for the breakage, this second location for link dependencies escaped my build tests. Bugzilla: https://patchwork.freedesktop.org/patch/119816/ Tested-by: Dieter Nützel <[email protected]>
* glx/windows: Add wgl.h to the sources listAndreas Boll2016-11-031-1/+2
| | | | | | | | | | Otherwise it won't be picked in the tarball and the build will fail. Fixes: 533b3530c12 ("direct-to-native-GL for GLX clients on Cygwin ("Windows-DRI")") Cc: "13.0" <[email protected]> Signed-off-by: Andreas Boll <[email protected]> Reviewed-by: Jon Turney <[email protected]>
* i965: use rzalloc instead of calloc in brwNewProgramTapani Pälli2016-11-031-1/+1
| | | | | | | | | | | commit cc6aa1d161280f10ded7834d1ec2413bc97589fe changed to using rzalloc for gl_program creation but one instance for program creation was still using calloc. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Juan A. Suarez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radeonsi: generate GS prolog to (partially) fix triangle strip adjacency ↵Nicolai Hähnle2016-11-036-4/+149
| | | | | | | | | | | | | | | | | | | | rotation Fixes GL45-CTS.geometry_shader.adjacency.adjacency_indiced_triangle_strip and others. This leaves the case of triangle strips with adjacency and primitive restarts open. It seems that the only thing that cares about that is a piglit test. Fixing this efficiently would be really involved, and I don't want to use the hammer of degrading to software handling of indices because there may well be software that uses this draw mode (without caring about the precise rotation of triangles). v2: - skip the GS prolog entirely if workaround is not needed - only check for TES (TES is always non-null when tessellation is used) Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: remove si_shader_context::is_gs_copy_shaderNicolai Hähnle2016-11-032-8/+4
| | | | | | It has become redundant. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: make the GS copy shader owned by the GS selectorNicolai Hähnle2016-11-034-20/+31
| | | | | | | The copy shader only depends on the selector. This change avoids creating separate code paths for monolithic vs. non-monolithic geometry shaders. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: si_shader_vs only depends on the GS selectorNicolai Hähnle2016-11-031-2/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: si_vgt_gs_mode only depends on the selectorNicolai Hähnle2016-11-031-3/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: make si_generate_gs_copy_shader usable as a standalone functionNicolai Hähnle2016-11-031-36/+43
| | | | | | It really only depends on the shader selector. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: unify the si_compile_* functions for prologs and epilogsNicolai Hähnle2016-11-031-178/+61
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: get rid of no_{prolog,epilog}Nicolai Hähnle2016-11-032-153/+80
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: get rid of si_llvm_emit_fs_epilogueNicolai Hähnle2016-11-031-96/+1
| | | | | | It is no longer used. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: get rid of get_interp_paramNicolai Hähnle2016-11-031-52/+2
| | | | | | Replace by a simple LLVMGetParam, since ctx->no_prolog is always false. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: get rid of select_interp_paramNicolai Hähnle2016-11-031-41/+0
| | | | | | The condition !ctx->no_prolog is now always true. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use TCS epilog for monolithic shadersNicolai Hähnle2016-11-031-1/+21
| | | | | | | For fixed function TCS, we keep the copying of VS outputs to TES inputs inside the main function; the call to si_copy_tcs_inputs is moved accordingly. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: extract si_build_tcs_epilog_functionNicolai Hähnle2016-11-031-33/+46
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use VS epilog for monolithic TESNicolai Hähnle2016-11-031-0/+13
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use VS prolog and epilog for monolithic shadersNicolai Hähnle2016-11-031-2/+33
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: extract si_build_vs_{prolog,epilog}_functionNicolai Hähnle2016-11-031-67/+115
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use PS prolog for monolithic shadersNicolai Hähnle2016-11-031-10/+32
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: set num_input_vgprs for fragment shaders in create_functionNicolai Hähnle2016-11-031-6/+11
| | | | | | | So that the prolog generated for monolithic fragment shaders will have the right signature. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: extract si_build_ps_prolog_functionNicolai Hähnle2016-11-031-139/+171
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use PS epilog for monolithic shadersNicolai Hähnle2016-11-031-0/+207
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: extract si_build_ps_epilog_functionNicolai Hähnle2016-11-031-35/+60
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: pass the function name to si_llvm_create_funcNicolai Hähnle2016-11-033-8/+11
| | | | | | | We will use multiple functions in one module, so they should have different names. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: split is_monolithic into no_prolog and no_epilogNicolai Hähnle2016-11-032-17/+33
| | | | | | | | | | This helps to achieve a gradual transition towards building monolithic shaders via inlining. no_prolog and no_epilog will be removed by the end of the series, separate_prolog remains in use to control the PS input mapping. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: free data structures when shader compiles failNicolai Hähnle2016-11-031-11/+11
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: move main TGSI translation into its own functionNicolai Hähnle2016-11-031-45/+58
| | | | | | | The idea is that adding prolog and epilog code will be pulled out into the caller. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add always-inline pass to si_llvm_finalize_moduleNicolai Hähnle2016-11-031-5/+5
| | | | | | | Change the pass manager as well, since this is a module-level pass. No noticeable run-time difference on shader-db. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix signature of export intrinsic in VS epilogNicolai Hähnle2016-11-031-3/+3
| | | | | | | The incompatible signature becomes an issue when the VS epilog gets merged with the main vertex shader at the IR level. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: link against amd_commonNicolai Hähnle2016-11-031-0/+1
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/common: add ac_is_sgpr_param helperNicolai Hähnle2016-11-032-0/+12
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/common: build also for gallium driversNicolai Hähnle2016-11-033-2/+13
| | | | | | | | At least when LLVM is used, which is basically always (unless you're only building r600 without OpenCL). Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/common: move llvm helper prototype to ac_llvm_util.hNicolai Hähnle2016-11-034-7/+13
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: fix lowering of UBO references of named blocksNicolai Hähnle2016-11-031-5/+5
| | | | | | | | | | | | | | When a UBO reference has the form block_name.foo where block_name refers to a block where the first member has a non-zero offset, the base offset was incorrectly added to the reference. Fixes an assertion triggered in debug builds by GL45-CTS.enhanced_layouts.uniform_block_layout_qualifier_conflict. That test doesn't properly check for correct execution in this case, so I am also going to send out a piglit test. Cc: 13.0 <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>