summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist/citra.icnsbin1027012 -> 211056 bytes
-rw-r--r--dist/citra.icobin509287 -> 370070 bytes
-rw-r--r--dist/citra.svg80
-rw-r--r--dist/doc-icon.pngbin8791 -> 7768 bytes
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.cpp2
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp8
-rw-r--r--src/core/arm/skyeye_common/armstate.h2
-rw-r--r--src/core/file_sys/archive_backend.cpp2
-rw-r--r--src/core/hle/applets/erreula.cpp4
-rw-r--r--src/core/hle/applets/mii_selector.cpp4
-rw-r--r--src/core/hle/applets/mint.cpp4
-rw-r--r--src/core/hle/applets/swkbd.cpp4
-rw-r--r--src/core/hle/kernel/kernel.h3
-rw-r--r--src/core/hw/gpu.cpp2
-rw-r--r--src/core/hw/gpu.h4
-rw-r--r--src/input_common/motion_emu.cpp5
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp3
-rw-r--r--src/video_core/renderer_opengl/gl_shader_gen.cpp9
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp13
-rw-r--r--src/video_core/renderer_opengl/gl_state.h3
-rw-r--r--src/video_core/swrasterizer/clipper.cpp4
-rw-r--r--src/video_core/swrasterizer/rasterizer.h6
22 files changed, 55 insertions, 107 deletions
diff --git a/dist/citra.icns b/dist/citra.icns
index 9d3dcca83..ef7bf4e6e 100644
--- a/dist/citra.icns
+++ b/dist/citra.icns
Binary files differ
diff --git a/dist/citra.ico b/dist/citra.ico
index 4fef651e2..2c408b935 100644
--- a/dist/citra.ico
+++ b/dist/citra.ico
Binary files differ
diff --git a/dist/citra.svg b/dist/citra.svg
index 7b299cd89..b6abc1ccf 100644
--- a/dist/citra.svg
+++ b/dist/citra.svg
@@ -1,80 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2014 Citra Emulator Project
- Licensed under GPLv2 or any later version
- Refer to the license.txt file included.
--->
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 341.071 338.846">
- <radialGradient id="a" cx="170.5356" cy="167.271" r="170.5332" gradientTransform="matrix(1 0 0 0.9935 0 3.2396)" gradientUnits="userSpaceOnUse">
- <stop offset="0.5193" stop-color="#FFFFFF" stop-opacity="0.1"/>
- <stop offset="0.9415" stop-color="#000000" stop-opacity="0.5"/>
- <stop offset="1" stop-color="#1A1818" stop-opacity="0"/>
- </radialGradient>
- <ellipse fill="url(#a)" cx="170.535" cy="169.423" rx="170.535" ry="169.423"/>
- <circle fill="#D16F17" cx="170.536" cy="167.885" r="161.557"/>
- <linearGradient id="b" gradientUnits="userSpaceOnUse" x1="234.4458" y1="33.5771" x2="97.5655" y2="321.2358">
- <stop offset="0" stop-color="#FFF8BD"/>
- <stop offset="1" stop-color="#F6DCAE"/>
- </linearGradient>
- <circle fill="url(#b)" cx="170.536" cy="167.885" r="155.295"/>
- <g>
- <linearGradient id="c" gradientUnits="userSpaceOnUse" x1="332.436" y1="91.7446" x2="111.1593" y2="342.0988">
- <stop offset="0" stop-color="#F7A076"/>
- <stop offset="0.4455" stop-color="#F3816C"/>
- <stop offset="1" stop-color="#F06878"/>
- </linearGradient>
- <path fill="url(#c)" stroke="#F06564" stroke-miterlimit="10" d="M309.704,123.138
- c-5.9-7.802-128.517,44.681-128.517,44.681S303.803,221.01,309.704,212.5C322.434,194.142,323.182,140.957,309.704,123.138z"/>
- <linearGradient id="d" gradientUnits="userSpaceOnUse" x1="285.5845" y1="50.3345" x2="64.3074" y2="300.6891">
- <stop offset="0" stop-color="#9DC63B"/>
- <stop offset="1" stop-color="#9BC183"/>
- </linearGradient>
- <path fill="url(#d)" stroke="#72AA42" stroke-miterlimit="10" d="M300.518,100.96c-3.98-21.983-41.059-60.12-63.189-63.188
- c-9.688-1.345-59.28,122.469-59.28,122.469S302.364,111.149,300.518,100.96z"/>
- <linearGradient id="e" gradientUnits="userSpaceOnUse" x1="229.4995" y1="0.7637" x2="8.2231" y2="251.1176">
- <stop offset="0" stop-color="#D5DE26"/>
- <stop offset="1" stop-color="#C5D94B"/>
- </linearGradient>
- <path fill="url(#e)" stroke="#BECD30" stroke-miterlimit="10" d="M215.151,28.584c-18.357-12.73-71.543-13.478-89.362,0.001
- c-7.801,5.899,44.682,128.516,44.682,128.516S223.663,34.484,215.151,28.584z"/>
- <linearGradient id="f" gradientUnits="userSpaceOnUse" x1="219.3823" y1="-8.1782" x2="-1.8941" y2="242.1756">
- <stop offset="0" stop-color="#F2D200"/>
- <stop offset="1" stop-color="#FDEF52"/>
- </linearGradient>
- <path fill="url(#f)" stroke="#E1BE29" stroke-miterlimit="10" d="M162.893,160.239c0,0-49.092-124.315-59.281-122.469
- c-21.982,3.979-60.12,41.058-63.188,63.189C39.078,110.646,162.893,160.239,162.893,160.239z"/>
- <linearGradient id="g" gradientUnits="userSpaceOnUse" x1="226.0718" y1="-2.2656" x2="4.7951" y2="248.0886">
- <stop offset="0" stop-color="#FFCD10"/>
- <stop offset="1" stop-color="#F29634"/>
- </linearGradient>
- <path fill="url(#g)" stroke="#F79421" stroke-miterlimit="10" d="M31.236,123.136c-12.73,18.357-13.479,71.543,0,89.362
- c5.898,7.801,128.516-44.682,128.516-44.682S37.135,114.625,31.236,123.136z"/>
- <linearGradient id="h" gradientUnits="userSpaceOnUse" x1="272.9214" y1="39.144" x2="51.6446" y2="289.4984">
- <stop offset="0" stop-color="#F79F1C"/>
- <stop offset="0.4455" stop-color="#F08021"/>
- <stop offset="1" stop-color="#ED693C"/>
- </linearGradient>
- <path fill="url(#h)" stroke="#F16622" stroke-miterlimit="10" d="M40.422,234.676c3.979,21.982,41.057,60.12,63.188,63.188
- c9.687,1.346,59.279-122.468,59.279-122.468S38.574,224.487,40.422,234.676z"/>
- <linearGradient id="i" gradientUnits="userSpaceOnUse" x1="329.0083" y1="88.7129" x2="107.7311" y2="339.0677">
- <stop offset="0" stop-color="#E47C26"/>
- <stop offset="0.4455" stop-color="#DF5B27"/>
- <stop offset="1" stop-color="#DD3A3A"/>
- </linearGradient>
- <path fill="url(#i)" stroke="#E03827" stroke-miterlimit="10" d="M125.787,307.051c18.357,12.73,71.543,13.48,89.362,0
- c7.801-5.898-44.681-128.515-44.681-128.515S117.275,301.153,125.787,307.051z"/>
- <linearGradient id="j" gradientUnits="userSpaceOnUse" x1="339.1245" y1="97.6562" x2="117.8478" y2="348.0104">
- <stop offset="0" stop-color="#F3783C"/>
- <stop offset="0.4455" stop-color="#EF5339"/>
- <stop offset="1" stop-color="#ED294A"/>
- </linearGradient>
- <path fill="url(#j)" stroke="#ED2836" stroke-miterlimit="10" d="M178.047,175.398c0,0,49.09,124.315,59.28,122.467
- c21.982-3.979,60.121-41.057,63.189-63.188C301.86,224.991,178.047,175.398,178.047,175.398z"/>
- </g>
- <linearGradient id="k" gradientUnits="userSpaceOnUse" x1="170.5352" y1="6.3281" x2="170.5351" y2="329.4424">
- <stop offset="0" stop-color="#FFFFFF" stop-opacity="0.2"/>
- <stop offset="0.4504" stop-color="#908E8E" stop-opacity="0.05"/>
- <stop offset="1" stop-color="#030003" stop-opacity="0.2"/>
- </linearGradient>
- <circle fill="url(#k)" cx="170.536" cy="167.885" r="161.557"/>
-</svg>
+<svg version="1.1" viewBox="0 0 433.93 397.43" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xlink="http://www.w3.org/1999/xlink"><metadata><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs><linearGradient id="linearGradient7230"><stop stop-color="#f15a24" offset="0"/><stop stop-color="#f15a24" stop-opacity="0" offset="1"/></linearGradient><radialGradient id="radialGradient4297" cx="0" cy="0" r="1" fx=".33908" fy="-.55275" gradientTransform="matrix(135.72 53.102 32.823 -83.888 479.47 287.23)" gradientUnits="userSpaceOnUse"><stop stop-color="#ffff87" offset="0"/><stop stop-color="#ffff87" offset=".12648"/><stop stop-color="#ffc503" offset=".14449"/><stop stop-color="#ffc503" offset=".21612"/><stop stop-color="#ffc503" offset=".39528"/><stop stop-color="#ffc503" offset=".4406"/><stop stop-color="#ffc003" offset=".49983"/><stop stop-color="#ffc003" offset=".62818"/><stop stop-color="#ffc003" offset=".72864"/><stop stop-color="#ff8904" stop-opacity=".86935" offset=".84938"/><stop stop-color="#ff8904" offset=".98742"/><stop stop-color="#ff8904" offset="1"/></radialGradient><radialGradient id="radialGradient4331" cx="-.042447" cy=".042662" r="1" gradientTransform="matrix(97.003 -81.357 -81.357 -97.003 516.33 432.83)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff0" offset="0"/><stop stop-color="#ffba05" offset=".66567"/><stop stop-color="#ffba05" offset="1"/></radialGradient><radialGradient id="radialGradient4351" cx="0" cy="0" r="1" gradientTransform="matrix(-12.353 -91.85 -91.85 12.353 493.83 420.5)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff0" offset="0"/><stop stop-color="#ffba05" offset="1"/></radialGradient><radialGradient id="radialGradient4371" cx="0" cy="0" r="1" fx="-.89202" fy="-.452" gradientTransform="matrix(58.797 44.174 44.174 -58.797 591.5 452.83)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff0" offset="0"/><stop stop-color="#ffba05" offset="1"/></radialGradient><radialGradient id="radialGradient4391" cx="0" cy="0" r="1" gradientTransform="matrix(-63.936 -51.968 -51.968 63.936 480.5 419.5)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff0" offset="0"/><stop stop-color="#ffba05" offset="1"/></radialGradient><radialGradient id="radialGradient4413" cx="-.27681" cy="-.01256" r="1" gradientTransform="matrix(166.21 117.68 75.941 -107.26 545.45 466.23)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff0" offset="0"/><stop stop-color="#ffee05" offset=".49699"/><stop stop-color="#ffba05" offset="1"/></radialGradient><radialGradient id="radialGradient4433" cx=".0693" cy=".0013088" r="1" gradientTransform="matrix(92.166 1.56 1.3981 -82.601 484.17 431.17)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff0" offset="0"/><stop stop-color="#ffba05" offset="1"/></radialGradient><radialGradient id="radialGradient4453" cx="0" cy="0" r="1" gradientTransform="matrix(112.47 78.731 51.056 -72.937 527.5 460.5)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff0" offset="0"/><stop stop-color="#ffba05" offset="1"/></radialGradient><radialGradient id="radialGradient4475" cx=".13237" cy="-.0012055" r="1" fx="-.080444" fy=".038791" gradientTransform="matrix(64.042 -58.572 -66.76 -72.994 505.91 439.83)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff0" offset="0"/><stop stop-color="#ffcf05" offset=".62977"/><stop stop-color="#ffcf05" offset="1"/></radialGradient><linearGradient id="linearGradient7248-9" x1="382.8" x2="662.93" y1="393.32" y2="393.32" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient7230"/><clipPath id="clipPath4307-2"><path d="m640.25 512.56c0.366-0.686 1.015-1.901 1.507-3.229 0.237-0.588 0.284-0.774 0.375-1.057 0.174-0.52 0.277-0.819 0.368-1.099 0.09-0.28 0.019-0.115 0.107-0.392 0.087-0.277 0.181-0.577 0.264-0.852 0.082-0.276 0.15-0.659 0.224-0.934 0.076-0.276 0.167-0.604 0.233-0.881 0.066-0.276 0.257-1.337 0.312-1.615 0.316-1.599 0.241-2.12 0.401-3.701 0.16-1.58 0.244-3.151 0.26-4.712 0.016-1.563-0.038-3.115-0.154-4.66-0.117-1.545-0.296-3.081-0.533-4.61-0.237-1.528-0.531-3.049-0.877-4.562-0.345-1.513-0.742-3.02-1.184-4.518-0.442-1.5-0.93-2.992-1.457-4.478-0.527-1.485-1.094-2.964-1.694-4.438-1.181-2.896-2.451-5.732-3.805-8.51-1.353-2.778-2.789-5.5-4.302-8.169-1.512-2.671-3.099-5.288-4.755-7.858-1.656-2.571-3.38-5.093-5.165-7.574-1.785-2.48-3.631-4.918-5.53-7.318-1.9-2.4-3.853-4.762-5.852-7.09s-4.044-4.624-6.129-6.89c-2.084-2.267-4.207-4.506-6.362-6.72-2.218-2.28-4.472-4.518-6.76-6.714-2.287-2.197-4.608-4.353-6.961-6.47s-4.737-4.196-7.152-6.237-4.86-4.046-7.334-6.016c-2.473-1.969-4.975-3.904-7.504-5.806-2.528-1.902-5.084-3.771-7.664-5.609-2.581-1.838-5.187-3.645-7.816-5.423-2.63-1.778-5.282-3.527-7.957-5.247-3.325-2.142-6.677-4.217-10.058-6.225-3.381-2.007-6.792-3.946-10.232-5.813-3.441-1.867-6.912-3.661-10.416-5.38s-7.041-3.362-10.611-4.924c-3.571-1.563-7.177-3.046-10.818-4.446-1.846-0.709-3.702-1.398-5.566-2.064-1.814-0.648-3.636-1.274-5.468-1.88-3.716-1.228-7.47-2.37-11.263-3.42-3.794-1.049-7.627-2.009-11.502-2.872-1.624-0.362-3.249-0.695-4.876-1-1.627-0.304-3.255-0.578-4.886-0.823-1.631-0.244-3.262-0.457-4.896-0.638s-3.269-0.33-4.907-0.445c-1.636-0.116-3.275-0.197-4.915-0.245-1.639-0.046-3.28-0.058-4.923-0.034-1.641 0.024-3.285 0.085-4.929 0.183-1.645 0.097-3.29 0.233-4.937 0.408-1.337 0.142-2.664 0.317-3.979 0.531s-2.617 0.466-3.906 0.759c-1.288 0.294-2.562 0.627-3.819 1.007-1.256 0.38-2.496 0.805-3.717 1.278-1.22 0.475-2.422 0.997-3.602 1.571-1.179 0.575-2.337 1.201-3.471 1.884-1.133 0.683-2.244 1.421-3.326 2.22-1.084 0.798-2.656 1.973-3.685 2.893l-3.143-7.259c-3.143-7.26 1.5-6 3.143-8.5 1.644-2.5 0.357-9 0.217-15s6.64-11.5 9.64-14.5c3-3.001 10-10.5 14.5-11.82 4.5-1.319 23.5-16.18 30-18.181 6.5-1.999 13.5-6.999 22-8.499s19-3 27.5-3 26.5-0.5 38.5 0 27 3 33 4 20 2.5 27.5 4.5 23.5 8 27 11.5 28 13.999 33.5 20c5.5 6 24 39.5 25 45.5s14 47.499 17 53c3 5.5 0 39.499 0 45.5 0 6-10 45-10 45l-13.5 28.5-14 14.5z"/></clipPath><radialGradient id="radialGradient7556" cx="698.21" cy="478.94" r="186.38" gradientTransform="matrix(1.2034 -.41433 .38181 1.1089 -338.27 245.75)" gradientUnits="userSpaceOnUse"><stop stop-color="#f15a24" stop-opacity="0" offset="0"/><stop stop-color="#f15a24" stop-opacity="0" offset=".68534"/><stop stop-color="#f14a24" offset="1"/></radialGradient></defs><g transform="translate(-265.81 -357.85)"><g transform="translate(-206,70)"><path d="m651.83 684.53c-17.986-2.258-43.941-8.1382-59.303-13.436-45.416-15.66-91.627-51.387-112.29-86.813-7.3922-12.675-9.8553-29.065-7.6405-50.846 1.5707-15.448 4.2385-24.955 10.938-38.978 20.81-43.561 55.611-85.05 100.64-119.99 33.898-26.298 69.589-47.881 101.64-61.46 27.534-11.666 61.915-21.532 84.068-24.123 27.343-3.1985 56.096 1.1638 74.647 11.325 18.752 10.271 30.61 25.375 43.922 55.939 12.492 28.684 17.312 55.294 17.291 95.461-0.0151 34.075-4.1728 58.552-14.29 84.174-8.402 21.279-21.718 44.014-36.542 62.391-6.6008 8.1824-26.727 28.053-35.45 35-19.832 15.793-45.654 30.387-66.248 37.441-17.156 5.8765-39.99 11.132-59.144 13.612-9.676 1.253-33.307 1.4198-42.243 0.29802z" fill="#fff" stroke-width=".75166"/><g transform="matrix(1.3333 0 0 -1.3333 0 1024)"><path d="m508.37 418.38c-1.948-9.873-2.175-19.875-2.148-30.734 0.105-4.803-8e-3 -10.436 0.607-16.082 1.248-11.467 5.143-14.109 15.617-9.51 17.862 7.84 33.696 18.829 47.854 32.241 3.988 3.779 8.185 7.422 11.089 12.202 2.673 4.397 2.097 6.88-2.266 9.608-1.396 0.873-2.949 1.54-4.502 2.103-5.181 1.881-10.542 3.121-15.918 4.281-12.621 2.721-25.222 5.644-38.216 5.823-0.08 1e-3 -0.159 1e-3 -0.239 1e-3 -6.452 0-10.63-3.605-11.878-9.933" fill="url(#radialGradient4331)"/></g><g transform="matrix(1.3333 0 0 -1.3333 0 1024)"><path d="m492.04 416.52c-3.243-1.617-5.823-4.156-8.361-6.684-16.977-16.905-32.998-34.704-48.672-52.819-4.26-4.924-8.651-9.823-11.376-15.886-1.919-4.27-0.934-6.454 3.654-7.668 4.725-1.249 9.544-1.787 14.436-1.358 11.696 1.026 22.799 4.32 33.655 8.677 10.044 4.032 16.339 11.18 18.544 21.838 2.891 13.979 3.907 28.175 4.618 42.392 0 2.182 0.021 4.364-0.013 6.545-0.01 0.636-0.15 1.274-0.276 1.902-0.545 2.722-1.447 4.01-3.104 4.01-0.83 0-1.848-0.323-3.105-0.949" fill="url(#radialGradient4351)"/></g><g transform="matrix(1.3333 0 0 -1.3333 0 1024)"><path d="m623.43 485.96c-2.879-0.515-5.736-1.318-8.503-2.282-15.719-5.482-30.649-12.847-45.782-19.703-12.92-5.855-25.833-11.785-38.083-19.013-2.413-1.425-5.354-3.1-4.765-6.319 0.504-2.751 3.758-2.789 6.016-3.319 17.339-4.073 35.01-5.712 51.316-7.058 10.474 0.119 18.926 1.786 25.516 8.829 6.88 7.354 12.632 15.489 16.919 24.601 2.691 5.72 4.477 11.786 4.479 18.169 2e-3 4.153-1.835 6.272-5.267 6.272-0.571 0-1.188-0.059-1.846-0.177" fill="url(#radialGradient4371)"/></g><g transform="matrix(1.3333 0 0 -1.3333 0 1024)"><path d="m475.92 419.25c-0.367-0.104-0.71-0.292-1.065-0.437-22.555-9.166-44.21-20.249-65.865-31.321-5.464-2.792-10.748-5.939-15.684-9.652-5.297-3.984-8.316-8.98-7.651-15.694 0-0.89-0.035-1.662 5e-3 -2.431 0.397-7.627 4.249-12.981 10.812-16.559 6.098-3.323 11.35-1.172 16.365 2.52 1.236 0.911 2.498 1.799 3.649 2.811 22.843 20.104 43.28 42.565 63.347 65.381 1.264 1.437 3.447 3.141 2.012 5.299-0.613 0.922-1.333 1.232-2.102 1.231-1.232 0-2.589-0.797-3.823-1.148" fill="url(#radialGradient4391)"/></g><g transform="matrix(1.3333 0 0 -1.3333 0 1024)"><path d="m589.81 520.12c-2.155-1.598-4.18-3.381-6.195-5.159-14.338-12.647-27.085-26.892-40.259-40.697-5.472-5.734-10.87-11.588-15.617-17.981-0.828-1.116-1.856-2.369-0.83-3.824 0.972-1.379 2.519-1.147 3.87-0.737 1.831 0.556 3.62 1.272 5.386 2.018 23.705 10.024 46.647 21.655 69.496 33.464 6.568 3.394 13.185 6.854 18.588 12.131 2.02 1.974 3.277 4.24 3.342 7.436-0.072 2.307-0.943 4.698-2.221 6.96-4.063 7.191-12.308 11.156-20.705 11.156-5.215 0-10.489-1.53-14.855-4.767" fill="url(#radialGradient4413)"/></g><g transform="matrix(1.3333 0 0 -1.3333 0 1024)"><path d="m413.44 432.07c-5.861-6.67-11.407-13.524-15.914-21.172-2.874-4.876-5.175-10.064-6.355-15.632-0.819-3.866 0.412-5.458 3.711-5.517 2.078 0.023 4.038 0.607 5.971 1.3 18.942 6.786 36.964 15.693 55.17 24.173 7.774 3.62 15.486 7.375 22.781 11.914 2.187 1.361 4.634 2.997 4.191 5.914-0.396 2.604-3.356 2.319-5.257 3.169-0.692 0.308-1.469 0.436-2.215 0.612-11.727 2.765-23.679 4.039-35.625 5.305-1.381 0.147-2.734 0.221-4.058 0.221-8.707 0-16.182-3.211-22.4-10.287" fill="url(#radialGradient4433)"/></g><g transform="matrix(1.3333 0 0 -1.3333 0 1024)"><path d="m567.31 526.82c-14.169-1.46-27.39-6.06-40.199-12.109-7.73-3.652-12.567-9.493-14.146-17.954-1.793-9.597-3.042-19.253-2.904-29.045 0-2.697-0.068-5.395 0.022-8.089 0.067-1.997-0.399-4.391 1.83-5.503 2.219-1.108 4.351 0.084 6.055 1.392 2.834 2.177 5.567 4.529 8.099 7.054 14.061 14.024 27.283 28.841 40.42 43.726 4.051 4.589 8.321 9.1 10.964 14.772 1.594 3.423 0.812 4.978-2.88 5.7-1.112 0.218-2.231 0.3-3.353 0.3-1.302 0-2.607-0.11-3.908-0.244" fill="url(#radialGradient4453)"/></g><g transform="matrix(1.3333 0 0 -1.3333 0 1024)"><path d="m493.43 497.7c-3.943-1.236-7.454-3.334-11.002-5.368-14.602-8.364-28.162-18.128-39.782-30.405-5.392-5.696-4.536-9.429 2.935-11.564 13.892-3.97 27.998-7.036 42.519-7.395 7.646-0.189 11.495 3.378 12.86 10.836 1.395 7.615 1.69 15.275 1.485 25.395-0.22 3.072 0.784 8.645-0.687 14.051-0.943 3.472-2.527 5.026-5.134 5.025-0.929 0-1.988-0.197-3.194-0.575" fill="url(#radialGradient4475)"/></g><g transform="matrix(1.3333 0 0 -1.3333 0 1024)"><path d="m641.75 509.34c0.237-0.588 0.284-0.774 0.375-1.057 0.174-0.52 0.277-0.819 0.368-1.099 0.09-0.28 0.019-0.115 0.107-0.392 0.087-0.277 0.181-0.577 0.264-0.852 0.082-0.276 0.15-0.659 0.224-0.934 0.076-0.276 0.167-0.604 0.233-0.881 0.066-0.276 0.257-1.337 0.312-1.615 0.316-1.599 0.241-2.12 0.401-3.701 0.16-1.58 0.244-3.151 0.26-4.712 0.016-1.563-0.038-3.115-0.154-4.66-0.117-1.545-0.296-3.081-0.533-4.61-0.237-1.528-0.531-3.049-0.877-4.562-0.345-1.513-0.742-3.02-1.184-4.518-0.442-1.5-0.93-2.992-1.457-4.478-0.527-1.485-1.094-2.964-1.694-4.438-1.181-2.896-2.451-5.732-3.805-8.51-1.353-2.778-2.789-5.5-4.302-8.169-1.512-2.671-3.099-5.288-4.755-7.858-1.656-2.571-3.38-5.093-5.165-7.574-1.785-2.48-3.631-4.918-5.53-7.318-1.9-2.4-3.853-4.762-5.852-7.09s-4.044-4.624-6.129-6.89c-2.084-2.267-4.207-4.506-6.362-6.72-2.218-2.28-4.472-4.518-6.76-6.714-2.287-2.197-4.608-4.353-6.961-6.47s-4.737-4.196-7.152-6.237-4.86-4.046-7.334-6.016c-2.473-1.969-4.975-3.904-7.504-5.806-2.528-1.902-5.084-3.771-7.664-5.609-2.581-1.838-5.187-3.645-7.816-5.423-2.63-1.778-5.282-3.527-7.957-5.247-3.325-2.142-6.677-4.217-10.058-6.225-3.381-2.007-6.792-3.946-10.232-5.813-3.441-1.867-6.912-3.661-10.416-5.38s-7.041-3.362-10.611-4.924c-3.571-1.563-7.177-3.046-10.818-4.446-1.846-0.709-3.702-1.398-5.566-2.064-1.814-0.648-3.636-1.274-5.468-1.88-3.716-1.228-7.47-2.37-11.263-3.42-3.794-1.049-7.627-2.009-11.502-2.872-1.624-0.362-3.249-0.695-4.876-1-1.627-0.304-3.255-0.578-4.886-0.823-1.631-0.244-3.262-0.457-4.896-0.638s-3.269-0.33-4.907-0.445c-1.636-0.116-3.275-0.197-4.915-0.245-1.639-0.046-3.28-0.058-4.923-0.034-1.641 0.024-3.285 0.085-4.929 0.183-1.645 0.097-3.29 0.233-4.937 0.408-1.337 0.142-2.664 0.317-3.979 0.531s-2.617 0.466-3.906 0.759c-1.288 0.294-2.562 0.627-3.819 1.007-1.256 0.38-2.496 0.805-3.717 1.278-1.22 0.475-2.422 0.997-3.602 1.571-0.749 0.365-1.489 0.751-2.22 1.159-0.522 0.286-1.038 0.583-1.55 0.891-1.134 0.683-2.243 1.421-3.327 2.219-0.744 0.549-1.475 1.125-2.194 1.731-0.282 0.225-0.554 0.448-0.806 0.662 5.18-5.701 10.508-11.008 15.987-15.904 5.538-4.95 11.227-9.48 17.07-13.573 5.843-4.094 11.839-7.751 17.987-10.956 6.148-3.204 12.449-5.954 18.901-8.236 6.453-2.28 13.059-4.091 19.816-5.415 6.758-1.325 13.668-2.162 20.731-2.495s14.278-0.163 21.645 0.528c7.368 0.692 14.887 1.904 22.56 3.654 8.186 1.866 15.978 4.164 23.376 6.884 7.397 2.719 14.401 5.861 21.012 9.414 6.611 3.555 12.828 7.522 18.655 11.891 5.826 4.371 11.261 9.143 16.304 14.311 5.045 5.167 9.698 10.729 13.962 16.675 4.264 5.947 8.14 12.278 11.626 18.985 3.487 6.707 6.586 13.789 9.296 21.238 2.712 7.449 5.037 15.264 6.975 23.436 0.548 2.31 1.025 4.624 1.432 6.944 0.408 2.318 0.747 4.641 1.023 6.968 0.275 2.327 0.486 4.658 0.637 6.991 0.15 2.333 0.241 4.671 0.276 7.01 0.034 2.339 0.013 4.681-0.061 7.024-0.074 2.345-0.2 4.69-0.374 7.037-0.174 2.348-0.396 4.697-0.664 7.046-0.266 2.349-0.577 4.699-0.928 7.049-0.39 2.617-0.912 5.345-1.535 8.125-0.623 2.779-1.346 5.609-2.142 8.427-0.795 2.819-1.66 5.626-2.569 8.359-0.907 2.733-1.855 5.391-2.816 7.915-0.959 2.523-1.931 4.909-2.883 7.098-0.953 2.189-1.888 4.179-2.773 5.909-0.886 1.73-1.723 3.199-2.481 4.346-0.475 0.717-1.25 1.831-1.946 2.775 0.215-0.462 0.433-0.967 0.627-1.49" fill="url(#radialGradient4297)"/></g><g transform="matrix(1.3333 0 0 -1.3333 0 1024)" fill="url(#linearGradient7248-9)"><g clip-path="url(#clipPath4307-2)" fill="url(#linearGradient7248-9)"><g transform="translate(382.92 331.6)" fill="url(#linearGradient7248-9)"><path d="m0 0c6.615-7.221 13.678-14.033 21.222-20.267 7.539-6.237 15.577-11.868 24.046-16.747 8.468-4.879 17.397-8.961 26.656-12.07 9.256-3.117 18.837-5.252 28.533-6.374 9.697-1.126 19.503-1.24 29.23-0.453 9.731 0.785 19.379 2.465 28.846 4.853 18.922 4.75 37.215 12.333 53.364 23.285 8.065 5.472 15.569 11.768 22.33 18.787 6.768 7.012 12.789 14.739 18.015 22.967 10.462 16.478 17.733 34.859 22.474 53.789l0.439 1.778 0.209 0.872 0.186 0.899 0.747 3.597 0.373 1.798 0.093 0.45 0.024 0.112c-7e-3 -0.038 7e-3 0.055 0.01 0.076l0.034 0.227 0.134 0.908 0.539 3.634 0.269 1.817c0.077 0.534 0.118 1.199 0.18 1.791l0.338 3.658 0.164 1.796 0.075 1.835 0.15 3.671c0.264 9.752-0.472 19.521-1.882 29.184-1.502 9.646-4.173 19.05-7.353 28.281l-1.228 3.463-0.307 0.865-0.144 0.409-0.173 0.426-0.689 1.702-1.379 3.405-0.685 1.671-0.778 1.664-1.557 3.327-0.371 0.788-0.455 0.798-0.909 1.596-1.8039 3.187c-12.883 30.325-179.5-236.54-259.07-177.56zm-8e-3 8e-3c92.186-40.479 231.35 107.76 257.54 180.96 0.828-0.982 1.523-1.975 2.238-2.986 0.351-0.52 0.707-0.981 1.036-1.569l0.913-1.594 0.912-1.594 0.457-0.797c0.183-0.358 0.275-0.576 0.417-0.871l2.346-4.986c0.271-0.617 0.473-1.148 0.713-1.726l1.387-3.402 0.693-1.701 0.173-0.425 0.164-0.457 0.309-0.865 1.235-3.459c3.22-9.271 5.937-18.782 7.475-28.508 1.444-9.716 2.213-19.555 1.972-29.393l-0.14-3.671-0.069-1.836-0.164-1.863-0.329-3.659c-0.063-0.625-0.09-1.185-0.183-1.864l-0.264-1.818-0.528-3.635-0.132-0.909-0.033-0.227-0.024-0.152-0.023-0.112-0.092-0.45-0.369-1.8-0.736-3.599-0.185-0.9-0.216-0.915-0.436-1.79c-2.367-9.534-5.355-18.932-9.077-28.033-3.717-9.105-8.196-17.911-13.474-26.221-5.276-8.31-11.358-16.118-18.197-23.206-6.832-7.094-14.416-13.459-22.563-18.989-8.15-5.528-16.852-10.229-25.9-14.096-9.054-3.857-18.44-6.901-27.983-9.247-9.54-2.354-19.27-3.997-29.075-4.737-9.804-0.741-19.683-0.576-29.444 0.61-9.761 1.181-19.397 3.381-28.694 6.565-9.3 3.177-18.256 7.329-26.737 12.275-8.488 4.941-16.474 10.71-23.972 17.028-7.497 6.325-14.5 13.22-21.044 20.512z" fill="url(#linearGradient7248-9)"/></g></g></g><path d="m853.83 340.91z" fill="none" stroke="#000" stroke-width="1px"/><path d="m512.59 583.25c24.074 19.047 61.695 18.896 102.99 7.7902 41.299-11.105 86.278-33.164 124.63-62.438 43.462-33.178 74.436-61.06 97.049-98.852 10.211-17.065 16.881-32.679 20.405-47.4 3.5243-14.721 2.1355-27.046-3.4171-40.626 0 0 22.052 31.822 28.025 81.607 2.9864 24.893 1.4477 59.407-11.26 93.337-11.843 31.622-27.743 61.223-54.874 85.55-1.0301 0.92357-12.207 12.478-32.938 24.374-25.596 14.688-46.884 22.5-75.534 27.634-34.926 6.2583-59.469 4.4522-85.833-1.8111-36.815-8.7462-71.794-28.542-110.24-69.041" fill="url(#radialGradient7556)"/></g></g></svg>
diff --git a/dist/doc-icon.png b/dist/doc-icon.png
index 420b1546f..9b5773214 100644
--- a/dist/doc-icon.png
+++ b/dist/doc-icon.png
Binary files differ
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp
index 7d2790b08..0a0b91590 100644
--- a/src/core/arm/dynarmic/arm_dynarmic.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic.cpp
@@ -136,7 +136,7 @@ MICROPROFILE_DEFINE(ARM_Jit, "ARM JIT", "ARM JIT", MP_RGB(255, 64, 64));
void ARM_Dynarmic::ExecuteInstructions(int num_instructions) {
MICROPROFILE_SCOPE(ARM_Jit);
- unsigned ticks_executed = jit->Run(static_cast<unsigned>(num_instructions));
+ std::size_t ticks_executed = jit->Run(static_cast<unsigned>(num_instructions));
AddTicks(ticks_executed);
}
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index f4fbb8d04..3522d1e82 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -759,7 +759,7 @@ static ThumbDecodeStatus DecodeThumbInstruction(u32 inst, u32 addr, u32* arm_ins
ThumbDecodeStatus ret = TranslateThumbInstruction(addr, inst, arm_inst, inst_size);
if (ret == ThumbDecodeStatus::BRANCH) {
int inst_index;
- int table_length = arm_instruction_trans_len;
+ int table_length = static_cast<int>(arm_instruction_trans_len);
u32 tinstr = GetThumbInstruction(inst, addr);
switch ((tinstr & 0xF800) >> 11) {
@@ -838,7 +838,7 @@ static unsigned int InterpreterTranslateInstruction(const ARMul_State* cpu, cons
return inst_size;
}
-static int InterpreterTranslateBlock(ARMul_State* cpu, int& bb_start, u32 addr) {
+static int InterpreterTranslateBlock(ARMul_State* cpu, std::size_t& bb_start, u32 addr) {
MICROPROFILE_SCOPE(DynCom_Decode);
// Decode instruction, get index
@@ -871,7 +871,7 @@ static int InterpreterTranslateBlock(ARMul_State* cpu, int& bb_start, u32 addr)
return KEEP_GOING;
}
-static int InterpreterTranslateSingle(ARMul_State* cpu, int& bb_start, u32 addr) {
+static int InterpreterTranslateSingle(ARMul_State* cpu, std::size_t& bb_start, u32 addr) {
MICROPROFILE_SCOPE(DynCom_Decode);
ARM_INST_PTR inst_base = nullptr;
@@ -1620,7 +1620,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
unsigned int addr;
unsigned int num_instrs = 0;
- int ptr;
+ std::size_t ptr;
LOAD_NZCVT;
DISPATCH : {
diff --git a/src/core/arm/skyeye_common/armstate.h b/src/core/arm/skyeye_common/armstate.h
index 1a707ff7e..893877797 100644
--- a/src/core/arm/skyeye_common/armstate.h
+++ b/src/core/arm/skyeye_common/armstate.h
@@ -230,7 +230,7 @@ public:
// TODO(bunnei): Move this cache to a better place - it should be per codeset (likely per
// process for our purposes), not per ARMul_State (which tracks CPU core state).
- std::unordered_map<u32, int> instruction_cache;
+ std::unordered_map<u32, std::size_t> instruction_cache;
private:
void ResetMPCoreCP15Registers();
diff --git a/src/core/file_sys/archive_backend.cpp b/src/core/file_sys/archive_backend.cpp
index 1fae0ede0..87a240d7a 100644
--- a/src/core/file_sys/archive_backend.cpp
+++ b/src/core/file_sys/archive_backend.cpp
@@ -90,6 +90,8 @@ std::u16string Path::AsU16Str() const {
LOG_ERROR(Service_FS, "LowPathType cannot be converted to u16string!");
return {};
}
+
+ UNREACHABLE();
}
std::vector<u8> Path::AsBinary() const {
diff --git a/src/core/hle/applets/erreula.cpp b/src/core/hle/applets/erreula.cpp
index 75d7fd9fc..518f371f5 100644
--- a/src/core/hle/applets/erreula.cpp
+++ b/src/core/hle/applets/erreula.cpp
@@ -31,8 +31,8 @@ ResultCode ErrEula::ReceiveParameter(const Service::APT::MessageParameter& param
heap_memory = std::make_shared<std::vector<u8>>(capture_info.size);
// Create a SharedMemory that directly points to this heap block.
framebuffer_memory = Kernel::SharedMemory::CreateForApplet(
- heap_memory, 0, heap_memory->size(), MemoryPermission::ReadWrite,
- MemoryPermission::ReadWrite, "ErrEula Memory");
+ heap_memory, 0, capture_info.size, MemoryPermission::ReadWrite, MemoryPermission::ReadWrite,
+ "ErrEula Memory");
// Send the response message with the newly created SharedMemory
Service::APT::MessageParameter result;
diff --git a/src/core/hle/applets/mii_selector.cpp b/src/core/hle/applets/mii_selector.cpp
index 89f08daa2..705859f1e 100644
--- a/src/core/hle/applets/mii_selector.cpp
+++ b/src/core/hle/applets/mii_selector.cpp
@@ -38,8 +38,8 @@ ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& p
heap_memory = std::make_shared<std::vector<u8>>(capture_info.size);
// Create a SharedMemory that directly points to this heap block.
framebuffer_memory = Kernel::SharedMemory::CreateForApplet(
- heap_memory, 0, heap_memory->size(), MemoryPermission::ReadWrite,
- MemoryPermission::ReadWrite, "MiiSelector Memory");
+ heap_memory, 0, capture_info.size, MemoryPermission::ReadWrite, MemoryPermission::ReadWrite,
+ "MiiSelector Memory");
// Send the response message with the newly created SharedMemory
Service::APT::MessageParameter result;
diff --git a/src/core/hle/applets/mint.cpp b/src/core/hle/applets/mint.cpp
index 31a79ea17..50d79190b 100644
--- a/src/core/hle/applets/mint.cpp
+++ b/src/core/hle/applets/mint.cpp
@@ -31,8 +31,8 @@ ResultCode Mint::ReceiveParameter(const Service::APT::MessageParameter& paramete
heap_memory = std::make_shared<std::vector<u8>>(capture_info.size);
// Create a SharedMemory that directly points to this heap block.
framebuffer_memory = Kernel::SharedMemory::CreateForApplet(
- heap_memory, 0, heap_memory->size(), MemoryPermission::ReadWrite,
- MemoryPermission::ReadWrite, "Mint Memory");
+ heap_memory, 0, capture_info.size, MemoryPermission::ReadWrite, MemoryPermission::ReadWrite,
+ "Mint Memory");
// Send the response message with the newly created SharedMemory
Service::APT::MessageParameter result;
diff --git a/src/core/hle/applets/swkbd.cpp b/src/core/hle/applets/swkbd.cpp
index fdf8807b0..0bc471a3a 100644
--- a/src/core/hle/applets/swkbd.cpp
+++ b/src/core/hle/applets/swkbd.cpp
@@ -41,8 +41,8 @@ ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter con
heap_memory = std::make_shared<std::vector<u8>>(capture_info.size);
// Create a SharedMemory that directly points to this heap block.
framebuffer_memory = Kernel::SharedMemory::CreateForApplet(
- heap_memory, 0, heap_memory->size(), MemoryPermission::ReadWrite,
- MemoryPermission::ReadWrite, "SoftwareKeyboard Memory");
+ heap_memory, 0, capture_info.size, MemoryPermission::ReadWrite, MemoryPermission::ReadWrite,
+ "SoftwareKeyboard Memory");
// Send the response message with the newly created SharedMemory
Service::APT::MessageParameter result;
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 9cf288b08..142bb84b2 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -8,6 +8,7 @@
#include <string>
#include <utility>
#include <boost/smart_ptr/intrusive_ptr.hpp>
+#include "common/assert.h"
#include "common/common_types.h"
namespace Kernel {
@@ -84,6 +85,8 @@ public:
case HandleType::ClientSession:
return false;
}
+
+ UNREACHABLE();
}
public:
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 6838e449c..83ad9d898 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -29,7 +29,7 @@ namespace GPU {
Regs g_regs;
/// 268MHz CPU clocks / 60Hz frames per second
-const u64 frame_ticks = BASE_CLOCK_RATE_ARM11 / SCREEN_REFRESH_RATE;
+const u64 frame_ticks = static_cast<u64>(BASE_CLOCK_RATE_ARM11 / SCREEN_REFRESH_RATE);
/// Event id for CoreTiming
static int vblank_event;
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h
index 21b127fee..e3d0a0e08 100644
--- a/src/core/hw/gpu.h
+++ b/src/core/hw/gpu.h
@@ -74,9 +74,9 @@ struct Regs {
case PixelFormat::RGB5A1:
case PixelFormat::RGBA4:
return 2;
- default:
- UNIMPLEMENTED();
}
+
+ UNREACHABLE();
}
INSERT_PADDING_WORDS(0x4);
diff --git a/src/input_common/motion_emu.cpp b/src/input_common/motion_emu.cpp
index a1761f184..59a035e70 100644
--- a/src/input_common/motion_emu.cpp
+++ b/src/input_common/motion_emu.cpp
@@ -74,11 +74,14 @@ private:
bool is_tilting = false;
Common::Event shutdown_event;
- std::thread motion_emu_thread;
std::tuple<Math::Vec3<float>, Math::Vec3<float>> status;
std::mutex status_mutex;
+ // Note: always keep the thread declaration at the end so that other objects are initialized
+ // before this!
+ std::thread motion_emu_thread;
+
void MotionEmuThread() {
auto update_time = std::chrono::steady_clock::now();
Math::Quaternion<float> q = MakeQuaternion(Math::Vec3<float>(), 0);
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 1c6c15a58..aa95ef21d 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -28,6 +28,9 @@ MICROPROFILE_DEFINE(OpenGL_Blits, "OpenGL", "Blits", MP_RGB(100, 100, 255));
MICROPROFILE_DEFINE(OpenGL_CacheManagement, "OpenGL", "Cache Mgmt", MP_RGB(100, 255, 100));
RasterizerOpenGL::RasterizerOpenGL() : shader_dirty(true) {
+ // Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0
+ state.clip_distance[0] = true;
+
// Create sampler objects
for (size_t i = 0; i < texture_samplers.size(); ++i) {
texture_samplers[i].Create();
diff --git a/src/video_core/renderer_opengl/gl_shader_gen.cpp b/src/video_core/renderer_opengl/gl_shader_gen.cpp
index ae67aab05..015e69da9 100644
--- a/src/video_core/renderer_opengl/gl_shader_gen.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_gen.cpp
@@ -1112,7 +1112,10 @@ vec4 secondary_fragment_color = vec4(0.0);
"gl_FragCoord.y < scissor_y2)) discard;\n";
}
- out += "float z_over_w = 1.0 - gl_FragCoord.z * 2.0;\n";
+ // After perspective divide, OpenGL transform z_over_w from [-1, 1] to [near, far]. Here we use
+ // default near = 0 and far = 1, and undo the transformation to get the original z_over_w, then
+ // do our own transformation according to PICA specification.
+ out += "float z_over_w = 2.0 * gl_FragCoord.z - 1.0;\n";
out += "float depth = z_over_w * depth_scale + depth_offset;\n";
if (state.depthmap_enable == RasterizerRegs::DepthBuffering::WBuffering) {
out += "depth /= gl_FragCoord.w;\n";
@@ -1195,7 +1198,9 @@ void main() {
texcoord0_w = vert_texcoord0_w;
normquat = vert_normquat;
view = vert_view;
- gl_Position = vec4(vert_position.x, vert_position.y, -vert_position.z, vert_position.w);
+ gl_Position = vert_position;
+ gl_ClipDistance[0] = -vert_position.z; // fixed PICA clipping plane z <= 0
+ // TODO (wwylele): calculate gl_ClipDistance[1] from user-defined clipping plane
}
)";
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index bc9d34b84..06a905766 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -68,6 +68,8 @@ OpenGLState::OpenGLState() {
draw.vertex_buffer = 0;
draw.uniform_buffer = 0;
draw.shader_program = 0;
+
+ clip_distance = {};
}
void OpenGLState::Apply() const {
@@ -261,6 +263,17 @@ void OpenGLState::Apply() const {
glUseProgram(draw.shader_program);
}
+ // Clip distance
+ for (size_t i = 0; i < clip_distance.size(); ++i) {
+ if (clip_distance[i] != cur_state.clip_distance[i]) {
+ if (clip_distance[i]) {
+ glEnable(GL_CLIP_DISTANCE0 + i);
+ } else {
+ glDisable(GL_CLIP_DISTANCE0 + i);
+ }
+ }
+ }
+
cur_state = *this;
}
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index 745a74479..437fe34c4 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -4,6 +4,7 @@
#pragma once
+#include <array>
#include <glad/glad.h>
namespace TextureUnits {
@@ -123,6 +124,8 @@ public:
GLuint shader_program; // GL_CURRENT_PROGRAM
} draw;
+ std::array<bool, 2> clip_distance; // GL_CLIP_DISTANCE
+
OpenGLState();
/// Get the currently active OpenGL state
diff --git a/src/video_core/swrasterizer/clipper.cpp b/src/video_core/swrasterizer/clipper.cpp
index 7537689b7..cdbc71502 100644
--- a/src/video_core/swrasterizer/clipper.cpp
+++ b/src/video_core/swrasterizer/clipper.cpp
@@ -125,10 +125,6 @@ void ProcessTriangle(const OutputVertex& v0, const OutputVertex& v1, const Outpu
{Math::MakeVec(f0, f0, f0, -f1), Math::Vec4<float24>(f0, f0, f0, EPSILON)}, // w = EPSILON
}};
- // TODO: If one vertex lies outside one of the depth clipping planes, some platforms (e.g. Wii)
- // drop the whole primitive instead of clipping the primitive properly. We should test if
- // this happens on the 3DS, too.
-
// Simple implementation of the Sutherland-Hodgman clipping algorithm.
// TODO: Make this less inefficient (currently lots of useless buffering overhead happens here)
for (auto edge : clipping_edges) {
diff --git a/src/video_core/swrasterizer/rasterizer.h b/src/video_core/swrasterizer/rasterizer.h
index 2f0877581..66cd6cfd4 100644
--- a/src/video_core/swrasterizer/rasterizer.h
+++ b/src/video_core/swrasterizer/rasterizer.h
@@ -19,10 +19,9 @@ struct Vertex : Shader::OutputVertex {
// Linear interpolation
// factor: 0=this, 1=vtx
+ // Note: This function cannot be called after perspective divide
void Lerp(float24 factor, const Vertex& vtx) {
pos = pos * factor + vtx.pos * (float24::FromFloat32(1) - factor);
-
- // TODO: Should perform perspective correct interpolation here...
quat = quat * factor + vtx.quat * (float24::FromFloat32(1) - factor);
color = color * factor + vtx.color * (float24::FromFloat32(1) - factor);
tc0 = tc0 * factor + vtx.tc0 * (float24::FromFloat32(1) - factor);
@@ -30,12 +29,11 @@ struct Vertex : Shader::OutputVertex {
tc0_w = tc0_w * factor + vtx.tc0_w * (float24::FromFloat32(1) - factor);
view = view * factor + vtx.view * (float24::FromFloat32(1) - factor);
tc2 = tc2 * factor + vtx.tc2 * (float24::FromFloat32(1) - factor);
-
- screenpos = screenpos * factor + vtx.screenpos * (float24::FromFloat32(1) - factor);
}
// Linear interpolation
// factor: 0=v0, 1=v1
+ // Note: This function cannot be called after perspective divide
static Vertex Lerp(float24 factor, const Vertex& v0, const Vertex& v1) {
Vertex ret = v0;
ret.Lerp(factor, v1);