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