Module: Mesa
Branch: main
Commit: 12f0daddfc8d39feef699db586f1188cf41b2efd
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=12f0daddfc8d39feef699db586f1188cf41b2efd

Author: Frank Binns <[email protected]>
Date:   Fri Feb 24 22:28:18 2023 +0000

pvr: initialise size for placeholder "zeroed" shaders

Fixes an assert() in pvr_gpu_upload_usc().

Signed-off-by: Frank Binns <[email protected]>
Reviewed-by: Karmjit Mahil <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21537>

---

 .../vulkan/usc/programs/pvr_static_shaders.h       | 364 +++++++++++++++------
 1 file changed, 259 insertions(+), 105 deletions(-)

diff --git a/src/imagination/vulkan/usc/programs/pvr_static_shaders.h 
b/src/imagination/vulkan/usc/programs/pvr_static_shaders.h
index a99493e7b2c..1deaa43f113 100644
--- a/src/imagination/vulkan/usc/programs/pvr_static_shaders.h
+++ b/src/imagination/vulkan/usc/programs/pvr_static_shaders.h
@@ -73,7 +73,7 @@ static const struct pvr_shader_factory_info 
availability_query_write_info = {
    0,
    0,
    0,
-   0,
+   sizeof(availability_query_write_shader),
    availability_query_write_shader,
    0,
    0,
@@ -103,7 +103,7 @@ static const struct pvr_shader_factory_info 
copy_query_results_info = {
    0,
    0,
    0,
-   0,
+   sizeof(copy_query_results_shader),
    copy_query_results_shader,
    0,
    0,
@@ -133,7 +133,7 @@ static const struct pvr_shader_factory_info 
reset_query_info = {
    0,
    0,
    0,
-   0,
+   sizeof(reset_query_shader_code),
    reset_query_shader_code,
    0,
    0,
@@ -168,7 +168,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_0_offt_out_reg_shader_code),
       clear_attachments_1_dw_0_offt_out_reg_shader_code,
       0,
       0,
@@ -194,7 +194,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_0_offt_out_mem_shader_code),
       clear_attachments_1_dw_0_offt_out_mem_shader_code,
       0,
       0,
@@ -220,7 +220,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_0_offt_out_reg_shader_code),
       clear_attachments_2_dw_0_offt_out_reg_shader_code,
       0,
       0,
@@ -246,7 +246,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_0_offt_out_mem_shader_code),
       clear_attachments_2_dw_0_offt_out_mem_shader_code,
       0,
       0,
@@ -272,7 +272,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_0_offt_out_reg_shader_code),
       clear_attachments_3_dw_0_offt_out_reg_shader_code,
       0,
       0,
@@ -298,7 +298,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_0_offt_out_mem_shader_code),
       clear_attachments_3_dw_0_offt_out_mem_shader_code,
       0,
       0,
@@ -324,7 +324,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_0_offt_out_reg_shader_code),
       clear_attachments_4_dw_0_offt_out_reg_shader_code,
       0,
       0,
@@ -350,7 +350,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_0_offt_out_mem_shader_code),
       clear_attachments_4_dw_0_offt_out_mem_shader_code,
       0,
       0,
@@ -376,7 +376,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_1_offt_out_reg_shader_code),
       clear_attachments_1_dw_1_offt_out_reg_shader_code,
       0,
       0,
@@ -402,7 +402,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_1_offt_out_mem_shader_code),
       clear_attachments_1_dw_1_offt_out_mem_shader_code,
       0,
       0,
@@ -428,7 +428,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_1_offt_out_reg_shader_code),
       clear_attachments_2_dw_1_offt_out_reg_shader_code,
       0,
       0,
@@ -454,7 +454,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_1_offt_out_mem_shader_code),
       clear_attachments_2_dw_1_offt_out_mem_shader_code,
       0,
       0,
@@ -480,7 +480,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_1_offt_out_reg_shader_code),
       clear_attachments_3_dw_1_offt_out_reg_shader_code,
       0,
       0,
