aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/Makefile.sources
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: move utility functions, macros into new st_util.h fileBrian Paul2019-03-111-0/+1
| | | | | | | | | | | | | | To de-clutter st_context.h. Clean up remaining function prototypes in st_context.h. The st_vp_uses_current_values() helper is only used in st_context.c so move it there. The st_get_active_states() function is only used in st_context.c so remove its prototype in st_context.h Reviewed-by: Neha Bhende <[email protected]>
* st/glsl: start spilling out common st glsl conversion codeTimothy Arceri2019-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NIR and TGSI paths are currently intertwined which makes it not only hard to follow but also makes it hard to take advantage of the differences in IR. Here we take the first step to splitting that path apart. With this we take the opportunity to no longer call the GLSL IR optimisation passes after the final lowering calls for NIR. We can instead just use the NIR passes which can produce better code and should also result in faster compile times. The speed-up can be measured in some dolphin uber shaders due to no longer calling lower_if_to_cond_assign() for example dolphin/ubershaders/120.shader_test goes from ~1.63 -> ~1.53 seconds on my machine. There are some code changes as a result of not calling lower_if_to_cond_assign(), this is because it flattens ifs that contain UBOs where as NIR's peephole select doesn't. This is were most of the regressions in Max Waves happens with shader-db. shader-db results (VEGA): Totals from affected shaders: SGPRS: 2349056 -> 2349640 (0.02 %) VGPRS: 1322160 -> 1323300 (0.09 %) Spilled SGPRs: 21190 -> 21527 (1.59 %) Spilled VGPRs: 99 -> 99 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 72 -> 72 (0.00 %) dwords per thread Code Size: 57260904 -> 57270932 (0.02 %) bytes Compile Time: 1107186 -> 1022942 (-7.61 %) milliseconds LDS: 786 -> 786 (0.00 %) blocks Max Waves: 391932 -> 391619 (-0.08 %) Wait states: 0 -> 0 (0.00 %) Reviewed-by: Eric Anholt <[email protected]>
* nir: Move nir_lower_uniforms_to_ubo to compiler/nir.Timur Kristóf2019-03-051-1/+0
| | | | | | | | | | | | The nir_lower_uniforms_to_ubo function is useful outside of mesa/state_tracker, and in fact is needed to produce NIR for drivers that have the PIPE_CAP_PACKED_UNIFORMS capability. Signed-Off-By: Timur Kristóf <[email protected]> Tested-by: Andre Heider <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: remove unused header-fileErik Faye-Lund2019-02-241-1/+0
| | | | | | | | | | This header has been unused since f8f2520e88c ("st/mesa: Remove unnecessary headers"). And in the more than 8 years since, this hasn't been useful. So let's just get rid of it. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* st/nir: Make new helpers for constructing built-in NIR shaders.Kenneth Graunke2019-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The state tracker generates several built-in shaders in order to perform scissored clears, upload/download PBOs, and so on. These are currently constructed using TGSI, using ureg and u_simple_shader. I want to have NIR versions of these shaders, for my Gallium driver that has a NIR backend but no TGSI support. To that end, we'll want a few helpers to help construct simple shaders. This patch adds two new helpers: - st_nir_finish_builtin_shader() takes a manually constructed NIR shader, applies lowering passes (like st_link_nir would do for GLSL), and constructs the pipe_shader_state. - st_nir_make_passthrough_shader() makes a simple passthrough shader, which copies inputs to outputs. This is similar to u_simple_shaders. v2: Set info->fs.untyped_color_outputs for vc4/v3d (thanks Eric!). Reviewed-by: Marek Olšák <[email protected]> Tested-by: Rob Clark <[email protected]> Tested-by: Eric Anholt <[email protected]>
* mesa/vbo: Move src/mesa/vbo/vbo_exec_array.c -> src/mesa/main/draw.cMathias Fröhlich2018-11-011-1/+2
| | | | | | | | | | The array type draw is no longer directly dependent on the vbo module. Thus move array type draws into mesa/main/draw.c. Rename symbols starting with vbo_* to _mesa_* and apply some reindenting to make it consistent. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* mesa/st/glsl_to_tgsi: Add helper class for array live range merging and ↵Gert Wollny2018-08-111-0/+2
| | | | | | | | | | | | | | | | | interleaving This class holds the array length, live range, and accessed components, and it implements the logic for evaluating how arrays are merged and interleaved. v4: - Add logic to evaluate merge and interleave of a pair of arrays to the class array_live_range. - document class - update commit message Thanks Nicolai Hähnle for the pointers given. Signed-off-by: Gert Wollny <[email protected]> Acked-by: Dave Airlie <[email protected]>
* mesa: add ASTC 2D LDR decoderMarek Olšák2018-07-311-0/+2
| | | | | | Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* mesa: add header for share bptc decompress functionsDenis Pauk2018-07-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | Move shared bptc functions to texcompress_bptc_tmp.h: * fetch_rgba_unorm_from_block * fetch_rgb_float_from_block * compress_rgba_unorm * compress_rgb_float Create decompress functions: * decompress_rgba_unorm * decompress_rgb_float Functions will be reused in gallium/auxiliary code. v2: Add block decompress function v3: Move all shared code to header Suggested-by: Marek Olšák <[email protected]> Signed-off-by: Denis Pauk <[email protected]> CC: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: add support for nvidia conservative rasterization extensionsRhys Perry2018-04-301-0/+2
| | | | | | | | Although the specs are written against compatibility GL 4.3 and allows core profile and GLES2+, it is exposed for GL 1.0+ and GLES1 and GLES2+. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: rename api_validate.{c,h} -> draw_validate.{c,h}Timothy Arceri2018-04-241-2/+2
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65422
* mesa: include mtypes.h lessMarek Olšák2018-04-121-1/+1
| | | | | | | | | | - remove mtypes.h from most header files - add main/menums.h for often used definitions - remove main/core.h v2: fix radv build Reviewed-by: Brian Paul <[email protected]>
* vbo: Move vbo_split into the tnl module.Mathias Fröhlich2018-03-311-5/+5
| | | | | | | | Move the files, adapt to the naming scheme in tnl, update callers and build system. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* st/nir/radeonsi: move nir_lower_uniforms_to_ubo() to the state trackerTimothy Arceri2018-03-201-0/+1
| | | | | | | | | | | | | This will only ever be used by gallium drivers so it probably doesn't belong in the nir toolkit. Also we want to pass it some non NIR things in the following patch. To avoid regressions we wrap the lowering calls that have been moved to st_glsl_to_nir with a quick hack so that they are only called for radeonsi, we will replace the hack with a check for uniform packing in a following patch. Reviewed-by: Marek Olšák <[email protected]>
* vbo: Move vbo_rebase into its only caller module tnl.Mathias Fröhlich2018-02-061-1/+2
| | | | | Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/st: add support for semaphore object create/import/delete v3Andres Rodriguez2018-01-301-0/+2
| | | | | | | | | | Add basic semaphore object operations. v2: s/semaphore/fence for pipe objects v3: added missing license headers Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* automake: mesa: include vbo_private.h in the tarballEmil Velikov2018-01-251-0/+1
| | | | | | Fixes: a7cfec3be0e ("vbo: move VBO-private types, prototypes, etc. into new vbo_private.h header") Signed-off-by: Emil Velikov <[email protected]>
* vbo: remove vbo_context.h and change includes to use vbo.h insteadBrian Paul2018-01-241-1/+0
| | | | | | Now vbo.h is the public interface to the VBO module. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: add GL_ARB_gl_spirv boilerplateNicolai Hähnle2017-12-121-0/+2
| | | | | | | | | | | | v2: * Add meson build bits (Eric Engestrom) * Return INVALID_OPERATION error on SpecializeShaderARB (Ian Romanick) v3: Include boilerplate for the GL 4.6 alias of glSpecializeShaderARB (Neil Roberts) Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Add Mesa ARB_get_program_binary helper functionsJordan Justen2017-12-081-0/+2
| | | | | | | | | | | | | | | V2 (Timothy Arceri): - add extra code comment - stop passing around void *binary and just pass program_binary_header *hdr instead. - move to src/mesa/main rather than src/util V3 (Timothy Arceri): - Move more code out of the backend and into the common helpers. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* meta: Delete the PBO texture upload/download pathJason Ekstrand2017-10-121-1/+0
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: move _mesa_exec_malloc/free() prototypes to their own headerBrian Paul2017-10-101-0/+1
| | | | | | | | Try to start removing things from the cluttered imports.h file. v2: add new header to Makefile.sources Reviewed-by: Roland Scheidegger <[email protected]>
* automake: add texcompress_s3tc_tmp.h to the sources listEmil Velikov2017-10-041-0/+1
| | | | | | | | Otherwise it will be missing from the tarball. Fixes: f7daa737d17 ("mesa: Combine libtxc_dxtn sources into texcompress_s3tc_tmp.h") Signed-off-by: Emil Velikov <[email protected]>
* mesa: Delete now unused dlopen.hMatt Turner2017-10-021-1/+0
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Combine libtxc_dxtn sources into texcompress_s3tc_tmp.hMatt Turner2017-10-021-3/+0
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Import libtxc_dxtn sourcesMatt Turner2017-10-021-0/+3
| | | | | | | | Imported from master (commit ef07298391c6dcad843e0b13e985090c1dd76e76) of https://cgit.freedesktop.org/~mareko/libtxc_dxtn/ Acked-by: Nicolai Hähnle <[email protected]> Acked-by: Emil Velikov <[email protected]>
* mesa/st: glsl_to_tgsi: implement new temporary register lifetime trackerGert Wollny2017-09-061-0/+2
| | | | | | | | | | | | | | | | | | This patch adds a class for tracking the life times of temporary registers in the glsl to tgsi translation. The algorithm runs in three steps: First, in order to minimize the number of needed memory allocations the program is scanned to evaluate the number of scopes. Then, the program is scanned second time to record the important register access time points: first and last reads and writes and their link to the execution scope (loop, if/else branch, switch case). In the third step for each register the actual minimal life time is evaluated. In addition, when compiled in debug mode (i.e. NDEBUG is not defined) the shaders and estimated temporary life times can be logged to stderr by setting the environment variable GLSL_TO_TGSI_RENAME_DEBUG. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/st: glsl_to_tgsi move some helper classes to extra filesGert Wollny2017-09-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | To prepare the implementation of a temp register lifetime tracker some of the classes are moved into seperate header/implementation files to make them accessible from other files. Specifically these are: class st_src_reg; class st_dst_reg; class glsl_to_tgsi_instruction; struct rename_reg_pair; int swizzle_for_type(const glsl_type *type, int component); as inline: bool is_resource_instruction(unsigned opcode); unsigned num_inst_dst_regs(const glsl_to_tgsi_instruction *op); unsigned num_inst_src_regs(const glsl_to_tgsi_instruction *op); Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: correctly calculate the storage offsetTimothy Arceri2017-08-151-0/+2
| | | | | | | | | | When generating the storage offset for struct members we need to skip opaque types as they no longer have backing storage. Fixes: fcbb93e86024 ("mesa: stop assigning unused storage for non-bindless opaque types") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101983 Reviewed-by: Dave Airlie <[email protected]>
* mesa/st: start adding memory object supportDave Airlie2017-08-061-0/+2
| | | | | | | | | | | | v2: pass dedicated flag v3 (Timothy Arceri): - remove unrequired _mesa_init_memory_object_functions() call in the state tracker. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (v2) Reviewed-by: Samuel Pitoiset <[email protected]>
* mapi: add EXT_external_objects and EXT_external_objects_fdAndres Rodriguez2017-08-061-0/+2
| | | | | | | | Includes implementation stubs. Signed-off-by: Andres Rodriguez <[email protected]> Acked-by: Timothy Arceri <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
* st/mesa: get rid of st_glsl_typesNicolai Hähnle2017-07-311-2/+0
| | | | | | | It's a duplicate of glsl_type::count_attribute_slots. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: remove st_cache.hSamuel Pitoiset2017-07-281-1/+0
| | | | | | | It contains unused prototypes. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Add _mesa_format_fallback_rgbx_to_rgba() [v2]Chad Versace2017-06-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The new function takes a mesa_format and, if the format is an alpha format with a non-alpha variant, returns the non-alpha format. Otherwise, it returns the original format. Example: input -> output // Fallback exists MESA_FORMAT_R8G8B8X8_UNORM -> MESA_FORMAT_R8G8B8A8_UNORM MESA_FORMAT_RGBX_UNORM16 -> MESA_FORMAT_RGBA_UNORM16 // No fallback MESA_FORMAT_R8G8B8A8_UNORM -> MESA_FORMAT_R8G8B8A8_UNORM MESA_FORMAT_Z_FLOAT32 -> MESA_FORMAT_Z_FLOAT32 i965 will use this for EGLImages and DRIimages. v2 (Jason Ekstrand): - Use mako - Rework to be easier to read - Write directly to the output file Reviewed-by: Kenneth Graunke <[email protected]>
* mapi: add GL_ARB_bindless_texture entry pointsSamuel Pitoiset2017-06-141-0/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: automake: add all headers to the tarball.Emil Velikov2017-03-171-0/+2
| | | | | Fixes: d8d81fbc316 ("mesa: Add infrastructure for a worker thread to process GL commands.") Signed-off-by: Emil Velikov <[email protected]>
* mesa: Custom thread marshalling for ShaderSource.Paul Berry2017-03-161-0/+1
| | | | | | | Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Connect the generated GL command marshalling code to the build.Eric Anholt2017-03-161-0/+2
| | | | | | | | | | | | v2: Rebase on the Begin/End changes, and just disable this feature on non-GL-core. v3: (Timothy Arceri) enable for non-GL-core contexts. Remove unrelated safe_mul() hunk. while loop style fix. Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* mesa: Add infrastructure for a worker thread to process GL commands.Eric Anholt2017-03-161-0/+1
| | | | | | | | | | | | | | | v2: Keep an allocated buffer around instead of checking for one at the start of every GL command. Inline the now-small space allocation function. v3: Remove duplicate !glthread->shutdown check, process remaining work before shutdown. v4: Fix leaks on destroy. V5: (Timothy Arceri) fix order of source files in makefile Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* st/mesa: implement a tgsi on-disk shader cacheTimothy Arceri2017-02-231-0/+2
| | | | | | | | Implements a tgsi cache for the OpenGL state tracker. V2: add support for compute shaders Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Separate INTEL_performance_query frontendRobert Bragg2017-02-221-0/+2
| | | | | | | | | | | | | | | | | To allow the backend interfaces for AMD_performance_monitor and INTEL_performance_query to evolve independently based on the more specific requirements of each extension this starts by separating the frontends of these extensions. Even though there wasn't much tying these frontends together, this separation intentionally copies what few helpers/utilities that were shared between the two extensions, avoiding any re-factoring specific to INTEL_performance_query so that the evolution will be easier to follow later. Signed-off-by: Robert Bragg <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Delete the meta-base CopyImageSubData implementationJason Ekstrand2016-12-051-1/+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]>
* st/mesa: move all sampler view code into new st_sampler_view.[ch] filesBrian Paul2016-10-061-0/+2
| | | | | | | | | | | | | Previously, the sampler view code was scattered across several different files. Note, the previous REALLOC(), FREE() for st_texture_object::sampler_views are replaced by realloc(), free() to avoid conflicting macros in Mesa vs. Gallium. Reviewed-by: Edward O'Callaghan <[email protected]> Acked-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: add nir pass to lower tex_src_planeRob Clark2016-09-261-0/+1
| | | | Signed-off-by: Rob Clark <[email protected]>
* mesa/st: add lowering pass for YUV samplersRob Clark2016-09-261-0/+2
| | | | Signed-off-by: Rob Clark <[email protected]>
* mesa/glsl: Move string_to_uint_map into the util folderThomas Helland2016-09-121-2/+0
| | | | | | | | | | This clears the last bits of the usecases of the hash table located in mesa/program, allowing us to remove it. V2: Rebase on top of changes to Makefile.sources Signed-off-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Remove prog_hash_table.cThomas Helland2016-09-121-1/+0
| | | | | | | | | | | | | Here we make the prog_hash_table functionally equivalent to the one in util by wrapping the remaing functions that differ. We also move the functions to the header so we can remove the c file. This enables us to do a step-by-step replacement of the table. Signed-off-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add scaffolding for OES/EXT_primitive_bounding_boxIlia Mirkin2016-08-301-0/+2
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Generate ir_expression_operation.h from PythonIan Romanick2016-08-301-0/+1
| | | | | | | | | | | | | There are differences in where end-of-line comments are placed, but 'diff -wud' is clean. v2: Massive rebase. v3: With much help from José Fonseca, fix SCons build. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Dylan Baker <[email protected]>
* mesa: Rename "texturebarrier" source files to "barrier".Francisco Jerez2016-08-241-2/+2
| | | | | | | In preparation for collecting all pipeline barrier GL entry points into a single source file. Reviewed-by: Kenneth Graunke <[email protected]>