summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* iris: Enable INTEL_shader_integer_functions2Ian Romanick2020-01-231-0/+6
| | | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>
* nir: Drop the ssbo_offset to atomic lowering.Eric Anholt2020-01-211-1/+1
| | | | | | | | | | | | | The arguments passed in were: - prog->info.num_ssbos - prog->nir->info.num_ssbos - arbitrary values for standalone compilers The num_ssbos should match between the prog's info and prog->nir's info until this lowering happens. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3240>
* gallium: Pack the atomic counters just above the SSBOs.Eric Anholt2020-01-216-14/+24
| | | | | | | | | | | | | | | | | | | | | We carve out half the SSBO space for atomics, and we were just binding them way up there. freedreno was then using a remapping table to map the sparse buffer index back down, since space in the descriptor array is a shared resource that may limit parallelism. That remapping table generated inside of the ir3 compiler is getting thoroughly in the way of implementing vulkan descriptor sets. We will be able to get rid of the freedreno's remapping table, and hopefully save shared resources on other hardware, by packing the atomics tightly above the SSBOs (like i965 does). We already rebind the shader buffers on program change if either the old or new program has SSBOs or ABOs, so this doesn't necessarily increase the program state change cost (the only cost increase I can come up with is if you're using the same atomic counter without rebinding it across changes of programs with varying SSBO counts, meaning it would now bounce around index space). Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3240>
* mesa: Make atomic lowering put atomics above SSBOs.Eric Anholt2020-01-215-31/+28
| | | | | | | | | | Gallium arbitrarily (it seems) put atomics below SSBOs, resulting in a bunch of extra index management, and surprising shader code when you would see your SSBOs up at index 16. It makes a lot more sense to see atomics converted to SSBOs appear as magic high numbers. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3240>
* Revert "gallium: add st_context_iface::flush_resource to call FLUSH_VERTICES"Daniel Stone2020-01-201-14/+0
| | | | | | | This reverts commit bec9c90b5ecf9cc2dc580f9ff297f94ba5aa3506. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3472> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3472>
* gallium: add st_context_iface::flush_resource to call FLUSH_VERTICESMarek Olšák2020-01-171-0/+14
|
* st/mesa: Allocate full miplevels if MaxLevel is explicitly setKenneth Graunke2020-01-161-0/+11
| | | | | | | | | | | | | | | | | | | | | Some applications explicitly call glTex[ture]Parameteri[v] to set GL_TEXTURE_MAX_LEVEL and GL_TEXTURE_BASE_LEVEL before uploading any texture data. Core Mesa initializes MaxLevel to 1000, so if it isn't that, we know they've set it. (We check for < TEXTURE_MAX_LEVELS to avoid hardcoding that value, however.) If MaxLevel - BaseLevel > 0, then the app is trying to tell us that this texture is going to have multiple miplevels. In that case, go ahead and allocate the space for it. Avoids many resource_copy_region calls at texture finalization time in the Civilization VI benchmark. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3401> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3401>
* st/mesa: run st_nir_lower_tex_src_plane for lowered xyuv/ayuvJonathan Marek2020-01-151-1/+2
| | | | | | | | | Has the effect of removing the nir_tex_src_plane for these formats too. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1896> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1896>
* st/mesa: don't lower YUV when driver supports it nativelyJonathan Marek2020-01-155-41/+68
| | | | | | | | | | This fixes YUYV support on etnaviv. Fixes: 7404833c "gallium: add handling for YUV planar surfaces" Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1896>
* st/mesa: implement EGLImageTargetTexStorageGurchetan Singh2020-01-152-0/+30
| | | | | | | | We can now support this extension. Acked-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3375> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3375>
* st/mesa: refactor egl image binding a bitGurchetan Singh2020-01-151-2/+3
| | | | | | | We'll need it for egl image tex storage. Acked-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3375>
* mesa/st: Move the dword slot counting function to glsl_types as well.Eric Anholt2020-01-145-126/+8
| | | | | | | | | | | | | To implement NIR-to-TGSI, we need to be able to get the size of the uniform variable for the TGSI declaration, not just the .driver_location. With its location in mesa/st, drivers couldn't link to it from nir-to-tgsi. This feels like a common enough function to want, so let's share it in the core compiler. Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3297>
* mesa/st: Move the vec4 type size function into core GLSL types.Eric Anholt2020-01-144-103/+13
| | | | | | | | | | The only bit that gallium varied on was handling of bindless. We can retain previous behavior for count_attribute_slots() by passing in "true" (though I suspect this is just giving a silly answer to a silly question), and delete our recursive function from mesa/st. Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3297>
* mesa/st: Deduplicate the NIR uniform lowering code.Eric Anholt2020-01-143-18/+16
| | | | | | | Just a little refactor as I go looking at the type size functions. Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3297>
* mesa/st: use float literalsErik Faye-Lund2020-01-141-4/+4
| | | | | | | This removes a warning on MSVC. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/st: lower samplers before nir_lower_texRob Clark2020-01-131-0/+4
| | | | | | | | | | Fixes incorrect lowering of YUV samplers when there are non-yuv samplers. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3368> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3368>
* mesa/st: fix a memory leak in get_versionAndrii Simiklit2020-01-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | This patch prevents memory leak in get_version function in st_manager.c This issue was found by valgrind: 16 bytes in 1 blocks are definitely lost in loss record 6 of 1,418 at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x63D9476: st_init_extensions (st_extensions.c:1679) by 0x63B803B: get_version (st_manager.c:1271) by 0x63B8124: st_api_query_versions (st_manager.c:1289) by 0x63266EF: dri_init_screen_helper (dri_screen.c:583) by 0x6321B12: dri2_init_screen (dri2.c:2110) by 0x631AACC: driCreateNewScreen2 (dri_util.c:155) by 0x5D58192: dri3_create_screen (dri3_glx.c:897) by 0x5D39829: AllocAndFetchScreenConfigs (glxext.c:815) by 0x5D39C57: __glXInitialize (glxext.c:941) by 0x5D3290A: GetGLXPrivScreenConfig (glxcmds.c:174) by 0x5D34F38: glXQueryExtensionsString (glxcmds.c:1307) Fixes: eca8032f20d0970184843d98e2bddb688e94a3a9 ("gallium: Add ARB_gl_spirv support") Reviewed-by: Gert Wollny <[email protected]> Signed-off-by: Andrii Simiklit <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3345> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3345>
* spirv,nir: add new lod parameter to image_{load,store} intrinsicsSamuel Pitoiset2020-01-091-0/+1
| | | | | | | | | | | | SPV_AMD_shader_image_load_store_lod allows to use a lod parameter with OpImageRead, OpImageWrite and OpImageSparseRead. According to the specification, this parameter should be a 32-bit integer. It is initialized to 0 when no lod parameter is found during SPIR-V->NIR translation. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* mesa: create program resource hash in a single placeTapani Pälli2020-01-092-4/+0
| | | | | | | | | This is a cleanup but also a fix for commit dd09f1d806b. In case of i965 we did not actually create hash for cached shader programs. Fixes: dd09f1d806b "mesa/st/i965: add a ProgramResourceHash for quicker resource lookup" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: bypass u_vbuf if it's not needed (no fallbacks and no user VBOs)Marek Olšák2020-01-083-24/+24
| | | | | | | This decreases CPU overhead, because u_vbuf is completely bypassed in those cases. Acked-by: Alyssa Rosenzweig <[email protected]>
* gallium: put u_vbuf_get_caps return values into u_vbuf_capsMarek Olšák2020-01-081-3/+3
| | | | Acked-by: Alyssa Rosenzweig <[email protected]>
* mesa/st/i965: add a ProgramResourceHash for quicker resource lookupTapani Pälli2020-01-072-0/+4
| | | | | | | | | | | | Many resource APIs require searching by name, add a hash table to make this faster. Currently we traverse the whole resource list for name based queries, this change makes all these cases use the hash. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2203 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3254> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3254>
* glsl: use nir linker to link atomicsTimothy Arceri2020-01-072-1/+10
| | | | Reviewed-by: Alejandro Piñeiro <[email protected]>
* glsl: rename gl_nir_link() to gl_nir_link_spirv()Timothy Arceri2020-01-071-1/+1
| | | | | | | | A NIR based glsl linking function will be too different to the spirv version to bother attempting any sharing. So lets change the name to be explicit. Reviewed-by: Alejandro Piñeiro <[email protected]>
* st/mesa: Lower vars to ssa and constant prop before gl_nir_lower_buffersKristian H. Kristensen2020-01-061-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gl_nir_lower_buffers pass relies on recognizing the same literal constants as the GLSL compiler so that constant buffer array indices are constant in nir as well. Without this, get_block_array_index() would see vec1 32 ssa_723 = deref_var &const_temp@1 (function_temp int) vec1 32 ssa_724 = load_const (0x00000001 /* 0.000000 */) ... vec1 32 ssa_5 = deref_var &const_temp@1 (function_temp int) vec1 32 ssa_6 = intrinsic load_deref (ssa_5) (0) /* access=0 */ vec1 32 ssa_7 = deref_var &blockB (ssbo BlockB[1]) vec1 32 ssa_8 = deref_array &(*ssa_7)[ssa_6] (ssbo BlockB) /* &blockB[ssa_6] */ instead of a literal 1, and ultimately generate the block name BlockB[0]. That used to work, since we before the previous commits we'd compact the block binding points and names. Thus, there would always be a BlockB[0]. Now, if an entry in a block array isn't used, we don't generate that block name, which means that if entry 0 isn't used BlockB[0] isn't present and then get_block_array_index() fails to find the block. In most cases we would have dealt with this in the call to st_nir_opts() in st_nir_link_shaders(), but in the num_shaders == 1 case (for example, compute) we would call gl_nir_lower_buffers() before we lowered GLSL constants. Move that corner case up next to where we call st_nir_link_shaders() so we call st_nir_opts() at the same point in the flow for all shaders. Fixes: dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.18 Signed-off-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: use uint-samplers for sampling stencil buffersErik Faye-Lund2020-01-061-4/+6
| | | | | | | Otherwise, we end up mismatching the sampler types when rendering. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: glsl_to_nir: don't lower atomics to SSBOs if driver supports HW atomicsGert Wollny2020-01-041-2/+3
| | | | | | | | | | | | | | At least on r600 HW atomic operations are way less expensive than SSBO atomic operations. v2: use st->has_hw_atomics (Erik Anholt) v3: remove second invocation of atomic to ssbo lowering (Erik Anholt) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3286> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3286>
* st/mesa: Allow ASTC5x5 fallbacks separately from other ASTC LDR formats.Kenneth Graunke2020-01-036-3/+23
| | | | | | | | | This patch allows us to fake ASTC 5x5 specifically, while leaving the other ASTC LDR formats with native support. I plan to use this in iris, at least for the time being. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Add PIPE_FORMAT_P010 supportThong Thai2020-01-034-0/+4
| | | | | | Signed-off-by: Thong Thai <[email protected]> Reviewed-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3153>
* st/nir: Optionally unify inputs_read/outputs_written when linking.Kenneth Graunke2020-01-031-0/+22
| | | | | | | | | | | | | i965 and iris use inputs_read/outputs_written for a shader stage to determine the layout of input and output storage. Adjacent stages must agree on the layout, so adjacent input/output bitfields must match. This patch adds a new nir_shader_compiler_options::unify_interfaces flag which asks the linker to unify the input/output interfaces between adjacent stages. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3249>
* st/mesa: release tgsi tokens for shader statesNeha Bhende2019-12-191-0/+4
| | | | | | | | | | | | Since we are using st_common_variant while creating variant for vertext program, we can release tokens created in st_create_vp_variant which are already stored in respective states. This fix memory leak found with piglit tests Fixes bc99b22a305b ('st/mesa: use a separate VS variant for the draw module') Reviewed-by: Charmaine Lee <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: refuse to create buffers larger than UINT32_MAXPierre-Eric Pelloux-Prayer2019-12-161-0/+9
| | | | | | | | | | | pipe_resource.width0 is 32 bits and hardware support for bigger buffer is limited (eg: AMD hardware doesn't support buffer shader resources bigger than 4GB). Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2053 Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2948> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2948>
* st/glsl_to_nir: fix SSO validation regressionTimothy Arceri2019-12-131-3/+11
| | | | | | | Fixes: b77907edb554 ("st/glsl_to_nir: use nir based program resource list builder") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2216 Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_nir: use nir based program resource list builderTimothy Arceri2019-12-132-2/+5
| | | | | | | | | | | | | | | | | Here we use the NIR based builder to add everything to the resource list execpt for SSO packed varyings. Since the details of those varyings get lost during packing we leave the special handing to the GLSL IR pass for now. In order to do this we add some bools to the build resource list functions. Using the NIR based resource list builder gets us a step closer to using a native NIR based linker. It should also be faster than the GLSL IR builder, one because the NIR optimisations should mean we add less entries due to better optimisations, and two because nir gives us better lists to work with and we don't need to walk the entire IR to find the resources. Ack-by: Alejandro Piñeiro <[email protected]>
* st/glsl_to_nir: call gl_nir_lower_buffers() a little laterTimothy Arceri2019-12-131-1/+2
| | | | | | | In a following commit we will use a NIR based builder to build the OpenGL resource list, so we want to delay this call a little. Ack-by: Alejandro Piñeiro <[email protected]>
* glsl: move nir_remap_dual_slot_attributes() call out of glsl_to_nir()Timothy Arceri2019-12-131-0/+8
| | | | | | | | | In order to be able to implement a NIR based glsl linker we need to build the program resource list with NIR. This change delays the remaping so that a later commit can call the NIR based resource list builder. Reviewed-by: Alejandro Piñeiro <[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]>
* gallium: enable INTEL_PERFORMANCE_QUERYDongwon Kim2019-12-103-0/+270
| | | | | | | | | | | | | | | | | new state tracker APIs added for INTEL_performance_query This extension is enabled if all vendor specific functions for it exist. v2: add st_cb_perfquery.* to the list of sources in Makefile v3: minor code clean-up v4: - add driver hooks for intel-performance-query apis - add PIPE level performance counter and type enums that match to OpenGL enums - do conversion of pipe_perf_counter_type and pipe_perf_counter_data_type enums to GL defines in state_tracker Signed-off-by: Dongwon Kim <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: add a notify_before_flush callback param to flushPierre-Eric Pelloux-Prayer2019-12-101-1/+6
| | | | | | | | | | The new callback is called right before the flush is done to allow users of st->flush to do some work after all the previous work has been flushed. This will be used by dri_flush in the next commit. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: release the draw shader properly to fix driver crashes (iris)Marek Olšák2019-12-091-1/+5
| | | | Reviewed-by: Dave Airlie <[email protected]>
* draw, st/mesa: generate TGSI for ffvp/ARB_vp if draw lacks LLVMMarek Olšák2019-12-091-2/+7
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: don't generate VS TGSI if NIR is enabledMarek Olšák2019-12-091-22/+14
| | | | | | it's no longer needed Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: remove struct st_vp_variant in favor of st_common_variantMarek Olšák2019-12-097-43/+24
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: remove st_vp_variant::num_inputsMarek Olšák2019-12-093-11/+5
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: use a separate VS variant for the draw moduleMarek Olšák2019-12-093-44/+22
| | | | | | | | instead of keeping the IR indefinitely in st_vp_variant. This trivially fixes Selection/Feedback/RasterPos for NIR. Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: support shader images for Selection/Feedback/RasterPosMarek Olšák2019-12-091-0/+55
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: support SSBOs for Selection/Feedback/RasterPosMarek Olšák2019-12-091-0/+40
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: support samplers for Selection/Feedback/RasterPosMarek Olšák2019-12-091-0/+107
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: save currently bound vertex samplers and sampler views in st_contextMarek Olšák2019-12-094-3/+11
| | | | | | for st_draw_feedback.c Reviewed-by: Dave Airlie <[email protected]>
* st/mesa: support UBOs for Selection/Feedback/RasterPosMarek Olšák2019-12-091-2/+37
| | | | Reviewed-by: Dave Airlie <[email protected]>