@@ -506,7 +506,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_1_offt_out_mem_shader_code),
       clear_attachments_3_dw_1_offt_out_mem_shader_code,
       0,
       0,
@@ -532,7 +532,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_1_offt_out_reg_shader_code),
       clear_attachments_4_dw_1_offt_out_reg_shader_code,
       0,
       0,
@@ -558,7 +558,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_1_offt_out_mem_shader_code),
       clear_attachments_4_dw_1_offt_out_mem_shader_code,
       0,
       0,
@@ -584,7 +584,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_2_offt_out_reg_shader_code),
       clear_attachments_1_dw_2_offt_out_reg_shader_code,
       0,
       0,
@@ -610,7 +610,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_2_offt_out_mem_shader_code),
       clear_attachments_1_dw_2_offt_out_mem_shader_code,
       0,
       0,
@@ -636,7 +636,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_2_offt_out_reg_shader_code),
       clear_attachments_2_dw_2_offt_out_reg_shader_code,
       0,
       0,
@@ -662,7 +662,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_2_offt_out_mem_shader_code),
       clear_attachments_2_dw_2_offt_out_mem_shader_code,
       0,
       0,
@@ -688,7 +688,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_2_offt_out_reg_shader_code),
       clear_attachments_3_dw_2_offt_out_reg_shader_code,
       0,
       0,
@@ -714,7 +714,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_2_offt_out_mem_shader_code),
       clear_attachments_3_dw_2_offt_out_mem_shader_code,
       0,
       0,
@@ -740,7 +740,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_2_offt_out_reg_shader_code),
       clear_attachments_4_dw_2_offt_out_reg_shader_code,
       0,
       0,
@@ -766,7 +766,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_2_offt_out_mem_shader_code),
       clear_attachments_4_dw_2_offt_out_mem_shader_code,
       0,
       0,
@@ -792,7 +792,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_3_offt_out_reg_shader_code),
       clear_attachments_1_dw_3_offt_out_reg_shader_code,
       0,
       0,
@@ -818,7 +818,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_3_offt_out_mem_shader_code),
       clear_attachments_1_dw_3_offt_out_mem_shader_code,
       0,
       0,
@@ -844,7 +844,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_3_offt_out_reg_shader_code),
       clear_attachments_2_dw_3_offt_out_reg_shader_code,
       0,
       0,
@@ -870,7 +870,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_3_offt_out_mem_shader_code),
       clear_attachments_2_dw_3_offt_out_mem_shader_code,
       0,
       0,
@@ -896,7 +896,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_3_offt_out_reg_shader_code),
       clear_attachments_3_dw_3_offt_out_reg_shader_code,
       0,
       0,
@@ -922,7 +922,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_3_offt_out_mem_shader_code),
       clear_attachments_3_dw_3_offt_out_mem_shader_code,
       0,
       0,
@@ -948,7 +948,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_3_offt_out_reg_shader_code),
       clear_attachments_4_dw_3_offt_out_reg_shader_code,
       0,
       0,
@@ -974,7 +974,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_3_offt_out_mem_shader_code),
       clear_attachments_4_dw_3_offt_out_mem_shader_code,
       0,
       0,
@@ -1000,7 +1000,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_4_offt_out_reg_shader_code),
       clear_attachments_1_dw_4_offt_out_reg_shader_code,
       0,
       0,
@@ -1026,7 +1026,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_4_offt_out_mem_shader_code),
       clear_attachments_1_dw_4_offt_out_mem_shader_code,
       0,
       0,
@@ -1052,7 +1052,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_4_offt_out_reg_shader_code),
       clear_attachments_2_dw_4_offt_out_reg_shader_code,
       0,
       0,
@@ -1078,7 +1078,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_4_offt_out_mem_shader_code),
       clear_attachments_2_dw_4_offt_out_mem_shader_code,
       0,
       0,
@@ -1104,7 +1104,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_4_offt_out_reg_shader_code),
       clear_attachments_3_dw_4_offt_out_reg_shader_code,
       0,
       0,
