aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* radeon: Drop the unused first arg of OUT_BATCH_RELOC.Eric Anholt2019-10-209-24/+24
| | | | | | | This was a trap when trying to figure out how to fit data bits into the reloc. Reviewed-by: Marek Olšák <[email protected]>
* radeon: Fill in the TXOFFSET field containing the tile bits in our relocs.Eric Anholt2019-10-202-4/+5
| | | | | | | | | | The first arg to OUT_BATCH_RELOC is ignored, we actually wanted these in the third arg. They're always 0 so far, so it didn't matter. v2: Reword commit message that I don't end up using the tile bits, but keep the commit as a cleanup anyway. Reviewed-by: Marek Olšák <[email protected]> (v1)
* r100/r200: factor out txformat/txfilter setup from the TFP path.Eric Anholt2019-10-202-22/+10
| | | | | | | | | No matter what, we deref the texFormat from the table, except for a mistake in cpp=4 where we pulled a 0 out of the table either way. v2: Rebase on dropping r200 table deduplication patch. Reviewed-by: Marek Olšák <[email protected]> (v1)
* Revert "egl: Fixes transparency with EGL and X11."Hal Gentz2019-10-182-5/+0
| | | | This reverts commit 90a19074b4e1d4d8f8ababaade8170c05aeecffe.
* mesa/main: GL_GEOMETRY_SHADER_INVOCATIONS exists in GL_OES_geometry_shaderIago Toral Quiroga2019-10-181-1/+3
| | | | | | | | It seems that for desktop GL this was included with ARB_gpu_shader5, but for OpenGL ES this is already included with the base extension and there is a CTS test that checks this. Reviewed-by: Marek Olšák <[email protected]>
* mesa: implement glTextureStorageNDEXT functionsPierre-Eric Pelloux Prayer2019-10-181-38/+24
| | | | | | | | Implement the 3 functions using the texturestorage_error() helper. _mesa_lookup_or_create_texture is always called to make sure that 'texture' is initialized (even if the texturestorage_error() generates an error afterwards). Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa NamedCopyBufferSubDataEXT functionPierre-Eric Pelloux-Prayer2019-10-183-2/+31
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa NamedRenderbufferStorageMultisampleEXT functionPierre-Eric Pelloux-Prayer2019-10-182-0/+24
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa Generate*MipmapEXT functionsPierre-Eric Pelloux-Prayer2019-10-183-2/+35
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: refactor GenerateTextureMipmap handlingPierre-Eric Pelloux-Prayer2019-10-181-32/+25
| | | | | | Rework _mesa_GenerateTextureMipmap to allow code sharing with EXT_dsa functions. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glGetFloati_vEXT/glGetDoublei_vEXTPierre-Eric Pelloux-Prayer2019-10-181-2/+0
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa + EXT_gpu_program_parameters functionsPierre-Eric Pelloux-Prayer2019-10-183-15/+45
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa + EXT_gpu_shader4 functionsPierre-Eric Pelloux-Prayer2019-10-181-8/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa + EXT_texture_integer functionsPierre-Eric Pelloux-Prayer2019-10-184-8/+292
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa + EXT_texture_buffer_object functionsPierre-Eric Pelloux-Prayer2019-10-183-2/+69
| | | | Reviewed-by: Marek Olšák <[email protected]>
* 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]>