summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: reduce the size of gl_programMarek Olšák2018-02-131-2/+2
| | | | | | gl_program: 1456 -> 976 bytes Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* mesa: further reduce the size of ctx->TextureMarek Olšák2018-02-132-23/+26
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* mesa: separate legacy stuff from gl_texture_unit into gl_fixedfunc_texture_unitMarek Olšák2018-02-1332-174/+250
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: inline init_texture_unitMarek Olšák2018-02-131-51/+39
| | | | | | because this is going to be changed Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: use GLenum16 in a few more placesMarek Olšák2018-02-131-3/+3
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* 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: mesa-stable@lists.freedesktop.org Fixes: 8f6e54c92966bb94a3f05f2cc7ea804273e125ad Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* 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 <ian.d.romanick@intel.com> Fixes: 0aaa27f29187ffb739c7 "mesa: Pass the translated color logic op dd_function_table::LogicOpcode" Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
* 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 <marek.olsak@amd.com>
* st: add nir shader disk cache supportTimothy Arceri2018-02-104-44/+135
| | | | | | v2: include compute shader support Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* 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 <marek.olsak@amd.com>
* 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 <dylan@pnwbakers.com>
* 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 <eric@anholt.net>
* st/mesa: don't translate blend state when color writes are disabledMarek Olšák2018-02-091-4/+6
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* st/mesa: don't translate blend state when it's disabled for a colorbufferMarek Olšák2018-02-091-3/+4
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* i965: prevent potentially null pointer accessLionel Landwerlin2018-02-091-1/+1
| | | | | | Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> 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 <marek.olsak@amd.com>
* 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 <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <Mathias.Froehlich@web.de> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* 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 <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
* intel/blorp: Use isl_aux_op instead of blorp_hiz_opJason Ekstrand2018-02-084-18/+18
| | | | | Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
* intel/blorp: Use isl_aux_op instead of blorp_fast_clear_opJason Ekstrand2018-02-083-20/+20
| | | | | Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
* st/mesa: s/unsigned/enum tgsi_semantic/ st_cb_drawpixels.cBrian Paul2018-02-081-1/+1
| | | | | Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* vbo: add a comment on vbo_draw_transform_feedback()Brian Paul2018-02-081-0/+8
| | | | | Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* vbo: improve comments on vbo_draw_func()Brian Paul2018-02-081-4/+5
| | | | | | | And rename a parameter name. Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* 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 <mathias.froehlich@web.de> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* st/mesa: remove out_num_textures from update_texturesMarek Olšák2018-02-081-20/+12
| | | | Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
* st/mesa: don't store non-fragment sampler states and views in st_contextMarek Olšák2018-02-086-62/+61
| | | | | | | | those are unused. st_context: 10120 -> 3704 bytes Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
* i965: perf: cleanup detection of kernel support for loadable configsLionel Landwerlin2018-02-081-15/+2
| | | | | | | | | | | | The initial revision of the patch adding loadable configs was testing the feature's availability by adding a new config successfully and then removing it. A second version tested the availability just by exercising the removal. But some unused code remained. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* i965: perf: use drmIoctl() instead of ioctl()Lionel Landwerlin2018-02-081-2/+2
| | | | | | | | | | | ioctl() might be interrupted, use drmIoctl() instead as it'll retry automatically. Fixes: 27ee83eaf7e "i965: perf: add support for userspace configurations" Cc: "18.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Tested-by: Mark Janes <mark.a.janes@intel.com>
* i965: perf: add debug messages for loaded configsLionel Landwerlin2018-02-081-0/+2
| | | | | | | | This helps figuring out potential problems when metrics don't show up on frameretrace for example. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* mesa: (trivial) remove unused ignore_sample_qualifier_parameterRoland Scheidegger2018-02-083-10/+6
| | | | | | | | This parameter for _mesa_get_min_incations_per_fragment() was once used by the intel driver, but it's long gone. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Dave Airlie <airlied@vmware.com>
* st/mesa: use tgsi_semantic enum typeBrian Paul2018-02-072-5/+8
| | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* st/mesa: use TGSI enum types in st_glsl_to_tgsi.cppBrian Paul2018-02-071-7/+7
| | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* mesa: fix incorrect type when allocating arraysAndres Rodriguez2018-02-071-4/+4
| | | | | | | | | The array members are have type 'struct gl_buffer_object *' Found by coverity. Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* autotools: Only build libmesa-st-tests-common.a for tests.Bas Nieuwenhuizen2018-02-071-1/+1
| | | | | | | | We don't need the library if we don't build tests, and building it adds a dependency on gtest which adds a dependency on cxxabi.h. Fixes: 6569b33b6e "mesa/st/tests: unify MockCodeLine* classes" Reviewed-By: Gert Wollny <gw.fossdev@gmail.com>
* i965: add __DRI2_BLOB support and set cache functionsTapani Pälli2018-02-071-0/+21
| | | | | | | | v2: adjust to change that moved cache from ctx to screen Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* i965: allocate a SGVS element when VertexID or InstanceID are readIago Toral Quiroga2018-02-071-15/+2
| | | | | | | | | | | | | | | | | | | | Although on gen8+ platforms we can in theory use 3DSTATE_VF_SGVS to put these beyond the last vertex element it seems that we still need to allocate the SVGS element, otherwise we have observed cases where we end up reading garbage. Specifically, the CTS test mentioned below was flaky with a fail rate of ~1% on some gen9+ platforms caused by reading garbage for the gl_InstanceID value. The flakyness goes away as soon as we start allocating the SVGS element. v2: - Do this for gen8+, not just gen9+, and pull the boolean outside the #if block (Jason) Fixes flaky test: KHR-GL45.vertex_attrib_64bit.limits_test Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104335 Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* glapi: Don't search through subdirs from glapitable.hDylan Baker2018-02-061-0/+2
| | | | | | | | Because meson won't put it in that folder. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* state_tracker: Don't build st-renumerate-test without shared glapiDylan Baker2018-02-061-0/+2
| | | | | | Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* meson: fix test source name for static glapiDylan Baker2018-02-061-1/+1
| | | | | | | fixes: 43a6e84927e3 ("meson: build mesa test.") Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* mesa: rename gl_vertex_array_object::_VertexAttrib -> _VertexArrayBrian Paul2018-02-064-11/+10
| | | | | | | | | Since the type is gl_vertex_array. Update comment to explain that these arrays are only used by the VBO module. Also rename some local variables in _mesa_update_vao_derived_arrays(). Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
* mesa: minor whitespace fixes, line wrapping in texcompress.cBrian Paul2018-02-061-12/+14
| | | | Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* mesa: simplify _mesa_get_compressed_formats()Brian Paul2018-02-061-117/+83
| | | | | | | Instead of testing for formats==NULL everywhere, just point formats at a dummy array which will be discarded. Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* st/mesa: use st_access_flags_to_transfer_flags() helper in more placesBrian Paul2018-02-062-18/+17
| | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* st/mesa: refactor st_bufferobj_map_range()Brian Paul2018-02-062-11/+31
| | | | | | | | | Use a new helper function, st_access_flags_to_transfer_flags(), to convert the GL_MAP_x flags to PIPE_TRANSFER_x flags. We'll be able to use this function in a couple other places. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* st/mesa: refactor bufferobj_data()Brian Paul2018-02-061-87/+104
| | | | | | | | Split out some of the code into three new helper functions: buffer_target_to_bind_flags(), storage_flags_to_buffer_flags(), buffer_usage() to make the code more managable. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* mesa: Factor out _mesa_disable_vertex_array_attrib.Mathias Fröhlich2018-02-064-80/+75
| | | | | | | | And use it in the enable code path. Move _mesa_update_attribute_map_mode into its only remaining file. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>