1*7688df22SAndroid Build Coastguard Worker /* 2*7688df22SAndroid Build Coastguard Worker * Copyright 2022 Advanced Micro Devices, Inc. 3*7688df22SAndroid Build Coastguard Worker * 4*7688df22SAndroid Build Coastguard Worker * Permission is hereby granted, free of charge, to any person obtaining a 5*7688df22SAndroid Build Coastguard Worker * copy of this software and associated documentation files (the "Software"), 6*7688df22SAndroid Build Coastguard Worker * to deal in the Software without restriction, including without limitation 7*7688df22SAndroid Build Coastguard Worker * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*7688df22SAndroid Build Coastguard Worker * and/or sell copies of the Software, and to permit persons to whom the 9*7688df22SAndroid Build Coastguard Worker * Software is furnished to do so, subject to the following conditions: 10*7688df22SAndroid Build Coastguard Worker * 11*7688df22SAndroid Build Coastguard Worker * The above copyright notice and this permission notice shall be included in 12*7688df22SAndroid Build Coastguard Worker * all copies or substantial portions of the Software. 13*7688df22SAndroid Build Coastguard Worker * 14*7688df22SAndroid Build Coastguard Worker * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*7688df22SAndroid Build Coastguard Worker * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*7688df22SAndroid Build Coastguard Worker * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*7688df22SAndroid Build Coastguard Worker * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18*7688df22SAndroid Build Coastguard Worker * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*7688df22SAndroid Build Coastguard Worker * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*7688df22SAndroid Build Coastguard Worker * OTHER DEALINGS IN THE SOFTWARE. 21*7688df22SAndroid Build Coastguard Worker * 22*7688df22SAndroid Build Coastguard Worker */ 23*7688df22SAndroid Build Coastguard Worker 24*7688df22SAndroid Build Coastguard Worker #ifndef _shader_code_hang_h_ 25*7688df22SAndroid Build Coastguard Worker #define _shader_code_hang_h_ 26*7688df22SAndroid Build Coastguard Worker 27*7688df22SAndroid Build Coastguard Worker static const unsigned int memcpy_shader_hang[] = { 28*7688df22SAndroid Build Coastguard Worker 0xFFFFFFFF, 0xBEFE0A7E, 0xBEFC0304, 0xC0C20100, 29*7688df22SAndroid Build Coastguard Worker 0xC0800300, 0xC8080000, 0xC80C0100, 0xC8090001, 30*7688df22SAndroid Build Coastguard Worker 0xC80D0101, 0xBF8C007F, 0xF0800F00, 0x00010002, 31*7688df22SAndroid Build Coastguard Worker 0xBEFE040C, 0xBF8C0F70, 0xBF800000, 0xBF800000, 32*7688df22SAndroid Build Coastguard Worker 0xF800180F, 0x03020100, 0xBF810000 33*7688df22SAndroid Build Coastguard Worker }; 34*7688df22SAndroid Build Coastguard Worker 35*7688df22SAndroid Build Coastguard Worker struct shader_test_shader_bin { 36*7688df22SAndroid Build Coastguard Worker const uint32_t *shader; 37*7688df22SAndroid Build Coastguard Worker uint32_t header_length; 38*7688df22SAndroid Build Coastguard Worker uint32_t body_length; 39*7688df22SAndroid Build Coastguard Worker uint32_t foot_length; 40*7688df22SAndroid Build Coastguard Worker }; 41*7688df22SAndroid Build Coastguard Worker 42*7688df22SAndroid Build Coastguard Worker static const unsigned int memcpy_cs_hang_slow_ai_codes[] = { 43*7688df22SAndroid Build Coastguard Worker 0xd1fd0000, 0x04010c08, 0xe00c2000, 0x80000100, 44*7688df22SAndroid Build Coastguard Worker 0xbf8c0f70, 0xe01c2000, 0x80010100, 0xbf810000 45*7688df22SAndroid Build Coastguard Worker }; 46*7688df22SAndroid Build Coastguard Worker 47*7688df22SAndroid Build Coastguard Worker static struct shader_test_shader_bin memcpy_cs_hang_slow_ai = { 48*7688df22SAndroid Build Coastguard Worker memcpy_cs_hang_slow_ai_codes, 4, 3, 1 49*7688df22SAndroid Build Coastguard Worker }; 50*7688df22SAndroid Build Coastguard Worker 51*7688df22SAndroid Build Coastguard Worker static const unsigned int memcpy_cs_hang_slow_rv_codes[] = { 52*7688df22SAndroid Build Coastguard Worker 0x8e00860c, 0x32000000, 0xe00c2000, 0x80010100, 53*7688df22SAndroid Build Coastguard Worker 0xbf8c0f70, 0xe01c2000, 0x80020100, 0xbf810000 54*7688df22SAndroid Build Coastguard Worker }; 55*7688df22SAndroid Build Coastguard Worker 56*7688df22SAndroid Build Coastguard Worker static struct shader_test_shader_bin memcpy_cs_hang_slow_rv = { 57*7688df22SAndroid Build Coastguard Worker memcpy_cs_hang_slow_rv_codes, 4, 3, 1 58*7688df22SAndroid Build Coastguard Worker }; 59*7688df22SAndroid Build Coastguard Worker 60*7688df22SAndroid Build Coastguard Worker static const unsigned int memcpy_cs_hang_slow_nv_codes[] = { 61*7688df22SAndroid Build Coastguard Worker 0xd7460000, 0x04010c08, 0xe00c2000, 0x80000100, 62*7688df22SAndroid Build Coastguard Worker 0xbf8c0f70, 0xe01ca000, 0x80010100, 0xbf810000 63*7688df22SAndroid Build Coastguard Worker }; 64*7688df22SAndroid Build Coastguard Worker 65*7688df22SAndroid Build Coastguard Worker static struct shader_test_shader_bin memcpy_cs_hang_slow_nv = { 66*7688df22SAndroid Build Coastguard Worker memcpy_cs_hang_slow_nv_codes, 4, 3, 1 67*7688df22SAndroid Build Coastguard Worker }; 68*7688df22SAndroid Build Coastguard Worker 69*7688df22SAndroid Build Coastguard Worker 70*7688df22SAndroid Build Coastguard Worker static const unsigned int memcpy_ps_hang_slow_ai_codes[] = { 71*7688df22SAndroid Build Coastguard Worker 0xbefc000c, 0xbe8e017e, 0xbefe077e, 0xd4080000, 72*7688df22SAndroid Build Coastguard Worker 0xd4090001, 0xd40c0100, 0xd40d0101, 0xf0800f00, 73*7688df22SAndroid Build Coastguard Worker 0x00400002, 0xbefe010e, 0xbf8c0f70, 0xbf800000, 74*7688df22SAndroid Build Coastguard Worker 0xbf800000, 0xbf800000, 0xbf800000, 0xc400180f, 75*7688df22SAndroid Build Coastguard Worker 0x03020100, 0xbf810000 76*7688df22SAndroid Build Coastguard Worker }; 77*7688df22SAndroid Build Coastguard Worker 78*7688df22SAndroid Build Coastguard Worker static struct shader_test_shader_bin memcpy_ps_hang_slow_ai = { 79*7688df22SAndroid Build Coastguard Worker memcpy_ps_hang_slow_ai_codes, 7, 2, 9 80*7688df22SAndroid Build Coastguard Worker }; 81*7688df22SAndroid Build Coastguard Worker 82*7688df22SAndroid Build Coastguard Worker static const unsigned int memcpy_ps_hang_slow_navi10_codes[] = { 83*7688df22SAndroid Build Coastguard Worker 0xBEFC030C,0xBE8E047E,0xBEFE0A7E,0xC8080000, 84*7688df22SAndroid Build Coastguard Worker 0xC80C0100,0xC8090001,0xC80D0101,0xF0800F0A, 85*7688df22SAndroid Build Coastguard Worker 0x00400402,0x00000003,0xBEFE040E,0xBF8C0F70, 86*7688df22SAndroid Build Coastguard Worker 0xBF800000,0xBF800000,0xBF800000,0xBF800000, 87*7688df22SAndroid Build Coastguard Worker 0xF800180F,0x07060504,0xBF810000 88*7688df22SAndroid Build Coastguard Worker }; 89*7688df22SAndroid Build Coastguard Worker 90*7688df22SAndroid Build Coastguard Worker static struct shader_test_shader_bin memcpy_ps_hang_slow_navi10 = { 91*7688df22SAndroid Build Coastguard Worker memcpy_ps_hang_slow_navi10_codes, 7, 3, 9 92*7688df22SAndroid Build Coastguard Worker }; 93*7688df22SAndroid Build Coastguard Worker 94*7688df22SAndroid Build Coastguard Worker static const unsigned int memcpy_ps_hang_slow_navi21_codes[] = { 95*7688df22SAndroid Build Coastguard Worker 0xBEFC030C, 0xBE8E047E, 0xBEFE0A7E, 0xC8080000, 0xC8000100, 0xC8090001, 0xC8010101, 0x87FE0E7E, // header 96*7688df22SAndroid Build Coastguard Worker 0xF0800F0A, 0x00400002, 0x00000000, // body - image_sample instruction 97*7688df22SAndroid Build Coastguard Worker 0xBFA3FFE3, 0xBEFE040E, 0xBF8C3F70, 0xBF800000, 0xBF800000, 0xBF800000, 0xBF800000, 0xF800180F, 0x03020100, 0xBF810000 // footer 98*7688df22SAndroid Build Coastguard Worker }; 99*7688df22SAndroid Build Coastguard Worker 100*7688df22SAndroid Build Coastguard Worker static struct shader_test_shader_bin memcpy_ps_hang_slow_navi21 = { 101*7688df22SAndroid Build Coastguard Worker memcpy_ps_hang_slow_navi21_codes, 8, 3, 10 102*7688df22SAndroid Build Coastguard Worker }; 103*7688df22SAndroid Build Coastguard Worker 104*7688df22SAndroid Build Coastguard Worker #endif 105