{"id":38,"date":"2023-07-11T17:06:25","date_gmt":"2023-07-11T17:06:25","guid":{"rendered":"https:\/\/blogs.scummvm.org\/eklipsed\/?p=38"},"modified":"2023-07-11T17:06:25","modified_gmt":"2023-07-11T17:06:25","slug":"intel-and-amd","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/eklipsed\/2023\/07\/11\/intel-and-amd\/","title":{"rendered":"Intel and AMD!"},"content":{"rendered":"<p>I finally ported over my vectorized code to Intel and AMD chips! And with time to spare, because my midterm evaluations are coming up (I&#8217;d like to thank my mentors they have helped me so much, I wouldn&#8217;t have done all of this this quickly without their help). So yea where to go from now? My current plans are to port the code to PowerPC&#8217;s AltiVec extensions and make a AVX2 version of the SSE2 code I made for x86_64 processors. Other than that here are some pictures I took of weird bugs while porting the Arm NEON code to x86 SSE2 with some comments, (which these pictures are dearly needed, this blog has been quite boring without pictures).<\/p>\n<figure id=\"attachment_43\" aria-describedby=\"caption-attachment-43\" style=\"width: 300px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-43 size-medium\" src=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/wierd2-300x201.png\" alt=\"\" width=\"300\" height=\"201\" srcset=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/wierd2-300x201.png 300w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/wierd2.png 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-43\" class=\"wp-caption-text\">I think this was the first picture I took. Here is what the game &#8220;Kings Quest 2: AGDI&#8221; looks like with only 32bit pixel graphics blitting (I didn&#8217;t implement 16bit pixel formats yet here)<\/figcaption><\/figure>\n<figure id=\"attachment_39\" aria-describedby=\"caption-attachment-39\" style=\"width: 300px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-39 size-medium\" src=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/weird3-300x201.png\" alt=\"\" width=\"300\" height=\"201\" srcset=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/weird3-300x201.png 300w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/weird3.png 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-39\" class=\"wp-caption-text\">Same build as the one above. As you can see by the water on the shore I got alpha blending working correctly, but there is some off by one error at the right of the screen where it overdraws a pixel or 2.<\/figcaption><\/figure>\n<figure id=\"attachment_41\" aria-describedby=\"caption-attachment-41\" style=\"width: 300px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-41 size-medium\" src=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/weird5-300x201.png\" alt=\"\" width=\"300\" height=\"201\" srcset=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/weird5-300x201.png 300w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/weird5.png 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-41\" class=\"wp-caption-text\">Yea, so when I finally did get 16bit blitting\/blending working, I noticed that scaled images were being messed with a lot and well just looked completely borked.<\/figcaption><\/figure>\n<figure id=\"attachment_40\" aria-describedby=\"caption-attachment-40\" style=\"width: 300px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-40 size-medium\" src=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/weird4-300x201.png\" alt=\"\" width=\"300\" height=\"201\" srcset=\"https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/weird4-300x201.png 300w, https:\/\/blogs.scummvm.org\/eklipsed\/wp-content\/uploads\/sites\/70\/2023\/07\/weird4.png 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-40\" class=\"wp-caption-text\">This is probably the worst looking picture of them all. Its got the nasty off by one error and the main character looks like something is not right&#8230;<\/figcaption><\/figure>\n<p>Now don&#8217;t worry, I fixed all the bugs. In fact you will be able to tell that it&#8217;s fine once my PR (#<a href=\"https:\/\/github.com\/scummvm\/scummvm\/pull\/5144\">5144<\/a>) gets accepted. Hopefully it makes your games run a bit faster (even if you don&#8217;t have vector extensions in your computer).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I finally ported over my vectorized code to Intel and AMD chips! And with time to spare, because my midterm evaluations are coming up (I&#8217;d like to thank my mentors they have helped me so much, I wouldn&#8217;t have done all of this this quickly without their help). So yea where to go from now? [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":44,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/posts\/38\/revisions\/44"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/eklipsed\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}