Re: [Mesa-dev] [PATCH] intel: Change vendor string to Intel(R) Open Source Technology Center.

2012-06-01 Thread Eirik Byrkjeflot Anonsen
Kenneth Graunke kenn...@whitecape.org writes:

 On 05/31/2012 04:28 PM, Roland Mainz wrote:
 On Fri, Jun 1, 2012 at 1:19 AM, Kenneth Graunkekenn...@whitecape.org  
 wrote:
 switch (name) {
 case GL_VENDOR:
 -  return (GLubyte *) Tungsten Graphics, Inc;
 +  return (GLubyte *) Intel® Open Source Technology Center;
break;

 Uhm... isn't ® a character outside the ASCII range ? Some compiles
 might choke on this, i.e. the Sun Workshop/Forte/Studio compilers
 require -xcsi (... This option allows the C compiler to accept source
 code written in locales that do not conform to the ISO C source
 character code requirements. These locales include ja_JP.PCK ...) to
 avoid occasional hiccups.

 I'm happy to change it if it's an issue, but I believe that the ®
 character already appears in the source code:

   case PCI_CHIP_GM45_GM:
  chipset = Mobile Intel® GM45 Express Chipset;
  break;

I believe the C89 specification disallows the use of characters outside
the basic character set in the source file.  The basic character set
is a subset of the characters representable by ASCII.  Or alternatively,
that it leaves the effect implementation-defined or maybe even
undefined.  But I don't have the C89 specification lying around to
check.

I expect many compilers will accept such characters, and interpret them
according to the current locale.  So what character you end up with
depends on which locale you compile in, or which locale you run the
application in.  This may lead some compilers to generate warnings about
this situation.

C++03 allows those characters, but their interpretation is
implementation-defined.  C++03 supports the construct '\u00a9', which
represents the unicode character U+00A9.  I doubt C89 does the same.

For string literals the '\xa9' construct can be used, but its
interpretation is also implementation-defined (at least as far as
which character it represents, given that the execution character set is
implementation-defined).  And keep in mind that '\xa9' must not be
followed by a hexadecimal digit.

 and it definitely appears in comments.

That's less of an issue, since the compiler is quite likely to just
ignore those.

eirik
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] intel: Change vendor string to Intel(R) Open Source Technology Center.

2012-06-01 Thread Eugeni Dodonov
On Thu, May 31, 2012 at 8:19 PM, Kenneth Graunke kenn...@whitecape.orgwrote:

 Tungsten Graphics has not existed for several years, and the majority of
 ongoing development and support is done by Intel.  I chose to include
 Open Source Technology Center to distinguish it from, say, the closed
 source Windows OpenGL driver.

 The one downside to this patch is that applications that pattern match
 against Intel may start applying workarounds meant for the Windows
 driver.  However, it does seem like the right thing to do.

 This does change oglconform behavior.

 Acked-by: Eric Anholt e...@anholt.net
 Acked-by: Ian Romanick ian.d.roman...@intel.com
 Cc: Eugeni Dodonov eug...@dodonov.net
 Signed-off-by: Kenneth Graunke kenn...@whitecape.org


Acked-by: Eugeni Dodonov eugeni.dodo...@intel.com

Just to confirm my thoughts - this change would go in the 8.1 release as
the earliest, correct?

-- 
Eugeni Dodonov
http://eugeni.dodonov.net/
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] intel: Change vendor string to Intel(R) Open Source Technology Center.

2012-06-01 Thread Kenneth Graunke
On 06/01/2012 07:10 AM, Eugeni Dodonov wrote:
 On Thu, May 31, 2012 at 8:19 PM, Kenneth Graunke kenn...@whitecape.org
 mailto:kenn...@whitecape.org wrote:
 
 Tungsten Graphics has not existed for several years, and the majority of
 ongoing development and support is done by Intel.  I chose to include
 Open Source Technology Center to distinguish it from, say, the closed
 source Windows OpenGL driver.
 
 The one downside to this patch is that applications that pattern match
 against Intel may start applying workarounds meant for the Windows
 driver.  However, it does seem like the right thing to do.
 
 This does change oglconform behavior.
 
 Acked-by: Eric Anholt e...@anholt.net mailto:e...@anholt.net
 Acked-by: Ian Romanick ian.d.roman...@intel.com
 mailto:ian.d.roman...@intel.com
 Cc: Eugeni Dodonov eug...@dodonov.net mailto:eug...@dodonov.net
 Signed-off-by: Kenneth Graunke kenn...@whitecape.org
 mailto:kenn...@whitecape.org
 
 
 Acked-by: Eugeni Dodonov eugeni.dodo...@intel.com
 mailto:eugeni.dodo...@intel.com
 
 Just to confirm my thoughts - this change would go in the 8.1 release as
 the earliest, correct?

Yes, of course.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] intel: Change vendor string to Intel(R) Open Source Technology Center.