@@ -1130,7 +1130,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_4_offt_out_mem_shader_code),
       clear_attachments_3_dw_4_offt_out_mem_shader_code,
       0,
       0,
@@ -1156,7 +1156,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_4_offt_out_reg_shader_code),
       clear_attachments_4_dw_4_offt_out_reg_shader_code,
       0,
       0,
@@ -1182,7 +1182,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_4_dw_4_offt_out_mem_shader_code),
       clear_attachments_4_dw_4_offt_out_mem_shader_code,
       0,
       0,
@@ -1208,7 +1208,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_5_offt_out_reg_shader_code),
       clear_attachments_1_dw_5_offt_out_reg_shader_code,
       0,
       0,
@@ -1234,7 +1234,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_5_offt_out_mem_shader_code),
       clear_attachments_1_dw_5_offt_out_mem_shader_code,
       0,
       0,
@@ -1260,7 +1260,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_5_offt_out_reg_shader_code),
       clear_attachments_2_dw_5_offt_out_reg_shader_code,
       0,
       0,
@@ -1286,7 +1286,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_5_offt_out_mem_shader_code),
       clear_attachments_2_dw_5_offt_out_mem_shader_code,
       0,
       0,
@@ -1312,7 +1312,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_5_offt_out_reg_shader_code),
       clear_attachments_3_dw_5_offt_out_reg_shader_code,
       0,
       0,
@@ -1338,7 +1338,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_3_dw_5_offt_out_mem_shader_code),
       clear_attachments_3_dw_5_offt_out_mem_shader_code,
       0,
       0,
@@ -1364,7 +1364,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_6_offt_out_reg_shader_code),
       clear_attachments_1_dw_6_offt_out_reg_shader_code,
       0,
       0,
@@ -1390,7 +1390,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_6_offt_out_mem_shader_code),
       clear_attachments_1_dw_6_offt_out_mem_shader_code,
       0,
       0,
@@ -1416,7 +1416,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_6_offt_out_reg_shader_code),
       clear_attachments_2_dw_6_offt_out_reg_shader_code,
       0,
       0,
@@ -1442,7 +1442,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_2_dw_6_offt_out_mem_shader_code),
       clear_attachments_2_dw_6_offt_out_mem_shader_code,
       0,
       0,
@@ -1468,7 +1468,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_7_offt_out_reg_shader_code),
       clear_attachments_1_dw_7_offt_out_reg_shader_code,
       0,
       0,
@@ -1494,7 +1494,7 @@ static const struct pvr_shader_factory_info
       0,
       0,
       0,
-      0,
+      sizeof(clear_attachments_1_dw_7_offt_out_mem_shader_code),
       clear_attachments_1_dw_7_offt_out_mem_shader_code,
       0,
       0,
@@ -1684,22 +1684,64 @@ static struct {
 static const uint8_t spm_load_1X_1_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_1X_1_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_1X_1_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_1X_1_regs_shader_code),
+   spm_load_1X_1_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_1X_2_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_1X_2_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_1X_2_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_1X_2_regs_shader_code),
+   spm_load_1X_2_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_1X_4_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_1X_4_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_1X_4_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_1X_4_regs_shader_code),
+   spm_load_1X_4_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_1X_1_buffers_shader_code[8] = { 0 };
@@ -1712,7 +1754,7 @@ static const struct pvr_shader_factory_info 
spm_load_1X_1_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_1X_1_buffers_shader_code),
    spm_load_1X_1_buffers_shader_code,
    0,
    0,
@@ -1735,7 +1777,7 @@ static const struct pvr_shader_factory_info 
spm_load_1X_2_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_1X_2_buffers_shader_code),
    spm_load_1X_2_buffers_shader_code,
    0,
    0,
@@ -1758,7 +1800,7 @@ static const struct pvr_shader_factory_info 
spm_load_1X_3_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_1X_3_buffers_shader_code),
    spm_load_1X_3_buffers_shader_code,
    0,
    0,
