aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add EXT_dsa glProgramUniform*EXT functionsPierre-Eric Pelloux-Prayer2019-10-181-25/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa NamedProgram functionsPierre-Eric Pelloux-Prayer2019-10-184-72/+404
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glClientAttribDefaultEXT / glPushClientAttribDefaultEXTPierre-Eric Pelloux-Prayer2019-10-183-2/+83
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glNamedRenderbufferStorageEXT and ↵Pierre-Eric Pelloux-Prayer2019-10-183-2/+43
| | | | | | glGetNamedRenderbufferParameterivEXT Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: don't call variables "tgsi" when they can reference NIRMarek Olšák2019-10-172-65/+65
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: merge st_fragment_program into st_common_programMarek Olšák2019-10-1712-135/+61
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: remove redundant function st_reference_compprogMarek Olšák2019-10-172-11/+1
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: remove unused st_xxx_program::sha1Marek Olšák2019-10-171-6/+0
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: remove st_vp_variant_key in favor of st_common_variant_keyMarek Olšák2019-10-173-25/+8
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: remove num_tgsi_tokens from st_xx_programMarek Olšák2019-10-173-30/+16
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: rename basic -> common for st_common_programMarek Olšák2019-10-175-30/+30
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: rename st_xxx_program::tgsi to stateMarek Olšák2019-10-176-97/+97
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: lower doubles for NIR after linkingMarek Olšák2019-10-171-20/+17
| | | | | | | This allows dropping 1 call to st_nir_opts, because shaders are always optimized after linking. Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: call st_nir_opts for linked shaders only onceMarek Olšák2019-10-171-1/+12
| | | | | | | | | | | | | | | | | | The removed st_nir_opts calls are mostly redundant. There is an improvement with shader-db on radeonsi: Before: real 1m54.047s user 28m37.857s sys 0m7.573s After: real 1m52.012s user 28m3.412s sys 0m7.808s Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Refactor the entirety of _mesa_format_matches_format_and_type().Eric Anholt2019-10-176-642/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | This function was difficult to implement for new formats due to the combination of endianness and swapbytes support. Since it's mostly used for fast paths, bugs in it were often missed during testing. Just reimplement it on top of the recent _mesa_format_from_format_and_type() which can give us a canonical MESA_FORMAT for a format and type enum (while respecting endianness). Fixes: - R4G4B4A4_UNORM, B4G4R4_UINT, R4G4B4A4_UINT incorrectly matched with swapBytes (you can't just reverse the channels if the channels aren't bytes) - A4R4G4B4_UNORM and A4R4G4B4_UINT missing BGRA/4444_REV matches - failing to match RGB/BGR unorm8 array formats on BE - 2101010 formats incorrectly matching with swapBytes set. - UINT/SINT byte formats failed to match with swapBytes set. This deletes the part of tests/mesa_formats.cpp that called _mesa_format_matches_format_and_type() to make sure it didn't assertion fail, as it now would assertion fail due to the fact that we were passing an invalid format (GL_RG) for most types. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add support for array formats of depth and stencil.Eric Anholt2019-10-176-8/+83
| | | | | | | | | | | In desktop GL, you can specify things like GL_DEPTH_COMPONENT/GL_BYTE as a ReadPixels format, and we need to be able to represent that to see if we have proper MESA_FORMATs for them. That's exactly what the mesa_array_format enum is for. v2: Drop _mesa from static fn. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add format/type matching for DEPTH/UINT_24_8.Eric Anholt2019-10-171-0/+2
| | | | | | | | We had missed this case where GLES3 allows glReadPixels(DEPTH, UINT_24_8), and just got lucky by the readpixels path never asking for the matching format from this function. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix depth/stencil ordering in _mesa_format_from_format_and_type().Eric Anholt2019-10-171-1/+1
| | | | | | | | | | The GL spec says the 24-bit component is in the high bits, and format_unpack.c looks at the high 24 bits in the S8Z24 case, not Z24SS8. Avoids a regression in the next commit. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add debug info to _mesa_format_from_format_and_type() error path.Eric Anholt2019-10-171-0/+4
| | | | | | | The unreachable() that follows isn't very useful for debug, and by adding this here we get a nice description of the failure in debug builds. Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: Also enable GS when ESSLVersion > 320Kristian H. Kristensen2019-10-171-1/+1
| | | | Signed-off-by: Kristian H. Kristensen <[email protected]>
* st/mesa: silence a warning in st_nir_lower_tex_src_planeMarek Olšák2019-10-171-1/+1
| | | | trivial
* st/mesa: call the reset callback if glGetGraphicsResetStatus returns a failureMarek Olšák2019-10-171-12/+14
| | | | | | so that we immediately set the no-op dispatch Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* mesa/st: support lowering user-clip-planes automaticallyErik Faye-Lund2019-10-175-2/+42
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/program: support referencing the clip-space clip-plane stateErik Faye-Lund2019-10-172-0/+14
| | | | Reviewed-by: Marek Olšák <[email protected]>
* nir: support feeding state to nir_lower_clip_[vg]sErik Faye-Lund2019-10-171-1/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* nir: support lowering clipdist to arraysErik Faye-Lund2019-10-171-1/+1
| | | | | | | | This allows us to make sure clipdist is emitted as a scalar array rather than two vec4s. This matches SPIR-V semantics, and will be useful for Zink. Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: automatically lower two-sided lightingErik Faye-Lund2019-10-176-3/+19
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: automatically lower point-sizeErik Faye-Lund2019-10-175-1/+22
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: move point_size_per_vertex-logic to helperErik Faye-Lund2019-10-172-30/+34
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: automatically lower alpha-testingErik Faye-Lund2019-10-175-1/+24
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: expose alpha-ref as a state-variableErik Faye-Lund2019-10-172-0/+11
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: handling lower flatshading for NIR drivers.Dave Airlie2019-10-176-1/+18
| | | | | | | This uses the NIR pass to lower flatshading when the driver requests it. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: reorder and document code in st_translate_vertex_programMarek Olšák2019-10-161-19/+25
| | | | | | move the TGSI code after the ARB_vp code Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: call prog_to_nir sooner for ARB_fpMarek Olšák2019-10-161-34/+32
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: don't call translate_*_program functions for NIRMarek Olšák2019-10-163-27/+21
| | | | | | move the initializaton to st_link_nir Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: finalize NIR after shader variant passes for TCS/TES/GS/CSMarek Olšák2019-10-161-2/+3
| | | | | | | | Same as VS and FS. This might fix vertex color clamping. Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: unify transform feedback info translation codeMarek Olšák2019-10-164-86/+48
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: move vertex program preparation code into st_prepare_vertex_programMarek Olšák2019-10-162-31/+42
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: clean up more after the removal of st_compute_programMarek Olšák2019-10-163-124/+31
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: deduplicate st_common_program code in st_program_string_notifyMarek Olšák2019-10-161-40/+8
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: sink TCS/TES/GS/CS translate code into st_translate_common_programMarek Olšák2019-10-163-221/+116
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: deduplicate cases in st_deserialise_ir_programMarek Olšák2019-10-161-73/+20
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: remove st_compute_program in favor of st_common_programMarek Olšák2019-10-1611-174/+59
| | | | | | | The conversion from pipe_shader_state to pipe_compute_state is done at the end. Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: don't store stream output info to shader cache for tess ctrl shadersMarek Olšák2019-10-161-2/+3
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: simplify the signature of st_release_basic_variantsMarek Olšák2019-10-164-28/+13
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: deduplicate code for ATI fs in st_program_string_notifyMarek Olšák2019-10-161-17/+9
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: use *prog at the end of st_link_nirMarek Olšák2019-10-161-4/+4
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: fix crash for drivers supporting nir defaulting to tgsiKarol Herbst2019-10-161-4/+4
| | | | | | | | | | | | nvc0 and I assume radeonsi as well hit an assert inside glsl_to_tgsi as atan instructions get inserted into the shader. Fixes: cece947a8dfa ("glsl/builtin: Add alternate versions of atan using new ops") Cc: Neil Roberts <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* mesa/math: delete duplicate extern symbolEric Engestrom2019-10-161-2/+0
| | | | | | | | It's already defined in `m_debug_util.h`, along with an explanation of what it is and how to use it. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/math: delete leftover... from 18 years ago (!)Eric Engestrom2019-10-161-4/+0
| | | | | | | Left over from 0a79baf1bff93718e50a ("remove dead vertex assembly"). Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>