2012-05-31 Thread Roland Mainz
On Fri, Jun 1, 2012 at 1:19 AM, Kenneth Graunke kenn...@whitecape.org wrote:
 Tungsten Graphics has not existed for several years, and the majority of
 ongoing development and support is done by Intel.  I chose to include
 Open Source Technology Center to distinguish it from, say, the closed
 source Windows OpenGL driver.

 The one downside to this patch is that applications that pattern match
 against Intel may start applying workarounds meant for the Windows
 driver.  However, it does seem like the right thing to do.

 This does change oglconform behavior.

 Acked-by: Eric Anholt e...@anholt.net
 Acked-by: Ian Romanick ian.d.roman...@intel.com
 Cc: Eugeni Dodonov eug...@dodonov.net
 Signed-off-by: Kenneth Graunke kenn...@whitecape.org
 ---
  src/mesa/drivers/dri/intel/intel_context.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/src/mesa/drivers/dri/intel/intel_context.c 
 b/src/mesa/drivers/dri/intel/intel_context.c
 index 9deb4ca..712acb8 100644
 --- a/src/mesa/drivers/dri/intel/intel_context.c
 +++ b/src/mesa/drivers/dri/intel/intel_context.c
 @@ -72,7 +72,7 @@ intelGetString(struct gl_context * ctx, GLenum name)

    switch (name) {
    case GL_VENDOR:
 -      return (GLubyte *) Tungsten Graphics, Inc;
 +      return (GLubyte *) Intel® Open Source Technology Center;
       break;

Uhm... isn't ® a character outside the ASCII range ? Some compiles
might choke on this, i.e. the Sun Workshop/Forte/Studio compilers
require -xcsi (... This option allows the C compiler to accept source
code written in locales that do not conform to the ISO C source
character code requirements. These locales include ja_JP.PCK ...) to
avoid occasional hiccups.



Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, CJAVASunUnix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] intel: Change vendor string to Intel(R) Open Source Technology Center.

2012-05-31 Thread Alan Coopersmith
On 05/31/12 04:28 PM, Roland Mainz wrote:
 On Fri, Jun 1, 2012 at 1:19 AM, Kenneth Graunke kenn...@whitecape.org wrote:
switch (name) {
case GL_VENDOR:
 -  return (GLubyte *) Tungsten Graphics, Inc;
 +  return (GLubyte *) Intel® Open Source Technology Center;
   break;
 
 Uhm... isn't ® a character outside the ASCII range ? Some compiles
 might choke on this, i.e. the Sun Workshop/Forte/Studio compilers
 require -xcsi (... This option allows the C compiler to accept source
 code written in locales that do not conform to the ISO C source
 character code requirements. These locales include ja_JP.PCK ...) to
 avoid occasional hiccups.

I don't remember having any problems with the Studio compilers using UTF-8
characters, but they do break down if you use other encodings that appear
to cause invalid UTF-8 sequences.

-- 
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] intel: Change vendor string to Intel(R) Open Source Technology Center.

2012-05-31 Thread Roland Mainz
On Fri, Jun 1, 2012 at 1:34 AM, Alan Coopersmith
alan.coopersm...@oracle.com wrote:
 On 05/31/12 04:28 PM, Roland Mainz wrote:
 On Fri, Jun 1, 2012 at 1:19 AM, Kenneth Graunke kenn...@whitecape.org 
 wrote:
    switch (name) {
    case GL_VENDOR:
 -      return (GLubyte *) Tungsten Graphics, Inc;
 +      return (GLubyte *) Intel® Open Source Technology Center;
       break;

 Uhm... isn't ® a character outside the ASCII range ? Some compiles
 might choke on this, i.e. the Sun Workshop/Forte/Studio compilers
 require -xcsi (... This option allows the C compiler to accept source
 code written in locales that do not conform to the ISO C source
 character code requirements. These locales include ja_JP.PCK ...) to
 avoid occasional hiccups.

 I don't remember having any problems with the Studio compilers using UTF-8
 characters,

Technically they shouldn't... but I still remember being chased around
(oh... yes... I lively remember *THAT* ... *shudder* ... the teeth...
these horrible t...[1]) by Sun's ON gatekeeper for causing the
occasional one in 100 random build failures until we figured out that
we need to add -xcsi (see
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/Makefile.ast#73).

[1]=Yes, yes... I'm joking a bit... :-)

 but they do break down if you use other encodings that appear
 to cause invalid UTF-8 sequences.

s/invalid UTF-8 sequence/invalid multibyte sequences/

The code works as long you either use the C, POSIX or an
UTF-8-based locale but any other encoding scheme (like GB18030) will
likely cause a build failure.



Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, CJAVASunUnix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] intel: Change vendor string to Intel(R) Open Source Technology Center.

2012-05-31 Thread Kenneth Graunke

On 05/31/2012 04:28 PM, Roland Mainz wrote:

On Fri, Jun 1, 2012 at 1:19 AM, Kenneth Graunkekenn...@whitecape.org  wrote:

Tungsten Graphics has not existed for several years, and the majority of
ongoing development and support is done by Intel.  I chose to include
Open Source Technology Center to distinguish it from, say, the closed
source Windows OpenGL driver.

The one downside to this patch is that applications that pattern match
against Intel may start applying workarounds meant for the Windows
driver.  However, it does seem like the right thing to do.

This does change oglconform behavior.

Acked-by: Eric Anholte...@anholt.net
Acked-by: Ian Romanickian.d.roman...@intel.com
Cc: Eugeni Dodonoveug...@dodonov.net
Signed-off-by: Kenneth Graunkekenn...@whitecape.org
---
  src/mesa/drivers/dri/intel/intel_context.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c 
b/src/mesa/drivers/dri/intel/intel_context.c
index 9deb4ca..712acb8 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -72,7 +72,7 @@ intelGetString(struct gl_context * ctx, GLenum name)

switch (name) {
case GL_VENDOR:
-  return (GLubyte *) Tungsten Graphics, Inc;
+  return (GLubyte *) Intel® Open Source Technology Center;
   break;


Uhm... isn't ® a character outside the ASCII range ? Some compiles
might choke on this, i.e. the Sun Workshop/Forte/Studio compilers
require -xcsi (... This option allows the C compiler to accept source
code written in locales that do not conform to the ISO C source
character code requirements. These locales include ja_JP.PCK ...) to
avoid occasional hiccups.


I'm happy to change it if it's an issue, but I believe that the ® 
character already appears in the source code:


  case PCI_CHIP_GM45_GM:
 chipset = Mobile Intel® GM45 Express Chipset;
 break;

and it definitely appears in comments.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev