summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: don't clamp just based on ARB_viewport_array extensionGurchetan Singh2018-02-151-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The ARB_viewport_array spec says: "Dependencies OpenGL 1.0 is required. OpenGL 3.2 or the EXT_geometry_shader4 or ARB_geometry_shader4 extensions are required. This extension is written against the OpenGL 3.2 (Compatibility) Specification." As such, we should ignore it for GLES2 contexts. Fixes: dEQP-GLES2.functional.state_query.integers.viewport_getinteger dEQP-GLES2.functional.state_query.integers.viewport_getfloat on llvmpipe and virgl. v2: Use _mesa_has_* (Ilia) Signed-off-by: Marek Olšák <[email protected]> Cc: 17.3 18.0 <[email protected]>
* meson: use a custom target instead of a generator for i965 oaDylan Baker2018-02-141-11/+10
| | | | | | | | | | | | | | | | | | Generators really are never the thing you want. The problem in this case is that a generator must create a file that contains any file that the generated target depends on. Since brw_oa.py doesn't generate such a file the generated sources are not regenerated even if the xml files they should depend on changes. While we could change brw_oa.py to write such a file, that's silly, it depends on itself and the xml file. So we'll just use a custom target instead, which will have the correct dependency behavior and doesn't really add that much code. Fixes: 3218056e0eb3 ("meson: Build i965 and dri stack") CC: Ian Romanick <[email protected]> Signed-off-by: Dylan Baker <[email protected]> Acked-by: Lionel Landwerlin <[email protected]>
* st: add NIR GL_ARB_get_program_binary supportTimothy Arceri2018-02-151-2/+13
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/shader_cache: add st_{de}serialise_nir_program() helpersTimothy Arceri2018-02-152-0/+22
| | | | | | These will be used for NIR GL_ARB_get_program_binary support. Reviewed-by: Marek Olšák <[email protected]>
* i965: Add gl_state_index casts for PATCH_VERTICES_INJason Ekstrand2018-02-141-1/+2
| | | | | | | | This fixes the build in clang Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105088 Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/miptree: Initialize mcs with a linear mapScott D Phillips2018-02-141-1/+1
| | | | | | | When initializing mcs, map with MAP_RAW and fill in the linear map. Removes a place where gtt mapping is used. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/tiled_memcpy: change linear pointer from (0, 0) to (xt1, yt1)Scott D Phillips2018-02-143-11/+11
| | | | | | | In all current uses, the linear surface is only allocated starting at (xt1, yt1) anyway, so this improves the calling ergonomics. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/tiled_memcpy: linear_to_ytiled a cache line at a timeScott D Phillips2018-02-141-6/+66
| | | | | | | | | | | | | | | | | | TileY's low 6 address bits are: v1 v0 u3 u2 u1 u0 Thus a cache line in the tiled surface is composed of a 2d area of 16x4 bytes of the linear surface. Add a special case where the area being copied is 4-line aligned and a multiple of 4-lines so that entire cache lines will be written at a time. On Apollolake, this increases tiling throughput to wc maps by 84.0103% +/- 0.862818% v2: Split [y0, y1) and [y2, y3) loops apart for clarity (Jason Ekstrand) v3: Don't reset src var (Jason), Ensure y0 <= y1 <= y2 <= y3 Reviewed-by: Jason Ekstrand <[email protected]>
* i965/gen10: Remove warning message.Rafael Antognolli2018-02-141-7/+0
| | | | | | | | | | | | Gen10 seems pretty stable so far, so there's no reason to keep this message. Signed-off-by: Rafael Antognolli <[email protected]> Cc: Kenneth Graunke <[email protected]> Cc: "18.0" [email protected] Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add glsl version query (v4)Vadym Shovkoplias2018-02-135-0/+103
| | | | | | | | | | | | | | | | | | | | | Add support for GL_NUM_SHADING_LANGUAGE_VERSIONS and glGetStringi for GL_SHADING_LANGUAGE_VERSION v2: - Combine similar functionality into _mesa_get_shading_language_version() function. - Change GLSL version return mechanism. v3: - Add return of empty string for GLSL ver 1.10. - Move _mesa_get_shading_language_version() function to src/mesa/main/version.c. v4: - Add OpenGL version check. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104915 Signed-off-by: Andriy Khulap <[email protected]> Signed-off-by: Vadym Shovkoplias <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add missing switch case for EXTRA_VERSION_40 in check_extra()Brian Paul2018-02-131-0/+5
| | | | | | | | | The EXTRA_VERSION_40 predicate is tested as part of extra_gl40_ARB_sample_shading but there was no switch case for it. Fixes: 77b440e42d8e7247c2295 ("mesa: Add new functions and enums required by GL_ARB_sample_shading") Reviewed-by: Eric Engestrom <[email protected]>
* mesa: fix compile failureMark Janes2018-02-131-0/+1
| | | | | | | Missing header triggered a failure in i965 CI buildtest project. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105067 Fixes: e149a0253c12d103805230bc7bc0a36887c3b8df
* Partially revert "mesa: use GLenum16 in a few more places"Mark Janes2018-02-131-1/+1
| | | | | | This reverts part of commit ca721b3d894a49d7342f5aa053ed132017e9352a. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105067
* Revert "mesa: reduce the size of gl_texture_image"Mark Janes2018-02-131-24/+23
| | | | | | | | | This reverts commit f4ea2b2a9e99d93fbf36c3f0e5f6f384be3cdb89. Several members reduced in size by the offending commit are not large enough to store the data needed by the i965 driver. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105067
* i965: fix tessellation regressions with gl_state_index16Dave Airlie2018-02-121-1/+1
| | | | | | | | | Looks like one conversion was missed. Fixes: e149a0253 (mesa,glsl,nir: reduce gl_state_index size to 2 bytes) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105067 Signed-off-by: Dave Airlie <[email protected]> Tested-by: Mark Janes <[email protected]>
* st/glsl: set req_local_mem earlier for compute shadersTimothy Arceri2018-02-131-1/+2
| | | | | | Without this change it will never be set for backends using nir. Reviewed-by: Marek Olšák <[email protected]>
* mesa: move STATE_LENGTH to shader_enums.h and use it everywhereMarek Olšák2018-02-131-6/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: reduce the size of gl_texture_imageMarek Olšák2018-02-131-23/+24
| | | | | | 80 -> 40 bytes. Reviewed-by: Brian Paul <[email protected]>
* mesa: reduce the size of gl_program_parameterMarek Olšák2018-02-131-3/+3
| | | | | | 40 -> 24 bytes, which includes the gl_state_index16 change. Reviewed-by: Brian Paul <[email protected]>
* mesa,glsl,nir: reduce gl_state_index size to 2 bytesMarek Olšák2018-02-1320-51/+48
| | | | | | | | | Let's use the new gl_state_index16 type everywhere and remove the typecasts. This helps reduce the size of gl_program_parameter. Reviewed-by: Brian Paul <[email protected]>
* mesa: reduce the size of gl_viewport_attribMarek Olšák2018-02-132-2/+2
| | | | | | | | | | | All drivers convert these to float, so there is no reason to use double. The piglit test that expects double precision from glGet will be adjusted not to require it (there is a piglit patch). gl_context::ViewportArray: 512 -> 384 bytes Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: reduce the size of gl_texture_objectMarek Olšák2018-02-132-30/+30
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: reduce the size of gl_programMarek Olšák2018-02-131-2/+2
| | | | | | gl_program: 1456 -> 976 bytes Reviewed-by: Brian Paul <[email protected]>
* mesa: reduce the size of gl_image_unit (v2)Marek Olšák2018-02-132-7/+8
| | | | | | | | gl_context::ImageUnits: 6144 -> 4608 bytes v2: use ASSERT_BITFIELD_SIZE Reviewed-by: Brian Paul <[email protected]>
* mesa: further reduce the size of ctx->TextureMarek Olšák2018-02-132-23/+26
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: decrease the array size of ctx->Texture.FixedFuncUnit to 8Marek Olšák2018-02-135-2/+37
| | | | | | | | | | GL allows doing glTexEnv on 192 texture units, while in reality, only MaxTextureCoordUnits units are used by fixed-func shaders. There is a piglit patch that adjusts piglits/texunits to check only MaxTextureCoordUnits units. Reviewed-by: Brian Paul <[email protected]>
* mesa: separate legacy stuff from gl_texture_unit into gl_fixedfunc_texture_unitMarek Olšák2018-02-1332-174/+250
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: inline init_texture_unitMarek Olšák2018-02-131-51/+39
| | | | | | because this is going to be changed Reviewed-by: Brian Paul <[email protected]>
* mesa: use GLenum16 in a few more placesMarek Olšák2018-02-131-3/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* i965: Fix bugs in intel_from_planarDaniel Stone2018-02-121-27/+29
| | | | | | | | | | | | | | This commit fixes two bugs in intel_from_planar. First, if the planar format was non-NULL but only had a single plane, we were falling through to the planar case. If we had a CCS modifier and plane == 1, we would return NULL instead of the CCS plane. Second, if we did end up in the planar_format == NULL case and the modifier was DRM_FORMAT_MOD_INVALID, we would end up segfaulting in isl_drm_modifier_has_aux. Cc: [email protected] Fixes: 8f6e54c92966bb94a3f05f2cc7ea804273e125ad Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* r200: remove left over dead codeEric Engestrom2018-02-121-20/+0
| | | | | | | | | | 0aaa27f29187ffb739c7 removed the references to this array without removing the array itself Cc: Ian Romanick <[email protected]> Fixes: 0aaa27f29187ffb739c7 "mesa: Pass the translated color logic op dd_function_table::LogicOpcode" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Elie Tournier <[email protected]>
* st/glsl_to_nir: remove unused options variableTimothy Arceri2018-02-101-2/+0
|
* st/radeonsi: enable disk cache for nirTimothy Arceri2018-02-101-4/+11
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st: add nir shader disk cache supportTimothy Arceri2018-02-104-44/+135
| | | | | | v2: include compute shader support Reviewed-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: move nir detection earlierTimothy Arceri2018-02-101-8/+7
| | | | | | | | | | | We move the nir check before the shader cache call so that we can call a nir based caching function in a following patch. Also with this change we simply check if vertex shaders support NIR rather than looping over the stages as mixing of shader types is not supported anyway. Reviewed-by: Marek Olšák <[email protected]>
* Revert "i965: prevent potentially null pointer access"Mark Janes2018-02-091-1/+1
| | | | | | | This reverts commit 712332ed54f14b5ee34c2990e351ca48992488b2, which caused over 90k failures in Mesa i965 CI. Reviewed-by: Dylan Baker <[email protected]>
* st/mesa: generate blend state according to the number of enabled color buffersMarek Olšák2018-02-094-9/+16
| | | | | | | | | | Non-MRT cases always translate blend state for 1 color buffer only. MRT cases only check and translate blend state for enabled color buffers. This also avoids an assertion failure in translate_blend for: dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common.common_advanced_blend_eq_buffer_blend_eq Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: don't translate blend state when color writes are disabledMarek Olšák2018-02-091-4/+6
| | | | Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: don't translate blend state when it's disabled for a colorbufferMarek Olšák2018-02-091-3/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: prevent potentially null pointer accessLionel Landwerlin2018-02-091-1/+1
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]> CID: 1418110
* st/mesa: Initialize tex_target in compile_tgsi_instructionMichel Dänzer2018-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize to TGSI_TEXTURE_BUFFER (== 0), same as was done before the variable type was changed to enum tgsi_texture_type. Fixes a bunch of piglit failures with radeonsi, e.g.: gles-3.0-transform-feedback-uniform-buffer-object: ../../../../src/gallium/auxiliary/tgsi/tgsi_util.c:502: tgsi_util_get_texture_coord_dim: Assertion `!"unknown texture target"' failed. Corresponding compiler warning: CXX state_tracker/st_glsl_to_tgsi.lo ../../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp: In function ‘pipe_error st_translate_program(gl_context*, uint, ureg_program*, glsl_to_tgsi_visitor*, const gl_program*, GLuint, const ubyte*, const ubyte*, const ubyte*, const ubyte*, const ubyte*, GLuint, const ubyte*, const ubyte*, const ubyte*)’: ../../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5992:23: warning: ‘tex_target’ may be used uninitialized in this function [-Wmaybe-uninitialized] ureg_memory_insn(ureg, inst->op, dst, num_dst, src, num_src, ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inst->buffer_access, ~~~~~~~~~~~~~~~~~~~~ tex_target, inst->image_format); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5866:27: note: ‘tex_target’ was declared here enum tgsi_texture_type tex_target; ^~~~~~~~~~ Fixes: 9f9ce1625fb3 ("st/mesa: use TGSI enum types in st_glsl_to_tgsi.cpp") Reviewed-by: Marek Olšák <[email protected]>
* mesa: Only update enabled VAO gl_vertex_array entries.Mathias Fröhlich2018-02-092-15/+22
| | | | | | | | | | | | Instead of updating all modified gl_vertex_array_object::_VertexArray entries just update those that are modified and enabled. Also release buffer object from the _VertexArray that belong to disabled attributes. v2: Also set Ptr and Size to zero. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Mute arrays for several meta like callbacks.Mathias Fröhlich2018-02-095-5/+18
| | | | | | | | | | | | | Set the _DrawArray pointer to NULL when calling into the Drivers Bitmap/CopyPixels/DrawAtlasBitmaps/DrawPixels/DrawTex hooks. This fixes an assert that gets uncovered when the following patch gets applied. v2: Mute from within the state tracker instead of generic mesa. v3: Avoid evaluating _DrawArrays from within st_validate_state. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Fix VAO buffer object tracking.Mathias Fröhlich2018-02-091-0/+2
| | | | | | | | When changing the attribute binding in the VAO we also need to account for getting rid of non vbo bits from VertexAttribBufferMask. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* intel/blorp: Use isl_aux_op instead of blorp_hiz_opJason Ekstrand2018-02-084-18/+18
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* intel/blorp: Use isl_aux_op instead of blorp_fast_clear_opJason Ekstrand2018-02-083-20/+20
| | | | | Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* st/mesa: s/unsigned/enum tgsi_semantic/ st_cb_drawpixels.cBrian Paul2018-02-081-1/+1
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: add a comment on vbo_draw_transform_feedback()Brian Paul2018-02-081-0/+8
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: improve comments on vbo_draw_func()Brian Paul2018-02-081-4/+5
| | | | | | | And rename a parameter name. Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: rename some vars related to indirect draw countBrian Paul2018-02-081-6/+7
| | | | | | | | 'indirect_params' was a bit vague. Use the names that we use in gallium's pipe_draw_indirect_info. Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>