@@ -1781,7 +1823,7 @@ static const struct pvr_shader_factory_info 
spm_load_1X_4_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_1X_4_buffers_shader_code),
    spm_load_1X_4_buffers_shader_code,
    0,
    0,
@@ -1804,7 +1846,7 @@ static const struct pvr_shader_factory_info 
spm_load_1X_5_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_1X_5_buffers_shader_code),
    spm_load_1X_5_buffers_shader_code,
    0,
    0,
@@ -1827,7 +1869,7 @@ static const struct pvr_shader_factory_info 
spm_load_1X_6_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_1X_6_buffers_shader_code),
    spm_load_1X_6_buffers_shader_code,
    0,
    0,
@@ -1850,7 +1892,7 @@ static const struct pvr_shader_factory_info 
spm_load_1X_7_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_1X_7_buffers_shader_code),
    spm_load_1X_7_buffers_shader_code,
    0,
    0,
@@ -1866,22 +1908,64 @@ static const struct pvr_shader_factory_info 
spm_load_1X_7_buffers_info = {
 static const uint8_t spm_load_2X_1_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_2X_1_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_2X_1_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_2X_1_regs_shader_code),
+   spm_load_2X_1_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_2X_2_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_2X_2_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_2X_2_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_2X_2_regs_shader_code),
+   spm_load_2X_2_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_2X_4_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_2X_4_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_2X_4_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_2X_4_regs_shader_code),
+   spm_load_2X_4_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_2X_1_buffers_shader_code[8] = { 0 };
@@ -1894,7 +1978,7 @@ static const struct pvr_shader_factory_info 
spm_load_2X_1_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_2X_1_buffers_shader_code),
    spm_load_2X_1_buffers_shader_code,
    0,
    0,
@@ -1917,7 +2001,7 @@ static const struct pvr_shader_factory_info 
spm_load_2X_2_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_2X_2_buffers_shader_code),
    spm_load_2X_2_buffers_shader_code,
    0,
    0,
@@ -1940,7 +2024,7 @@ static const struct pvr_shader_factory_info 
spm_load_2X_3_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_2X_3_buffers_shader_code),
    spm_load_2X_3_buffers_shader_code,
    0,
    0,
@@ -1963,7 +2047,7 @@ static const struct pvr_shader_factory_info 
spm_load_2X_4_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_2X_4_buffers_shader_code),
    spm_load_2X_4_buffers_shader_code,
    0,
    0,
@@ -1986,7 +2070,7 @@ static const struct pvr_shader_factory_info 
spm_load_2X_5_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_2X_5_buffers_shader_code),
    spm_load_2X_5_buffers_shader_code,
    0,
    0,
@@ -2009,7 +2093,7 @@ static const struct pvr_shader_factory_info 
spm_load_2X_6_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_2X_6_buffers_shader_code),
    spm_load_2X_6_buffers_shader_code,
    0,
    0,
@@ -2032,7 +2116,7 @@ static const struct pvr_shader_factory_info 
spm_load_2X_7_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_2X_7_buffers_shader_code),
    spm_load_2X_7_buffers_shader_code,
    0,
    0,
@@ -2048,15 +2132,43 @@ static const struct pvr_shader_factory_info 
spm_load_2X_7_buffers_info = {
 static const uint8_t spm_load_4X_1_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_4X_1_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_4X_1_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_4X_1_regs_shader_code),
+   spm_load_4X_1_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_4X_2_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_4X_2_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_4X_2_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_4X_2_regs_shader_code),
+   spm_load_4X_2_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_4X_4_regs_shader_code[8] = { 0 };
@@ -2076,7 +2188,7 @@ static const struct pvr_shader_factory_info 
spm_load_4X_1_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_4X_1_buffers_shader_code),
    spm_load_4X_1_buffers_shader_code,
    0,
    0,
@@ -2099,7 +2211,7 @@ static const struct pvr_shader_factory_info 
spm_load_4X_2_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_4X_2_buffers_shader_code),
    spm_load_4X_2_buffers_shader_code,
    0,
    0,
