summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add EXT_dsa glGetMultiTexParameteriv/fvEXTPierre-Eric Pelloux-Prayer2019-08-063-3/+49
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexSubImage1D/2D/3DEXTPierre-Eric Pelloux-Prayer2019-08-064-3/+231
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexImage1D/2D/3DEXT + glGetMultiTexImageEXTPierre-Eric Pelloux-Prayer2019-08-066-5/+299
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add glBindMultiTextureEXT display list supportPierre-Eric Pelloux-Prayer2019-08-061-0/+23
| | | | | | Fixes: 0972b0b059d ("mesa: add support for glBindMultiTextureEXT") Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexParameter* functionsPierre-Eric Pelloux-Prayer2019-08-064-4/+192
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa (Get)MultiTexEnv functionsPierre-Eric Pelloux-Prayer2019-08-063-1/+175
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add _mesa_(get)texenvi(f)v_indexed helpersPierre-Eric Pelloux-Prayer2019-08-061-27/+50
| | | | | | | They are exactly like _mesa_GetTexEnvfv/_mesa_GetTexEnviv except they take a GLuint texunit parameter instead of relying of ctx->Texture.CurrentUnit. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add new helper _mesa_get_texobj_by_target_and_texunitPierre-Eric Pelloux-Prayer2019-08-063-43/+82
| | | | | | | Based on the 'static get_texobj_by_target' function from texparam.c, but extended to also take the texunit as a parameter. Reviewed-by: Marek Olšák <[email protected]>
* mesa: replace _mesa_get_current_fixedfunc_tex_unit with ↵Pierre-Eric Pelloux-Prayer2019-08-064-12/+10
| | | | | | | | | | _mesa_get_fixedfunc_tex_unit The new function implements the same feature but doesn't depend on ctx->Texture.CurrentUnit. This change allows to use it from indexed functions. Reviewed-by: Marek Olšák <[email protected]>
* genxml: Rename 3DSTATE_SF::Anti-Aliasing EnableJason Ekstrand2019-08-061-1/+1
| | | | | | | This makes it consistent with the new name when it's moved to 3DSTATE_RASTER. Reviewed-by: Lionel Landwerlin <[email protected]>
* meson: drop unused dep_{thread,dl}Eric Engestrom2019-08-031-4/+4
| | | | | | | | Unused as of last commit. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* meson: replace libmesa_util with idep_mesautilEric Engestrom2019-08-033-10/+8
| | | | | | | | | | | This automates the include_directories and dependencies tracking so that all users of libmesa_util don't need to add them manually. Next commit will remove the ones that were only added for that reason. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Eric Anholt <[email protected]> Tested-by: Vinson Lee <[email protected]>
* i965/clear: clear_value better precisionSergii Romantsov2019-08-021-1/+1
| | | | | | | | | | | | | | Test-case with depth-clear 0.5 and format MESA_FORMAT_Z24_UNORM_X8_UINT fails due inconsistent clear-value of 0.4999997. Maybe its better to improve? CC: Jason Ekstrand <[email protected]> Fixes: 0ae9ce0f29ea (i965/clear: Quantize the depth clear value based on the format) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111113 Signed-off-by: Sergii Romantsov <[email protected]> Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* gallium: Implement GL_EXT_shader_samples_identical via a new capabilityKenneth Graunke2019-08-011-0/+1
| | | | | | | | | This exposes the textureSamplesIdenticalEXT function in GLSL. We enable it for iris and radeonsi, because their compilers already have support for this. Tested on Intel Kabylake and AMD Vega 64. Reviewed-by: Marek Olšák <[email protected]>
* i965: Move device info initialization to common codeMark Janes2019-08-012-114/+6
| | | | | | | | | | | With perf queries, initializing the device info is much more complex than just getting a PCI ID and calling gen_get_device_info. This commit adds a new gen_get_device_info_from_fd helper in common code which does all of the requisite kernel queries to get device info including all of the topology information. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965/perf: verify kernel support before registering OA metricsMark Janes2019-08-011-0/+44
| | | | | | | | | | When gen_device_info updates the topology in it's initializer, the kernel queries will fail silently. Iris and anv have minimum kernel requirements that support the queries. i965 must verify kernel support before reporting OA metrics. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* nir: Stop whacking gl_FrontFacing to a system valueJason Ekstrand2019-08-011-0/+1
| | | | | | | | | | We have a cap bit for gallium and a GLSL compiler flag to control this. Just trust what GLSL gives us and stop forcing it. In order for this to be safe, we have to advertise another cap in some of the gallium drivers. Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: fix MSVC compile breakageBrian Paul2019-08-011-2/+2
| | | | Trivial.
* gallium: Make PIPE_CAP_DEPTH_CLIP_DISABLE a tri-state value and use itGert Wollny2019-08-011-0/+3
| | | | | | | | | | | Use value "2" to signal that lowering is needed and supported and enable it accordingly. v2: - Note in CAP description that this lowering currently requires TGSI - use "true" instead of GL_TRUE (both Erik) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Signal state changes when depth_clamp is emulatedGert Wollny2019-08-011-1/+25
| | | | | | | | | | | | | v1 implemented by Erik Faye-Lund <[email protected]> v2: - Add GS and TES - fix constants state update flags (Erik) v3: don't update rasterizer when depth_clamp is lowered (Erik) v4: Correct NewDepthClamp and also set flags for NewClipControl (Erik) v5: Also set shader_has_one_variant property acording to possible depth_clamp lowering (Marek) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Add depth clamping to rasterizer codeGert Wollny2019-08-012-6/+39
| | | | | | | | | | implemented by Erik Faye-Lund <[email protected]> v2: Use current depth range values for clamping (Erik) v3: fix scons-win64 build Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Tie depth_clamp code into other shaders (GS and TES)Gert Wollny2019-08-013-1/+36
| | | | | | | | | | | | v2: Use file scope defined depth_range_state in common v3: - don't use the one_shader_variant property, as this is not correct (Marek) - also use tests on available shader stages to enable depth_clamp lowering v4: Don't use key.st, use st directly (Marek) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Tie depth_clamp lowering into the FSGert Wollny2019-08-013-0/+18
| | | | | | | | | v1 implemented by Erik Faye-Lund <[email protected]> v2: Use different call for FS v3: Use file scope defined depth_range_state Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: Tie depth clamp lowering in to the VP codeGert Wollny2019-08-014-0/+32
| | | | | | | | | | | | v1: implemented by Erik Faye-Lund <[email protected]> v2: Add handling of the ARB_clip_control depth mode v3: Move depth_range_state to file scope and remove training zeros (Erik) v4: - don't use the one_shader_variant property, as this is not correct (Marek) - also use tests on available shader stages to enable depth_clamp lowering V5: Don't use key.st, use st directly (Marek) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: add tgsi-lowering code for depth-clampErik Faye-Lund2019-08-014-0/+451
| | | | | | | | | | | | | | | | | This is a TGSI pass that lowers depth-clamping into shader-operations, by replacing the depth-value with 0 (a z-coordinate of zero will always pass the OpenGL depth test conditions), and using a dedicated varying to interpolate the real depth-value instead. Finally we replace the depth-output in the fragment shader. v1 implemented by Erik Faye-Lund <[email protected]> v2: Add support for handling depth clip mode, and refactor code v3: - Rename *_vs functions to *_last_vertex_stage (Erik) - Use 0.0 depth to avoid clipping (Erik) v4: Fix inversion of bool value for clip control property Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* mesa/st: replace boolean declarations by boolGert Wollny2019-08-011-2/+2
| | | | | Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* state_tracker: Free Labels for querry and tranform_feedbackYevhenii Kolesnikov2019-07-312-0/+2
| | | | | | | Memory leaks were observed on iris with GL_KHR_debug. Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add handling for YUV planar surfacesMike Blumenkrantz2019-07-316-7/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | st/dri: this adds a table (similar to the one in i965) which provides mappings for turning various planar formats into multiple sampler views. whereas only NV12 and IYUV were supported, now many more formats are supported here: * P0XX * YUV4XX * YVU4XX * AYUV * XYUV * YUYV * UYVY the table is used directly to handle image creation, simplifying a lot of code and resolving related TODO/FIXME items where workarounds were previously in place to manage NV12 and IYUV formats exclusively st/mesa: the changes here relate to setting up samplers for the planar formats. this requires: * checking for driver support for all the sampler formats * creating the samplers with the corresponding formats and swizzling * running nir_lower_tex with the appropriate options to trigger the lowering for each plane->sampler fixes kwg/mesa#36 Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: Skip scissor rect updates when scissor is entirely disabled.Kenneth Graunke2019-07-311-0/+3
| | | | | | | | | | | | | | | | | If any scissor rectangles are enabled, then we need to set proper scissor rectangles for all viewports. But if the scissor test is entirely disabled, then we can skip updating any scissor rectangles. Without this step, we were updating the scissor rectangles based on the current framebuffer size. So if an app rendered to a variety of render targets at different sizes, with scissor test disabled each time, we'd still be continually updating the scissor rectangles, even though it's not necessary. In Civilization VI, this drops us from 310-350 set_scissor_state calls per frame to 0, as it doesn't appear to use scissor testing. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add an ASSERTEDEric Engestrom2019-07-311-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: add a couple of ASSERTEDEric Engestrom2019-07-312-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* tree-wide: replace MAYBE_UNUSED with ASSERTEDEric Engestrom2019-07-3115-20/+20
| | | | | | Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: replace MAYBE_UNUSED with UNUSEDEric Engestrom2019-07-311-2/+2
| | | | | | | | MAYBE_UNUSED is going away, so let's replace legitimate uses of it with UNUSED, which the former aliased to so far anyway. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* st/tests: drop incorrect MAYBE_UNUSEDEric Engestrom2019-07-311-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: drop MAYBE_UNUSED varEric Engestrom2019-07-311-3/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: drop unused MAYBE_UNUSED functionEric Engestrom2019-07-311-11/+1
| | | | | | | | Added in 1b85c605a60a80975460 but never used. Cc: Jordan Justen <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: replace MAYBE_UNUSED with GEN conditionEric Engestrom2019-07-311-1/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: replace MAYBE_UNUSED with UNUSEDEric Engestrom2019-07-312-6/+6
| | | | | | | | MAYBE_UNUSED is going away, so let's replace legitimate uses of it with UNUSED, which the former aliased to so far anyway. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* intel: drop incorrect MAYBE_UNUSEDEric Engestrom2019-07-312-4/+4
| | | | | | | All these are actually always used. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: add EXT_dsa indexed generic queriesPierre-Eric Pelloux-Prayer2019-07-304-4/+40
| | | | | Only GetPointerIndexedvEXT needs an implementation, the other functions are aliases of existing functions.
* mesa: add EXT_dsa indexed texture commands functionsPierre-Eric Pelloux-Prayer2019-07-303-2/+54
| | | | | | | | | | | | | | | | | | | | | Added functions: - EnableClientStateIndexedEXT - DisableClientStateIndexedEXT - EnableClientStateiEXT - DisableClientStateiEXT Implemented using the idiom provided by the spec: if (array == TEXTURE_COORD_ARRAY) { int savedClientActiveTexture; GetIntegerv(CLIENT_ACTIVE_TEXTURE, &savedClientActiveTexture); ClientActiveTexture(TEXTURE0+index); XXX(array); ClientActiveTexture(savedActiveTexture); } else { // Invalid enum }
* mesa: add EXT_dsa (Named)Framebuffer functionsPierre-Eric Pelloux-Prayer2019-07-305-22/+311
| | | | | | | | | | These functions dont support display list as specified: Should the selector-free versions of various OpenGL 3.0 and EXT_framebuffer_object framebuffer object commands not be allowed in display lists [...]? RESOLVED: Yes
* mesa: add EXT_dsa NamedBuffer functionsPierre-Eric Pelloux-Prayer2019-07-303-9/+121
|
* i965/curbe: Look at SYSTEM_VALUE_FRAG_COORD instead of VARYING_SLOT_POSJason Ekstrand2019-07-301-1/+1
| | | | | | | | | | When transitioning gl_FragCoord over to a system value, we missed one instance of VARYING_SLOT_POS in i965. As of this commit, i965 has no references to VARYING_SLOT_POS. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111263 Fixes: 4bb6e6817ec "intel: Use a system value for gl_FragCoord" Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: Add PIPE_CAP_TEXTURE_SHADOW_LODSagar Ghuge2019-07-301-0/+1
| | | | | | | | v2: Line wrap to 80 char (Marek Olsak) Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Enable EXT_texture_shadow_lodSagar Ghuge2019-07-301-0/+1
| | | | | Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: extension boilerplate for EXT_texture_shadow_lodPaulo Zanoni2019-07-302-0/+2
| | | | | | | | With the help of Sagar, Ian and Ivan. Signed-off-by: Paulo Zanoni <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen10: Remove unnecessary workaround.Rafael Antognolli2019-07-291-16/+0
| | | | | | | | | | | | | | | | | | | | In fact, the description of the workaround states that the mask field doesn't work correctly on gen10, and we need to set it to 0xffff even we we only want to update a single field: "The mask bits are not implemented properly on 3DSTATE_3D_MODE. Driver must always program bits 31:16 of DW1 a value of 0xFFFF. This means if it is only updating 1 field, it must update all the fields to the correct value." So unless we want to change any of the fields of 3DSTATE_3D_MODE, there's not need to emit. Additionally, it seems this workaround is not required on gen11. And last but not least, this workaround is not implemented on iris or anv, and it doesn't seem to be missed there. So let's just remove the whole thing. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Use a system value for gl_FragCoordJason Ekstrand2019-07-292-0/+2
| | | | | | | | | | | | It's kind-of an anomaly that the Intel drivers are still treating gl_FragCoord as an input. It also makes zero sense because we have to special-case it in the back-end. Because ANV is the only user of nir_lower_wpos_center, we go ahead and just update it to look for nir_intrinsic_load_frag_coord as part of this patch. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/spirv: Set frag_coord_is_sysval to GLSLFragCoordIsSysValJason Ekstrand2019-07-291-0/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>