aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* panfrost: Describe thread local storage sizing rulesAlyssa Rosenzweig2019-12-123-1/+82
| | | | | | Deeply nested powers-of-two, basically :-) Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Fix shift for TLS accessAlyssa Rosenzweig2019-12-121-2/+18
| | | | | | | Due to this issue we were using 4x the memory we should have for TLS, which was messing up the size calculations. Oops! Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Simplify and fix vector copypropAlyssa Rosenzweig2019-12-121-14/+5
| | | | | | | | | | | Fixes a regression in QuakeSpasm. See https://gitlab.freedesktop.org/mesa/mesa/issues/2169 for apitrace. Closes #2169 Fixes: f72873e6aa0 ("pan/midgard: Copypropagate vector creation") Signed-off-by: Alyssa Rosenzweig <[email protected]> Reported-by: Icecream95
* pan/midgard: Don't try to free NULL in LCRAAlyssa Rosenzweig2019-12-121-0/+3
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: 12e393bacf0 ("panfrost: add lcra_free() to free lcra state")
* pan/midgard: Force alignment for csel_vAlyssa Rosenzweig2019-12-121-0/+8
| | | | | | | | | | | | The swizzle on the conditional gets lost. Fixes "horizontal mirroring" in godot. See https://gitlab.freedesktop.org/mesa/mesa/issues/2108 which has attached apitrace. Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: d3b3daa9d3f ("pan/midgard: Use new scheduler") Reported-by: Icecream95
* pan/midgard: Don't use no_spill for memory spill srcAlyssa Rosenzweig2019-12-121-2/+4
| | | | | | | | I'm not totally sure why this would *break* things, but it's certainly not necessary and it does break things. Somehow this gives the RA more freedom, fixing some spill issues. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Use no_spill bitmaskAlyssa Rosenzweig2019-12-122-15/+16
| | | | | | | | We would like no_spill decisions to be class-specific -- spilling from special register to a work register doesn't preclude also spilling that work register to stack. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Dynamically allocate r26/27 for spillsAlyssa Rosenzweig2019-12-122-5/+10
| | | | | | | | | | This allows us to spill two 128-bit values in the same bundle, since we have two registers we can spill with. This improves the register allocation flexibility in programs with heavy spilling, though unfortunately it isn't sufficient (theoretically, 3.5 128-bit values can be spilled from 3 vector units and 2 scalar units). Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Remove code marked "TODO: remove me"Alyssa Rosenzweig2019-12-121-5/+0
| | | | | | It's a fossil, how cute :-) Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Remove consecutive_skip codeAlyssa Rosenzweig2019-12-121-18/+8
| | | | | | | This has been unused since the beginning since it's broken. Let's toss it so it doesn't get in the way of further fixes. Bigger to fish to fry. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Move bounds checking into LCRAAlyssa Rosenzweig2019-12-122-9/+5
| | | | | | This simplifies the cost calculation code a bit. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Remove spill cost heuristicAlyssa Rosenzweig2019-12-121-21/+0
| | | | | | | | | | We do need some sort of a cost heuristic, but this one is just causing spilling to behave worse on shaders I'm looking at, and I don't need more noise in the spill implementation right now. Get it working first. We can optimize this later. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Simplify spillability testAlyssa Rosenzweig2019-12-121-27/+9
| | | | | | | | Let's not worry about spilling twice in a bundle; that's too restrictive. We'll need to change the schedule itself -- unfortunately, this can have second-order effects due to pipeline registers. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Split spill node selection/spillingAlyssa Rosenzweig2019-12-121-20/+30
| | | | | | | Instead of having a giant function for both, split into the two subtasks so we can handle errors better. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Move spilling code out of schedulerAlyssa Rosenzweig2019-12-127-339/+380
| | | | | | | We move it to the register allocator itself. It doesn't belong in midgard_schedule.c! Signed-off-by: Alyssa Rosenzweig <[email protected]>
* st/mesa: Don't access members of NULL pointersTomeu Vizoso2019-12-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should be harmless, but UBSAN complains about it and fills the logs with noise. ../src/mesa/state_tracker/st_manager.c:523:27: runtime error: member access within null pointer of type 'struct st_framebuffer'"} #0 0xaad4e89c in st_framebuffer_reference ../src/mesa/state_tracker/st_manager.c:523"} #1 0xaad4e89c in st_api_make_current ../src/mesa/state_tracker/st_manager.c:1091"} #2 0xaab69e0e in dri_make_current ../src/gallium/state_trackers/dri/dri_context.c:301"} #3 0xaab48fd2 in driBindContext ../src/mesa/drivers/dri/common/dri_util.c:581"} #4 0xb682a122 in dri2_make_current ../src/egl/drivers/dri2/egl_dri2.c:1625"} #5 0xb67f95a4 in eglMakeCurrent ../src/egl/main/eglapi.c:884"} #6 0x4c2b0e in tcu::surfaceless::EglRenderContext::EglRenderContext(glu::RenderConfig const&, tcu::CommandLine const&) (/deqp/modules/gles2/deqp-gles2+0x29b0e)"} #7 0x4c3302 in tcu::surfaceless::ContextFactory::createContext(glu::RenderConfig const&, tcu::CommandLine const&, glu::RenderContext const*) const (/deqp/modules/gles2/deqp-gles2+0x2a302)"} #8 0x73a9b0 in glu::createRenderContext(tcu::Platform&, tcu::CommandLine const&, glu::RenderConfig const&, glu::RenderContext const*) (/deqp/modules/gles2/deqp-gles2+0x2a19b0)"} #9 0x73ad86 in glu::createDefaultRenderContext(tcu::Platform&, tcu::CommandLine const&, glu::ApiType) (/deqp/modules/gles2/deqp-gles2+0x2a1d86)"} #10 0x4c6a78 in deqp::gles2::Context::Context(tcu::TestContext&) (/deqp/modules/gles2/deqp-gles2+0x2da78)"} #11 0x4c3ba0 in deqp::gles2::TestPackage::init() (/deqp/modules/gles2/deqp-gles2+0x2aba0)"} #12 0x852fd8 in tcu::TestHierarchyIterator::next() (/deqp/modules/gles2/deqp-gles2+0x3b9fd8)"} #13 0x829660 in tcu::TestSessionExecutor::iterate() (/deqp/modules/gles2/deqp-gles2+0x390660)"} #14 0x810aac in tcu::App::iterate() (/deqp/modules/gles2/deqp-gles2+0x377aac)"} #15 0x4c1d4c in main (/deqp/modules/gles2/deqp-gles2+0x28d4c)"} #16 0xb64b6aa8 in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1aaa8)"} ../src/mesa/state_tracker/st_atom.c:115:8: runtime error: member access within null pointer of type 'struct st_program'"} #0 0xaae11a58 in check_program_state ../src/mesa/state_tracker/st_atom.c:115"} #1 0xaae128f6 in st_validate_state ../src/mesa/state_tracker/st_atom.c:192"} #2 0xaadc58c2 in prepare_draw ../src/mesa/state_tracker/st_draw.c:132"} #3 0xaadc58c2 in st_draw_vbo ../src/mesa/state_tracker/st_draw.c:184"} #4 0xabc4f924 in _mesa_validated_drawrangeelements ../src/mesa/main/draw.c:816"} #5 0xabc50240 in _mesa_DrawElements ../src/mesa/main/draw.c:970"} #6 0x73ebd2 in glu::CallLogWrapper::glDrawElements(unsigned int, int, unsigned int, void const*) (/deqp/modules/gles2/deqp-gles2+0x2d4bd2)"} #7 0x6d86b2 in deqp::gls::FragOpInteractionCase::iterate() (/deqp/modules/gles2/deqp-gles2+0x26e6b2)"} #8 0x494d16 in deqp::gles2::TestCaseWrapper::iterate(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x2ad16)"} #9 0x7f9cf2 in tcu::TestSessionExecutor::iterateTestCase(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x38fcf2)"} #10 0x7fa5f0 in tcu::TestSessionExecutor::iterate() (/deqp/modules/gles2/deqp-gles2+0x3905f0)"} #11 0x7e1aac in tcu::App::iterate() (/deqp/modules/gles2/deqp-gles2+0x377aac)"} #12 0x492d4c in main (/deqp/modules/gles2/deqp-gles2+0x28d4c)"} #13 0xb64b9aa8 in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1aaa8)"} Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Don't lose bits!Tomeu Vizoso2019-12-121-4/+4
| | | | | | | | | | | | | | | | | | | | UBSAN complained that when alpha was 255 and we shifted it 24 positions to the left, it didn't fit in a signed int. That's because bitwise operations automatically promote to signed int. ../src/gallium/drivers/panfrost/pan_job.c:1130:64: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'"} #0 0xacf953d6 in pan_pack_color ../src/gallium/drivers/panfrost/pan_job.c:1130"} #1 0xacf953d6 in panfrost_batch_clear ../src/gallium/drivers/panfrost/pan_job.c:1204"} #2 0xaae3226a in st_Clear ../src/mesa/state_tracker/st_cb_clear.c:513"} #3 0x4c3d0e in deqp::gles2::TestCaseWrapper::iterate(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x2ad0e)"} #4 0x828cf2 in tcu::TestSessionExecutor::iterateTestCase(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x38fcf2)"} #5 0x8295f0 in tcu::TestSessionExecutor::iterate() (/deqp/modules/gles2/deqp-gles2+0x3905f0)"} #6 0x810aac in tcu::App::iterate() (/deqp/modules/gles2/deqp-gles2+0x377aac)"} #7 0x4c1d4c in main (/deqp/modules/gles2/deqp-gles2+0x28d4c)"} #8 0xb64b6aa8 in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1aaa8)"} Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* util: Don't access members of NULL pointersTomeu Vizoso2019-12-121-5/+10
| | | | | | | | | | | | | | | | | | | | | | Should be harmless, but UBSAN complains about it and fills the logs with noise. ../src/gallium/auxiliary/util/u_inlines.h:110:8: runtime error: member access within null pointer of type 'struct pipe_surface'"} #0 0xaaccf186 in pipe_surface_reference ../src/gallium/auxiliary/util/u_inlines.h:110"} #1 0xaaccf186 in util_copy_framebuffer_state ../src/gallium/auxiliary/util/u_framebuffer.c:105"} #2 0xaabfb60e in cso_set_framebuffer ../src/gallium/auxiliary/cso_cache/cso_context.c:723"} #3 0xaae195ce in st_update_framebuffer_state ../src/mesa/state_tracker/st_atom_framebuffer.c:207"} #4 0xaae12316 in st_validate_state ../src/mesa/state_tracker/st_atom.c:261"} #5 0xaae31302 in st_Clear ../src/mesa/state_tracker/st_cb_clear.c:438"} #6 0x4c3d0e in deqp::gles2::TestCaseWrapper::iterate(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x2ad0e)"} #7 0x828cf2 in tcu::TestSessionExecutor::iterateTestCase(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x38fcf2)"} #8 0x8295f0 in tcu::TestSessionExecutor::iterate() (/deqp/modules/gles2/deqp-gles2+0x3905f0)"} #9 0x810aac in tcu::App::iterate() (/deqp/modules/gles2/deqp-gles2+0x377aac)"} #10 0x4c1d4c in main (/deqp/modules/gles2/deqp-gles2+0x28d4c)"} #11 0xb64b6aa8 in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1aaa8)"} Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* nir: Don't copy empty arrayTomeu Vizoso2019-12-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | It's undefined behavior UBSAN complains about, so fixing this will reduce the noise a bit. ../src/compiler/nir/nir_clone.c:710:4: runtime error: null pointer passed as argument 2, which is declared to never be null"} #0 0xac781be4 in clone_function ../src/compiler/nir/nir_clone.c:710"} #1 0xac781be4 in nir_shader_clone ../src/compiler/nir/nir_clone.c:740"} #2 0xacf99442 in panfrost_shader_compile ../src/gallium/drivers/panfrost/pan_assemble.c:54"} #3 0xacf6b268 in panfrost_bind_shader_state ../src/gallium/drivers/panfrost/pan_context.c:1960"} #4 0xaae326bc in set_fragment_shader ../src/mesa/state_tracker/st_cb_clear.c:135"} #5 0xaae326bc in clear_with_quad ../src/mesa/state_tracker/st_cb_clear.c:335"} #6 0xaae326bc in st_Clear ../src/mesa/state_tracker/st_cb_clear.c:518"} #7 0x494d0e in deqp::gles2::TestCaseWrapper::iterate(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x2ad0e)"} #8 0x7f9cf2 in tcu::TestSessionExecutor::iterateTestCase(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x38fcf2)"} #9 0x7fa5f0 in tcu::TestSessionExecutor::iterate() (/deqp/modules/gles2/deqp-gles2+0x3905f0)"} #10 0x7e1aac in tcu::App::iterate() (/deqp/modules/gles2/deqp-gles2+0x377aac)"} #11 0x492d4c in main (/deqp/modules/gles2/deqp-gles2+0x28d4c)"} #12 0xb64b9aa8 in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1aaa8)"} Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Remove undefined behaviorTomeu Vizoso2019-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | As found by UBSAN, it should be harmless but it's good to remove any UB so the tool's output is useful. ../src/panfrost/midgard/midgard_schedule.c:1094:9: runtime error: index -1 out of bounds for type 'midgard_instruction *[6]'"} #0 0xad047872 in schedule_block ../src/panfrost/midgard/midgard_schedule.c:1094"} #1 0xad04d41a in schedule_program ../src/panfrost/midgard/midgard_schedule.c:1116"} #2 0xad031f98 in midgard_compile_shader_nir ../src/panfrost/midgard/midgard_compile.c:2588"} #3 0xacf9874e in panfrost_shader_compile ../src/gallium/drivers/panfrost/pan_assemble.c:68"} #4 0xacf6b268 in panfrost_bind_shader_state ../src/gallium/drivers/panfrost/pan_context.c:1960"} #5 0xaae2596e in st_update_fp ../src/mesa/state_tracker/st_atom_shader.c:168"} #6 0xaae12316 in st_validate_state ../src/mesa/state_tracker/st_atom.c:261"} #7 0xaadc58c2 in prepare_draw ../src/mesa/state_tracker/st_draw.c:132"} #8 0xaadc58c2 in st_draw_vbo ../src/mesa/state_tracker/st_draw.c:184"} #9 0xabc4f924 in _mesa_validated_drawrangeelements ../src/mesa/main/draw.c:816"} #10 0xabc50240 in _mesa_DrawElements ../src/mesa/main/draw.c:970"} #11 0x73ebd2 in glu::CallLogWrapper::glDrawElements(unsigned int, int, unsigned int, void const*) (/deqp/modules/gles2/deqp-gles2+0x2d4bd2)"} #12 0x6d86b2 in deqp::gls::FragOpInteractionCase::iterate() (/deqp/modules/gles2/deqp-gles2+0x26e6b2)"} #13 0x494d16 in deqp::gles2::TestCaseWrapper::iterate(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x2ad16)"} #14 0x7f9cf2 in tcu::TestSessionExecutor::iterateTestCase(tcu::TestCase*) (/deqp/modules/gles2/deqp-gles2+0x38fcf2)"} #15 0x7fa5f0 in tcu::TestSessionExecutor::iterate() (/deqp/modules/gles2/deqp-gles2+0x3905f0)"} #16 0x7e1aac in tcu::App::iterate() (/deqp/modules/gles2/deqp-gles2+0x377aac)"} #17 0x492d4c in main (/deqp/modules/gles2/deqp-gles2+0x28d4c)"} #18 0xb64b9aa8 in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1aaa8)"} Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Hold a reference to sampler viewsTomeu Vizoso2019-12-121-3/+9
| | | | | | | Before we were just copying, but we need to hold a reference as well. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* gallium/swr: Fix Windows buildJan Zielinski2019-12-121-1/+4
| | | | | | | | Tessellator defines own fmin/fmax functions that conflict with those defined in cmath header. Need to use legacy math.h which was originally used in MS code. Reviewed-by: Krzysztof Raszkowski <[email protected]>
* ac/nir: fix out-of-bound access when loading constants from globalSamuel Pitoiset2019-12-121-4/+14
| | | | | | | | | | | | | | | | Global load/store instructions can't know if the offset is out-of-bound because they don't use descriptors (no range). Fix this by clamping the offset for arrays that are indexed with a non-constant offset that's greater or equal to the array size. This fixes VM faults and GPU hangs with Dead Rising 4. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2148 Fixes: 71a67942003 ("ac/nir: Enable nir_opt_large_constants") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* anv: fix assumptions about temporary fence payloadLionel Landwerlin2019-12-121-9/+14
| | | | | | | | | | | | Since f9a3d9738b12 temporary BO_WSI are definitely a thing so we have an assert wrong. Take that opportunity to expand a bit on an existing comment. Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: f9a3d9738b12 ("anv: Use BO fences/semaphores for AcquireNextImage") Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Ivan Briano <[email protected]>
* anv: fix fence underlying primitive checksLionel Landwerlin2019-12-121-3/+13
| | | | | | | | | | | | | | We appear to have got lucky that the only type of temporary fence payload we could have was a syncobj and that would only happen when the type of the permanent payload was also a syncobj. This code was broken if that assumption changed and it did in commit f9a3d9738b12. Signed-off-by: Lionel Landwerlin <[email protected]> Cc: <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Ivan Briano <[email protected]>
* vtn/opencl: add shuffle/shuffle supportDave Airlie2019-12-121-1/+52
| | | | | | | This adds nir encoding for these, generating them from libclc was very expensive, and this is a lot simpler. Reviewed-by: Karol Herbst <[email protected]>
* vtn: convert vload/store to single value loopsDave Airlie2019-12-121-11/+20
| | | | | | | There is an alignment issue doing this the other way, the spec clearly says vload/store don't require alignment. Reviewed-by: Karol Herbst <[email protected]>
* iris: Default to X-tiling for scanout buffers without modifiersKenneth Graunke2019-12-111-0/+2
| | | | | | | | | | | | | | | Neither Mutter nor KWin's wayland compositors appear to use modifiers. In the non-modifier case, iris was still trying to use Y-tiling for scan-out surfaces, leading to this error: (gnome-shell:7247): mutter-WARNING **: 09:23:47.787: meta_drm_buffer_gbm_new failed: drmModeAddFB failed: Invalid argument We now fall back to the historical X-tiling for scanout buffers, which ought to work everyone, at lower performance. To regain that, we need to ensure modifiers are actually supported in environments people use. Fixes: fbf31247710 ("iris: Rework tiling/modifiers handling") Reviewed-by: Jason Ekstrand <[email protected]>
* llvmpipe: enable ARB_shader_draw_parameters.Dave Airlie2019-12-121-1/+2
| | | | | | All the bits should be in place for this now. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: fixup base_vertex supportDave Airlie2019-12-123-3/+8
| | | | | | | base vertex should be 0 for non-indexed draws according to the piglit tests. Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm/draw: add support for draw_id system value.Dave Airlie2019-12-129-3/+19
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: add base instance sysval supportDave Airlie2019-12-125-4/+14
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* nv50/ir: implement global atomics and handle it for nirKarol Herbst2019-12-112-4/+40
| | | | | | | TGSI doesn't have any concept of global memory right now. Signed-off-by: Karol Herbst <[email protected]> Acked-by: Dave Airlie <[email protected]>
* nir: handle nir_deref_type_ptr_as_array in rematerialize_deref_in_blockKarol Herbst2019-12-111-0/+1
| | | | | | | | | I forgot why that was required, but it still is the correct thing to do. Hit it at some point when working on implementing more CL features. Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* spirv: add OpLifetime*Rob Clark2019-12-111-0/+4
| | | | | | | | | These are just hints so we can ignore them. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* clover/spirv: allow Int64 Atomics for supported devicesKarol Herbst2019-12-111-0/+6
| | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* clover/nir: set spirv environment to OpenCLKarol Herbst2019-12-111-0/+1
| | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* clover/nir: treat UniformConstant as global memoryKarol Herbst2019-12-112-1/+2
| | | | | | | | | | | | Just like we already do in the llvm backend. The current constant buffer code seems fundamentally flawed and right now we are thinking on how we want to reimplement all of that. But until that happens, just treat is as global memory and go on. Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* spirv: handle UniformConstant for OpenCL kernelsKarol Herbst2019-12-113-2/+19
| | | | | | | | | | | | | | | The caller is responsible for setting up the ubo_addr_format value as contrary to shared and global, it's not controlled by the spirv. Right now clovers implementation of CL constant memory uses a 24/8 bit format to encode the buffer index and offset, but that code is dead as all backends treat constants as global memory to workaround annoying issues within OpenCL. Maybe that will change, maybe not. But just in case somebody wants to look at it, add a toggle for this inside vtn. Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* gallivm/nir: copy compare ordering code from tgsiDave Airlie2019-12-121-1/+6
| | | | | | | This fixes some isinf/isnan tests copying what the tgsi code paths do for float compares Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm/nir: cleanup code and call cmp wrapperDave Airlie2019-12-121-12/+14
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: fix perspective enable if usage_mask doesn't have 0 bit setDave Airlie2019-12-121-2/+2
| | | | | | | | | | The current code looks like a typo, and fails if the usage_mask is for a y/z enabled input. Fixes piglit ext_transform_feedback-immediate-reuse-index-buffer with llvmpipe/nir Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm: fix transpose for when first channel isn't createdDave Airlie2019-12-121-6/+12
| | | | | | | | | | | The previous fix worked when the second channel wasn't exposed, but a couple of piglit tests have inputs with just the y/z chans, no x/w. Partly Fixes piglit ext_transform_feedback-immediate-reuse-index-buffer with llvmpipe/nir Fixes: 5363cda52b84 ("gallivm: add swizzle support where one channel isn't defined.") Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe/nir: handle texcoord requirementsDave Airlie2019-12-125-6/+6
| | | | | | Switch to using texcoord intrinsic support. Reviewed-by: Roland Scheidegger <[email protected]>
* freedreno/a6xx: Silence warning for unused perf countersKristian H. Kristensen2019-12-111-2/+2
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Convert some tile setup to OUT_REG()Kristian H. Kristensen2019-12-111-25/+15
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Convert gmem blits to OUT_REG()Kristian H. Kristensen2019-12-111-33/+13
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Convert VSC pipe setup to OUT_REG()Kristian H. Kristensen2019-12-111-16/+13
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Convert emit_zs() to OUT_REG()Kristian H. Kristensen2019-12-111-29/+24
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Convert emit_mrt() to OUT_REG()Kristian H. Kristensen2019-12-111-42/+37
| | | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Kristian H. Kristensen <[email protected]>