[Mesa-dev] [PATCH 14/25] gallium/drivers: add default values for PIPE_CAP_MAX_GL_*_VERSION
Emil Velikov
emil.l.velikov at gmail.com
Fri Feb 21 19:04:04 PST 2014
Based on the current return value of glGetString(GL_VERSION)
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/gallium/drivers/freedreno/freedreno_screen.c | 11 ++++++++++-
src/gallium/drivers/i915/i915_screen.c | 9 +++++++++
src/gallium/drivers/ilo/ilo_screen.c | 9 +++++++++
src/gallium/drivers/llvmpipe/lp_screen.c | 9 +++++++++
src/gallium/drivers/nouveau/nv30/nv30_screen.c | 10 ++++++++++
src/gallium/drivers/nouveau/nv50/nv50_screen.c | 10 ++++++++++
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 10 ++++++++++
src/gallium/drivers/r300/r300_screen.c | 9 +++++++++
src/gallium/drivers/r600/r600_pipe.c | 9 +++++++++
src/gallium/drivers/radeonsi/si_pipe.c | 9 +++++++++
src/gallium/drivers/softpipe/sp_screen.c | 9 +++++++++
src/gallium/drivers/svga/svga_screen.c | 9 +++++++++
12 files changed, 112 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index e1b5dae..68f7f13 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -244,9 +244,18 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_LITTLE;
- case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
+ case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return 64;
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 0;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 14;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 20;
+
default:
DBG("unknown param %d", param);
return 0;
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 9f08f86..1f55a06 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -272,6 +272,15 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_LITTLE;
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 0;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 21;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 20;
+
default:
debug_printf("%s: Unknown cap %u.\n", __FUNCTION__, cap);
return 0;
diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c
index 9c363ac..4b595a6 100644
--- a/src/gallium/drivers/ilo/ilo_screen.c
+++ b/src/gallium/drivers/ilo/ilo_screen.c
@@ -435,6 +435,15 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_TGSI_VS_LAYER:
return 0;
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 0;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 21;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 20;
+
default:
return 0;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 43142e7..604f853 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -236,6 +236,15 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return PIPE_ENDIAN_NATIVE;
case PIPE_CAP_TGSI_VS_LAYER:
return 0;
+
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 0;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 21;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 20;
}
/* should only get here on unhandled cases */
debug_printf("Unexpected PIPE_CAP %d query\n", param);
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index 9854708..abbc3b6 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -136,6 +136,16 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 1;
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_LITTLE;
+
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 0;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return (eng3d->oclass >= NV40_3D_CLASS) ? 21 : 15;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 20;
+
default:
debug_printf("unknown param %d\n", param);
return 0;
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index 781b391..5090b7f 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -199,6 +199,16 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 0;
case PIPE_CAP_MAX_VIEWPORTS:
return NV50_MAX_VIEWPORTS;
+
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 33;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 30;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 30;
+
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
return 0;
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index f04771d..b96dced 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -177,6 +177,16 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 0;
case PIPE_CAP_MAX_VIEWPORTS:
return 1;
+
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 33;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 30;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 30;
+
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
return 0;
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index fcb01e8..6be922e 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -196,6 +196,15 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_MAX_VIEWPORTS:
return 1;
+
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 0;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 21;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 20;
}
return 0;
}
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 0f75a53..02914b9 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -453,6 +453,15 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600;
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_LITTLE;
+
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 33;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 30;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 30;
}
return 0;
}
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index c64621b..4e6478c 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -332,6 +332,15 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
return 7;
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_LITTLE;
+
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 33;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 30;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 30;
}
return 0;
}
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 46ac519..3a6d31a 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -186,6 +186,15 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return PIPE_ENDIAN_NATIVE;
case PIPE_CAP_TGSI_VS_LAYER:
return 0;
+
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 0;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 21;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 20;
}
/* should only get here on unhandled cases */
debug_printf("Unexpected PIPE_CAP %d query\n", param);
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index d5ae69a..b20aa26 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -275,6 +275,15 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 1;
case PIPE_CAP_ENDIANNESS:
return PIPE_ENDIAN_LITTLE;
+
+ case PIPE_CAP_MAX_GL_CORE_VERSION:
+ return 0;
+ case PIPE_CAP_MAX_GL_COMPAT_VERSION:
+ return 21;
+ case PIPE_CAP_MAX_GL_ES1_VERSION:
+ return 11;
+ case PIPE_CAP_MAX_GL_ES2_VERSION:
+ return 20;
}
debug_printf("Unexpected PIPE_CAP_ query %u\n", param);
--
1.9.0
More information about the mesa-dev
mailing list