summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: provide static inline st_init_vdpau_functionsEmil Velikov2018-01-222-6/+8
| | | | | | | | | The ifdef spaghetty in st_vdpau.c is rather confusing and misleading. Simplily it by introducing a static inline helper noop (when HAVE_ST_VDPAU is not defined) in the header. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Christian König <[email protected]>
* mesa: Make numSamples an unsigned intGert Wollny2018-01-192-2/+2
| | | | | | | | | | As a followup to the previous patch propagate the change of numSamples from int to unsigned to gl_config::samples and consequently fix some -Wsign-compare warnings. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/st: translate SO info in glsl_to_nir() caseRob Clark2018-01-181-4/+43
| | | | | | | | | | | | | | | | | | | | | | | This was handled for VS, but not for GS. Fixes for gallium drivers using nir: spec@arb_gpu_shader5@arb_gpu_shader5-xfb-streams-without-invocations spec@arb_gpu_shader5@arb_gpu_shader5-xfb-streams* spec@arb_transform_feedback3@arb_transform_feedback3-ext_interleaved_two_bufs_gs* spec@ext_transform_feedback@geometry-shaders-basic spec@ext_transform_feedback@* use_gs [email protected]@execution@geometry@primitive-id* [email protected]@execution@geometry@tri-strip-ordering-with-prim-restart gl_triangle_strip * [email protected]@transform-feedback-builtins [email protected]@transform-feedback-type-and-size v2: don't call st_translate_program_stream_output) for TCS v3: drop scanning patch outputs as TCS can't output xfb Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Karol Herbst <[email protected]>
* st/mesa: assume that user constant buffers are always supportedMarek Olšák2018-01-174-34/+6
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* gallium: remove PIPE_CAP_TEXTURE_SHADOW_MAPMarek Olšák2018-01-171-3/+3
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* st/mesa: expose ARB_sync unconditionallyMarek Olšák2018-01-171-5/+2
| | | | | | | All drivers support it. Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* gallium: remove PIPE_CAP_TWO_SIDED_STENCILMarek Olšák2018-01-171-3/+2
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* st/mesa: include util/bitscan.h in st_glsl_to_tgsi_temprename.cppBrian Paul2018-01-171-5/+6
| | | | | | And use "" instead of <> for including Mesa headers, as we do elsewhere. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: remove unneeded #includes of main/compiler.hBrian Paul2018-01-1713-19/+0
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: include main/compiler.h in st_cb_queryobj.cBrian Paul2018-01-171-0/+1
| | | | | | To get CPU_TO_LE32() macro. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: add ARB_get_program_binary support using TGSITimothy Arceri2018-01-172-0/+10
| | | | | | | | | | | | | This resolves a game bug in Dead Island. The game doesn't properly handle ARB_get_program_binary with 0 supported formats, and ends up crashing. This will enable ARB_get_program_binary binary support for any driver that currently enables the on-disk shader cache. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85564
* st/glsl_to_tgsi: add st_get_program_binary_driver_sha1() helperTimothy Arceri2018-01-172-0/+9
| | | | | | | This will be used by ARB_get_program_binary. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: add (de)serialise program helpersTimothy Arceri2018-01-172-127/+146
| | | | | | | | These will be shared between the on-disk shader cache and ARB_get_program_binary. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: stop passing pipe_shader_state to st_store_tgsi_in_disk_cache()Timothy Arceri2018-01-173-16/+17
| | | | | | | | | | We can instead just get this from st_*_program. V2: store tokens to to st_compute_program before attempting to write to cache (fixes crash). Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_tgsi: store num_tgsi_tokens in st_*_programTimothy Arceri2018-01-174-17/+34
| | | | | | | We will need this for ARB_get_program_binary binary support. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_nir: disable io lowering to temps for tessTimothy Arceri2018-01-171-4/+8
| | | | | | | | | | | | | | Lowering these to temps makes a big mess, and results in some piglit test failures. Also the radeonsi backend (the only backend to support tess) has support for indirects so there is no need to lower them anyway. Fixes the following piglit tests on radeonsi: tests/spec/arb_tessellation_shader/execution/variable-indexing/tes-input-array-vec3-index-rd.shader_test tests/spec/arb_tessellation_shader/execution/variable-indexing/tes-input-array-vec4-index-rd.shader_test Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: enable ARB_enhanced_layouts on nir driversTimothy Arceri2018-01-171-3/+1
| | | | | | | | | I'm guessing this may have been disable because of missing component packing support. However recent nir linking changes required nir based gallium drivers to support component packing so this should now be ok to enable. Reviewed-by: Marek Olšák <[email protected]>
* nir: fix st_nir_assign_var_locations for patch variablesKarol Herbst2018-01-081-2/+6
| | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: remove dd_function_table::GetCompressedTexSubImage and clean it upMarek Olšák2018-01-061-1/+0
| | | | Reviewed-by: Ian Romanick <[email protected]>
* st/glsl_to_nir/radeonsi: enable tessellation shadersTimothy Arceri2018-01-051-1/+3
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: Handle BGR[A/X]1010102 formats.Mario Kleiner2018-01-031-0/+6
| | | | | | Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/mesa: increase size of glsl_base_type bitfieldsBrian Paul2017-12-282-3/+4
| | | | | | | | | Change 59f458cd8703b97b31b8 added more enums to glsl_base_type. We have to bump up the size of the bitfields for fields of this type for MSVC. Also, add another assertion to catch another place where this enum bitfield is used. Reviewed-by: Neha Bhende <[email protected]>
* st/glsl_to_nir: add patch support to st_nir_assign_var_locations()Timothy Arceri2017-12-271-5/+17
| | | | | Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_nir: call post opt functions after opts have finishedTimothy Arceri2017-12-271-0/+6
| | | | | | | | | | We need to move this to a separate loop because nir_compact_varyings() can alter the IR of a previous stage. Fixes: 6648bd68fd27 "st/glsl_to_nir: enable NIR link time opts" Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/st_glsl_to_nir: call nir_lower_64bit_packTimothy Arceri2017-12-271-0/+1
| | | | | | | Fixes 56 crashes in the radeonsi nir backend. Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: plumb context priority through to driverRob Clark2017-12-191-0/+5
| | | | | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Andres Rodriguez <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* st/glsl_to_nir: skip forced array splitting for tcsTimothy Arceri2017-12-131-1/+2
| | | | | | | | | nir_lower_io_to_temporaries() does not support tcs so we cannot assume there are no indirects here. Also the radeonsi backend (the only backend to support tess) has support for tcs indirects so there is no need to lower them anyway. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: trivial whitespace/formatting fixes in st_atom_rasterizer.cBrian Paul2017-12-121-20/+22
|
* st/mesa: swizzle argument when there's a vector size mismatchIlia Mirkin2017-12-111-1/+24
| | | | | | | | | | GLSL IR operation arguments can sometimes have an implicit swizzle as a result of a vector arg and a scalar arg, where the scalar argument is implicitly expanded to the size of the vector argument. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103955 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Handle 16-bit types at st_glsl_storage_type_size()Eduardo Lima Mitev2017-12-061-0/+3
| | | | | | | | | | | This is basically to avoid "not handle in switch" warnings. v2: Let the new types hit the assertion instead. (Marek Olšák and Jason Ekstrand) Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* st/mesa: remove unneeded #include in st_format.hBrian Paul2017-12-051-1/+0
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: rename a few vars to 'bindings'Brian Paul2017-12-051-10/+10
| | | | | | | To be consistent. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: whitespace fixes in st_format.cBrian Paul2017-12-051-5/+13
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: move cloning of NIR shader for computeRob Clark2017-12-052-2/+5
| | | | | | | | | | | | | | | | Since in the NIR case, driver takes ownership of the NIR shader, we need to clone what is passed to the driver. Normally this is done as part of creating the shader variant (where is clone is anyways needed). But compute shaders have no variants, so we were cloning earlier. The problem is that after the NIR linking optimizations, we ended up cloning *before* all the lowering passes where done. So move this into st_get_cp_variant(), to make compute shaders work more like other shader stages. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: handle compute atomicsDave Airlie2017-12-052-1/+5
| | | | | | | Just reuse the cs atomics bit and emit the hw atomic state. Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/glsl_to_nir/radeonsi: enable gs support for nir backendTimothy Arceri2017-12-041-0/+12
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_nir: add gs support to st_nir_assign_var_locations()Timothy Arceri2017-12-041-6/+17
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_nir: use nir_lower_io_arrays_to_elements() to lower arraysTimothy Arceri2017-12-041-1/+1
| | | | | | | | This pass is more fully featured, it supports geom and tess shaders. It also supports interpolation intrinsics. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_nir: enable NIR link time optsTimothy Arceri2017-12-041-0/+78
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_nir: move some calls out of st_glsl_to_nir_post_opts()Timothy Arceri2017-12-041-30/+37
| | | | | | | NIR component packing will be inserted between these calls and the calling of st_glsl_to_nir_post_opts(). Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_nir: call some lowering passes earlierTimothy Arceri2017-12-041-8/+12
| | | | | | This is required so that we can enbale NIR linking optimisations. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_nir: add basic NIR opt loop helperTimothy Arceri2017-12-041-0/+31
| | | | | | | | We need to be able to do these NIR opts in the state tracker rather than the driver in order for the NIR linking opts to be useful. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_nir: make st_glsl_to_nir() staticTimothy Arceri2017-12-042-55/+51
| | | | | | Here we also move the extern C functions to the bottom of the file. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_nir: split the st_glsl_to_nir() function in twoTimothy Arceri2017-12-041-22/+34
| | | | | | | | We want to be able to generate NIR then apply NIR optimisations. Once the optimisations are done we can then apply the new post opt function which assigns uniforms etc based on the optimised IR. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_nir: create set_st_program() helperTimothy Arceri2017-12-041-34/+40
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl: move nir linking loop to new function st_link_nir()Timothy Arceri2017-12-043-17/+41
| | | | | | | This will allow us to refactor linking and include some nir link time optimisations. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/glsl_to_nir: add st_nir_assign_var_locations() helperTimothy Arceri2017-12-041-9/+34
| | | | | | This avoids packed varyings being assigned different driver locations. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: add AllowGLSLCrossStageInterpolationMismatch workaroundTapani Pälli2017-11-301-0/+2
| | | | | | | | | | | | | This fixes issues seen with certain versions of Unreal Engine 4 editor and games built with that using GLSL 4.30. v2: add driinfo_gallium change (Emil Velikov) Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97852 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103801 Acked-by: Andres Gomez <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st_glsl_to_tgsi: check for the tail sentinel in merge_two_dstsNicolai Hähnle2017-11-281-3/+3
| | | | | | | | | | This fixes yet another case where DFRACEXP has only one destination. Found by address sanitizer. Fixes tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-frexp-dvec4-only-mantissa.shader_test Fixes: 3b666aa74795 ("st/glsl_to_tgsi: fix DFRACEXP with only one destination") Acked-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: make use of driver_cache_blob with the disk cacheTimothy Arceri2017-11-282-223/+109
| | | | | | | | | | | | driver_cache_blob was introduced with the i965 disk cache, it allows us to simplify the cache a little and possibly offers some minor speed improvements since we load the GLSL metadata and TGSI from disk in one pass. Using driver_cache_blob should also make it straight forward to implement binary support for ARB_get_program_binary in gallium. Reviewed-by: Marek Olšák <[email protected]>