minor format change ; tex demo copy image added

This commit is contained in:
Krishna Yalamarthy
2021-04-13 06:29:20 -04:00
parent 66ff74eb97
commit 951c516615
4 changed files with 84 additions and 11 deletions

View File

@@ -14,16 +14,16 @@ module VX_tex_format #(
always @(*) begin
case (format)
`TEX_FORMAT_R5G6B5: begin
texel_out_r[07:00] = `TEX_COLOR_BITS'(texel_in[4:0]);
texel_out_r[15:08] = `TEX_COLOR_BITS'(texel_in[10:5]);
texel_out_r[23:16] = `TEX_COLOR_BITS'(texel_in[15:11]);
texel_out_r[07:00] = `TEX_COLOR_BITS'({texel_in[15:11],texel_in[15:13]});
texel_out_r[15:08] = `TEX_COLOR_BITS'({texel_in[10:5],texel_in[10:9]});
texel_out_r[23:16] = `TEX_COLOR_BITS'({texel_in[4:0],texel_in[4:2]});
texel_out_r[31:24] = {`TEX_COLOR_BITS{1'b1}};
end
`TEX_FORMAT_R4G4B4A4: begin
texel_out_r[07:00] = `TEX_COLOR_BITS'(texel_in[3:0]);
texel_out_r[15:08] = `TEX_COLOR_BITS'(texel_in[7:4]);
texel_out_r[23:16] = `TEX_COLOR_BITS'(texel_in[11:8]);
texel_out_r[31:24] = `TEX_COLOR_BITS'(texel_in[15:12]);
texel_out_r[07:00] = `TEX_COLOR_BITS'({texel_in[11:8],texel_in[15:12]});
texel_out_r[15:08] = `TEX_COLOR_BITS'({2{texel_in[7:4]}});
texel_out_r[23:16] = `TEX_COLOR_BITS'({2{texel_in[3:0]}});
texel_out_r[31:24] = `TEX_COLOR_BITS'({2{texel_in[15:12]}});
end
`TEX_FORMAT_L8A8: begin
texel_out_r[07:00] = `TEX_COLOR_BITS'(texel_in[7:0]);