aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add glsl version query (v4)Vadym Shovkoplias2018-02-136-0/+104
| | | | | | | | | | | | | | | | | | | | | 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]>
* virgl: Support v2 caps struct (v2)Stéphane Marchesin2018-02-133-13/+82
| | | | | | | | | This struct allows us to report: - accurate max point size/line width. - accurate texel and texture gather offsets - vertex/geometry limits. Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: add nir_intrinsic_{load,store}_shared supportTimothy Arceri2018-02-131-0/+46
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* ac/nir_to_llvm: add support for nir_intrinsic_shared_atomic_*Timothy Arceri2018-02-131-6/+42
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radeonsi: make si_declare_compute_memory() more generic and call for nirTimothy Arceri2018-02-134-7/+18
| | | | Reviewed-by: Marek Olšák <[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-135-13/+13
| | | | 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-1327-63/+63
| | | | | | | | | 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-132-7/+6
| | | | | | 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]>
* anv: Move setting current_pipeline to cmd_state_initJason Ekstrand2018-02-121-1/+1
| | | | | | | | | | | We were setting current_pipeline to UINT32_MAX and then calling cmd_cmd_state_reset which memsets the entire state struct to 0 which implicitly resets current_pipeline to 3D. I have no idea how this hasn't caused everything to explode. Fixes: cd3feea74582 "anv/cmd_buffer: Rework anv_cmd_state_reset" cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Don't resolve or ambiguate non-existent layersJason Ekstrand2018-02-121-2/+10
| | | | | | | | | | | The previous code was trying to avoid non-existent layers by taking a MAX with anv_image_aux_layers. Unfortunately, it wasn't taking into account that layer_count starts at base_layer which may not be zero. Instead, we need to subtract base_layer from anv_image_aux_layers with a guard against roll-over. Fixes: de3be6180169f9 "anv/cmd_buffer: Rework aux tracking" Reviewed-by: Nanley Chery <[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]>
* radv: Fix compiler warning about uninitialized 'set'Eric Anholt2018-02-121-1/+1
| | | | | | | The compiler doesn't figure out that we only get result == VK_SUCCESS if set got initialized. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* glsl/tests: Fix strict aliasing warning about int64/double.Eric Anholt2018-02-121-3/+19
| | | | | Fixes: 4bf986274728 ("glsl/tests: Add UINT64 and INT64 types") Reviewed-by: Rhys Kidd <[email protected]>
* ac/nir: Fix compiler warning about uninitialized dw_addr.Eric Anholt2018-02-121-1/+1
| | | | | | | | Even switching the def's condition to be the same chip revision check as the use, the compiler doesn't figure it out. Just NULL-init it. Fixes: ec53e527421d ("ac/nir: Add ES output to LDS for GFX9.") Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/llvmpipe: Fix compiler warnings about ddx/ddy/ddmax.Eric Anholt2018-02-121-1/+1
| | | | | | | My gcc doesn't figure out that dims >= 1 (seems reasonable), and doesn't notice that ddmax is used from the same no_rho_opt as its initialization. Reviewed-by: Roland Scheidegger <[email protected]>
* anv: Drop I915_EXEC_CONSTANTS_REL_GENERAL from execbuf.Kenneth Graunke2018-02-121-2/+1
| | | | | | | | | | | | | The kernel used to have execbuf parameters to program the INSTPM bit for whether 3DSTATE_CONSTANT_* should be relative to dynamic state base address or an absolute address. However, they never worked in the presence of hardware contexts, so I deleted them a while back. It doesn't make sense to set this flag, as it doesn't exist anymore. It also never did anything anyway - the flag is zero, so |'ing it in did nothing. The default is relative anyway. 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]>
* ac/nir: remove backlink to nir_to_llvm_contextSamuel Pitoiset2018-02-121-6/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: remove nir_to_llvm_context::moduleSamuel Pitoiset2018-02-121-13/+10
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: remove nir_to_llvm_context::builderSamuel Pitoiset2018-02-121-95/+92
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: drop nir_to_llvm_context from glsl_to_llvm_type()Samuel Pitoiset2018-02-121-13/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: drop nir_to_llvm_context from visit_var_atomic()Samuel Pitoiset2018-02-121-7/+7
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: drop nir_to_llvm_context from visit_vulkan_resource_reindex()Samuel Pitoiset2018-02-121-5/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: drop nir_to_llvm_context from visit_load_push_constant()Samuel Pitoiset2018-02-121-6/+7
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: drop nir_to_llvm_context from cast_ptr()Samuel Pitoiset2018-02-121-3/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: drop nir_to_llvm_context from visit_load_local_invocation_index()Samuel Pitoiset2018-02-121-4/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: drop nir_to_llvm_context from emit_f2f16()Samuel Pitoiset2018-02-121-15/+14
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: remove unused parameters in abi::load_tess_coord()Samuel Pitoiset2018-02-123-10/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: remove useless bitcast in load_tess_coord()Samuel Pitoiset2018-02-121-8/+3
| | | | | | | nir_intrinsic_load_tess_coord always returns a v3i32. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: add load_resource() to the ABISamuel Pitoiset2018-02-122-7/+25
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: add load_sample_mask_in() to the ABISamuel Pitoiset2018-02-123-8/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: move view_index to the ABISamuel Pitoiset2018-02-122-15/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: move push_constants to the ABISamuel Pitoiset2018-02-122-4/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: move tg_size to the ABISamuel Pitoiset2018-02-122-3/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>