aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* meson: define empty variables for libswdri and libswkmsdriDylan Baker2018-02-153-5/+12
| | | | | | | | | | | | | | | This allows these variables to unconditionally included in `link_with` lists, even if they're not used. This allows deleting duplicated logic in nearly every gallium target implemented in meson today. This also removes the now useless `build_by_default` flag from swdri and swkmsdri. v4: - add this patch Fixes: 66c94b9313a697ce8f2b222f4ba353035e4b8726 ("meson: build gallium winsys for dri, null, and wrapper") Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: add convenience variable for anv_extensions.py depdendencyDylan Baker2018-02-151-4/+6
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* meson: use depend_files for adding extra file dependenciesDylan Baker2018-02-151-2/+2
| | | | | | | cc: Jason Ekstrand <[email protected]> Fixes: dd088d4bec74f37ffe4 ("anv/extensions: Generate a header file with extension tables") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* meson: use depend_files to track extra file dependenciesDylan Baker2018-02-151-2/+2
| | | | | | | cc: Jason Ekstrand <[email protected]> Fixes: f93994080993bda ("anv: Split anv_extensions.py into two files") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* Revert "anv/meson: Make anv_entrypoints_gen.py depend on anv_extensions.py"Dylan Baker2018-02-151-2/+1
| | | | | | | | | | | | | This reverts commit 10d1b0be8e9c463dbc35cd66968299f33c76672c. This is unnecessary, the depend_files argument is for adding dependencies on files that are not part of the input, which is already done. cc: Jason Ekstrand <[email protected]> Fixes: 10d1b0be8e9c463dbc35cd66968299f33c76672c Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* svga: replace gotos with else clausesBrian Paul2018-02-153-23/+20
| | | | | | Simple clean-up. Reviewed-by: Charmaine Lee <[email protected]>
* svga: s/unsigned/enum pipe_shader_type/Brian Paul2018-02-153-4/+6
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: move duplicated code for setting fillmode/flatshade stateBrian Paul2018-02-151-20/+10
| | | | | | | Move the calls to svga_hwtnl_set_fillmode() and svga_hwtnl_set_flatshade() out of the two retry_draw_*() functions to the svga_draw_vbo() function. Reviewed-by: Charmaine Lee <[email protected]>
* svga: move svga_update_state() call in draw codeBrian Paul2018-02-151-18/+19
| | | | | | | | | | | | | | | | This fixes a few Piglit transform feedback regressions caused by commit 7a1401938b351. In that change I moved the moved svga_update_state() into the loops, after the calls to svga_hwtnl_set_flatshade(). But svga_hwtnl_set_flatshade() actually depends on some derived shader state. This patch moves the svga_update_state() call into svga_draw_vbo() so it's not duplicated in two places. Fixes: 7a1401938b351 ("svga: clean up retry_draw_range_elements(), retry_draw_arrays()") Reviewed-by: Charmaine Lee <[email protected]>
* svga: call tgsi_scan_shader() for dummy shadersBrian Paul2018-02-152-0/+7
| | | | | | | | | | | | | | If we fail to compile the normal VS or FS we fall back to a simple/ dummy shader. We need to rescan the the shader to update the shader info. Otherwise, this can lead to further translations failures because the shader info doesn't match the actual shader. Found by adding some extra debug assertions in the state-update code while debugging something else. v2: also update shader generic_inputs/outputs, etc. per Charmaine Reviewed-by: Charmaine Lee <[email protected]>
* ac/nir: do not reserve user SGPRs for unused descriptor setsSamuel Pitoiset2018-02-151-3/+6
| | | | | | | | | | | | | In theory this might lead to corruption if we bind a descriptor set which is unused, because LLVM is smart and it can re-use unused user SGPRs. In practice, this doesn't seem to fix anything. As a side effect, this will reduce the number of emitted SH_REG packets. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/shader: fix gathering of desc_set_used_maskSamuel Pitoiset2018-02-151-1/+1
| | | | | | | This was quite wrong. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/shader: be a little smarter when scanning vertex buffersSamuel Pitoiset2018-02-151-1/+11
| | | | | | | | | | Although meta shaders don't use any vertex buffers, there is no behaviour change but I think it's better to do this. Though, this saves two user SGPRs for push constants inlining or something else. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* dri: fromPlanar() can return NULL as a valid resultLouis-Francis Ratté-Boulianne2018-02-154-8/+10
| | | | | | | | | | | | | It was assumed that fromPlanar() could return NULL to mean that the planar image is the same as the parent DRI image. That assumption wasn't made everywhere though. Let's fix things and make sure that all callers understand a NULL result Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* nvc0: disable MS Images for sample_count == 1 on MaxwellKarol Herbst2018-02-151-1/+1
| | | | | | | | fixes KHR-GL45.multi_bind.dispatch_bind_textures on Maxwell Suggested-by: Ilia Mirkin <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* 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]>
* isl: Don't use surface format R32_FLOAT for typed atomic integer operationsAnuj Phogat2018-02-141-1/+8
| | | | | | | | | | | | | | | From Skylake PRM Surface Formats section: "The surface format for the typed atomic integer operations must be R32_UINT or R32_SINT." Fixes an error and a piglit GPU hang in simulation environment. Piglit test: gl45-imageAtomicExchange-float.shader_test Suggested-by: Francisco Jerez <[email protected]> Signed-off-by: Anuj Phogat <[email protected] Reviewed-by: Kenneth Graunke <[email protected]> Cc: "18.0 17.3" <[email protected]>
* radeonsi/nir: fix si_nir_load_tcs_varyings() for outputsTimothy Arceri2018-02-151-2/+11
| | | | | | We were incorrectly using the input info for outputs. Reviewed-by: Marek Olšák <[email protected]>
* ac: implement nir_intrinsic_image_samplesTimothy Arceri2018-02-151-0/+23
| | | | | | | Fixes cts test: KHR-GL45.shader_texture_image_samples_tests.image_functional_test Reviewed-by: Marek Olšák <[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]>
* ac/nir_to_llvm: fix image size for arrays of arraysTimothy Arceri2018-02-151-6/+4
| | | | | | | Fixes cts test: KHR-GL44.shader_image_size.advanced-changeSize Reviewed-by: Marek Olšák <[email protected]>
* radeonsi/nir: fix shader ballot return value bitsizeTimothy Arceri2018-02-151-1/+1
| | | | | | | Fixes cts test: KHR-GL46.shader_ballot_tests.ShaderBallotFunctionBallot Reviewed-by: Marek Olšák <[email protected]>
* intel/aubinator: Correctly decode INTERFACE_DESCRIPTOR_DATAJason Ekstrand2018-02-141-1/+1
| | | | Reviewed-by: Kenneth Graunke <[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]>
* anv/gen10: Remove warning message.Rafael Antognolli2018-02-141-5/+2
| | | | | | | | | | | Gen10 seems pretty stable so far, remove "alpha support" message. Signed-off-by: Rafael Antognolli <[email protected]> Cc: Jason Ekstrand <[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]>
* 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]>
* egl/x11: Fix leak in dri3_create_image_khr_pixmapLouis-Francis Ratté-Boulianne2018-02-141-0/+1
| | | | | | | bp_reply wasn't properly free'd Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* i965/compiler: clean up nir_intrinsic_load_input for vertex shadersIago Toral Quiroga2018-02-141-11/+2
| | | | | | | | | This code to re-set the type of the source and destination is not necessary since we never manipulate the types. Looks like a left over from a time where we had to retype to float temporarily to handle 64-bit inputs. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* intel/compiler: fix first_component for 64-bit types on vertex inputsIago Toral Quiroga2018-02-141-0/+3
| | | | | | | | | | Divide it by two as we do for other stages. This is because the component layout qualifier is always in 32-bit units. Fixes issues in a new CTS test (still WIP): KHR-GL45.enhanced_layouts.varying_double_components Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* ac/nir: rename nir_to_llvm_context to radv_shader_contextSamuel Pitoiset2018-02-141-74/+74
| | | | | | | There is still more to do in that area, but it's a good start. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: remove nir_to_llvm_context from ac_nir_translate()Samuel Pitoiset2018-02-143-5/+4
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: remove nir_to_llvm_context::nir linkSamuel Pitoiset2018-02-141-11/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: move the outputs array to the ABISamuel Pitoiset2018-02-142-25/+26
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/shader: scan force_persampleSamuel Pitoiset2018-02-142-3/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* r600: fix regression in gl_FragColor drawingDave Airlie2018-02-141-0/+2
| | | | | | | This fixes a regression in the broadcast color to all color bufs case. Fixes: 6c691081a (r600: fixup sparse color exports.) Signed-off-by: Dave Airlie <[email protected]>
* r600: fix array spill if temp[0] is before all arraysDave Airlie2018-02-141-0/+2
| | | | | | | | | | | | | | | | I found a shader with DCL TEMP[0], LOCAL DCL TEMP[1..256], ARRAY(1), LOCAL DCL TEMP[257..512], ARRAY(2), LOCAL DCL TEMP[513..768], ARRAY(3), LOCAL DCL TEMP[769], LOCAL This would remap badly, as it would add up all the spilled sizes and subtract it from the temp for 0. If the current temp is less than the array start break out. Fixes: 1d871aa6 (r600g: Implement spilling of temp arrays (v2)) Signed-off-by: Dave Airlie <[email protected]>
* virgl: add ARB_sample_shading support.Dave Airlie2018-02-143-3/+6
| | | | | | This enable ARB_sample_shading if the renderer supports it. Signed-off-by: Dave Airlie <[email protected]>
* virgl: add ARB_draw_indirect support.Dave Airlie2018-02-143-2/+28
| | | | | | This relies on the renderer code landing first. Signed-off-by: Dave Airlie <[email protected]>
* tgsi: Recognize RET in main for tgsi_transformRoland Scheidegger2018-02-141-7/+55
| | | | | | | | | | | | | | | | | | Shaders coming from dx10 state trackers have a RET before the END. And the epilog needs to be placed before the RET (otherwise it will get ignored). Hence figure out if a RET is in main, in this case we'll place the epilog there rather than before the END. (At a closer look, there actually seem to be problems with control flow in general with output redirection, that would need another look. It's enough however to fix draw's aa line emulation in some internal bug - lines tend to be drawn with trivial shaders, moving either a constant color or a vertex color directly to the output). v2: add assert so buggy handling of RET in main is detected Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* ac: Use the renumbered const address space for LLVM 7.Bas Nieuwenhuizen2018-02-141-1/+2
| | | | | | | The LLVM AMDGPU backend decided to renumber the constant address space .... Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium: drop all the guard band float caps.Dave Airlie2018-02-1416-80/+0
| | | | | | | | | | Nobody queries these and nobody sets them to anything useful, the docs say TODO. Drop them until a use appears. Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* 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