@@ -2122,7 +2234,7 @@ static const struct pvr_shader_factory_info 
spm_load_4X_3_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_4X_3_buffers_shader_code),
    spm_load_4X_3_buffers_shader_code,
    0,
    0,
@@ -2145,7 +2257,7 @@ static const struct pvr_shader_factory_info 
spm_load_4X_4_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_4X_4_buffers_shader_code),
    spm_load_4X_4_buffers_shader_code,
    0,
    0,
@@ -2168,7 +2280,7 @@ static const struct pvr_shader_factory_info 
spm_load_4X_5_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_4X_5_buffers_shader_code),
    spm_load_4X_5_buffers_shader_code,
    0,
    0,
@@ -2191,7 +2303,7 @@ static const struct pvr_shader_factory_info 
spm_load_4X_6_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_4X_6_buffers_shader_code),
    spm_load_4X_6_buffers_shader_code,
    0,
    0,
@@ -2214,7 +2326,7 @@ static const struct pvr_shader_factory_info 
spm_load_4X_7_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_4X_7_buffers_shader_code),
    spm_load_4X_7_buffers_shader_code,
    0,
    0,
@@ -2230,22 +2342,64 @@ static const struct pvr_shader_factory_info 
spm_load_4X_7_buffers_info = {
 static const uint8_t spm_load_8X_1_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_8X_1_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_8X_1_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_8X_1_regs_shader_code),
+   spm_load_8X_1_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_8X_2_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_8X_2_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_8X_2_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_8X_2_regs_shader_code),
+   spm_load_8X_2_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_8X_4_regs_shader_code[8] = { 0 };
 
 static const struct pvr_shader_factory_info spm_load_8X_4_regs_info = {
-   0, 0, 0,    0, 0,    0, spm_load_8X_4_regs_shader_code, 0, 0, NULL,
-   0, 0, NULL, 0, NULL, 0,
+   0,
+   0,
+   0,
+   0,
+   0,
+   sizeof(spm_load_8X_4_regs_shader_code),
+   spm_load_8X_4_regs_shader_code,
+   0,
+   0,
+   NULL,
+   0,
+   0,
+   NULL,
+   0,
+   NULL,
+   0,
 };
 
 static const uint8_t spm_load_8X_1_buffers_shader_code[8] = { 0 };
@@ -2258,7 +2412,7 @@ static const struct pvr_shader_factory_info 
spm_load_8X_1_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_8X_1_buffers_shader_code),
    spm_load_8X_1_buffers_shader_code,
    0,
    0,
@@ -2281,7 +2435,7 @@ static const struct pvr_shader_factory_info 
spm_load_8X_2_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_8X_2_buffers_shader_code),
    spm_load_8X_2_buffers_shader_code,
    0,
    0,
@@ -2304,7 +2458,7 @@ static const struct pvr_shader_factory_info 
spm_load_8X_3_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_8X_3_buffers_shader_code),
    spm_load_8X_3_buffers_shader_code,
    0,
    0,
@@ -2327,7 +2481,7 @@ static const struct pvr_shader_factory_info 
spm_load_8X_4_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_8X_4_buffers_shader_code),
    spm_load_8X_4_buffers_shader_code,
    0,
    0,
@@ -2350,7 +2504,7 @@ static const struct pvr_shader_factory_info 
spm_load_8X_5_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_8X_5_buffers_shader_code),
    spm_load_8X_5_buffers_shader_code,
    0,
    0,
@@ -2373,7 +2527,7 @@ static const struct pvr_shader_factory_info 
spm_load_8X_6_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_8X_6_buffers_shader_code),
    spm_load_8X_6_buffers_shader_code,
    0,
    0,
@@ -2396,7 +2550,7 @@ static const struct pvr_shader_factory_info 
spm_load_8X_7_buffers_info = {
    0,
    0,
    0,
-   0,
+   sizeof(spm_load_8X_7_buffers_shader_code),
    spm_load_8X_7_buffers_shader_code,
    0,
    0,

Reply via email to