gl4: more color formats
This commit is contained in:
parent
1e4d65bcf7
commit
abda769c45
|
@ -2598,6 +2598,10 @@ bool CommandProcessor::IssueCopy() {
|
||||||
GLenum read_format;
|
GLenum read_format;
|
||||||
GLenum read_type;
|
GLenum read_type;
|
||||||
switch (copy_dest_format) {
|
switch (copy_dest_format) {
|
||||||
|
case ColorFormat::k_1_5_5_5:
|
||||||
|
read_format = GL_RGB5_A1;
|
||||||
|
read_type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
|
||||||
|
break;
|
||||||
case ColorFormat::k_2_10_10_10:
|
case ColorFormat::k_2_10_10_10:
|
||||||
read_format = GL_RGB10_A2;
|
read_format = GL_RGB10_A2;
|
||||||
read_type = GL_UNSIGNED_INT_10_10_10_2;
|
read_type = GL_UNSIGNED_INT_10_10_10_2;
|
||||||
|
@ -2614,6 +2618,10 @@ bool CommandProcessor::IssueCopy() {
|
||||||
read_format = GL_R8;
|
read_format = GL_R8;
|
||||||
read_type = GL_UNSIGNED_BYTE;
|
read_type = GL_UNSIGNED_BYTE;
|
||||||
break;
|
break;
|
||||||
|
case ColorFormat::k_8_8:
|
||||||
|
read_format = GL_RG8;
|
||||||
|
read_type = GL_UNSIGNED_BYTE;
|
||||||
|
break;
|
||||||
case ColorFormat::k_8_8_8_8:
|
case ColorFormat::k_8_8_8_8:
|
||||||
read_format = copy_dest_swap ? GL_BGRA : GL_RGBA;
|
read_format = copy_dest_swap ? GL_BGRA : GL_RGBA;
|
||||||
read_type = GL_UNSIGNED_BYTE;
|
read_type = GL_UNSIGNED_BYTE;
|
||||||
|
@ -2650,7 +2658,12 @@ bool CommandProcessor::IssueCopy() {
|
||||||
read_format = GL_RG32F;
|
read_format = GL_RG32F;
|
||||||
read_type = GL_FLOAT;
|
read_type = GL_FLOAT;
|
||||||
break;
|
break;
|
||||||
|
case ColorFormat::k_32_32_32_32_FLOAT:
|
||||||
|
read_format = GL_RGBA32F;
|
||||||
|
read_type = GL_FLOAT;
|
||||||
|
break;
|
||||||
case ColorFormat::k_10_11_11:
|
case ColorFormat::k_10_11_11:
|
||||||
|
case ColorFormat::k_11_11_10:
|
||||||
read_format = GL_R11F_G11F_B10F;
|
read_format = GL_R11F_G11F_B10F;
|
||||||
read_type = GL_UNSIGNED_INT_10F_11F_11F_REV;
|
read_type = GL_UNSIGNED_INT_10F_11F_11F_REV;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue