Re: [Mesa-dev] [PATCH 02/71] target/d3dadapter9: Return Windows like card names

2015-08-22 Thread Benjamin Bellec
Don't hold your commit because of me. I haven't the skills to review this
code. I just saw this mapping and asking myself about it. It can be be
modified later if needed in any case.

2015-08-21 22:09 GMT+02:00 Axel Davy axel.d...@ens.fr:

 As far as I know, the mapping is not an official one.

 Games usually do not use the card name to apply
 card specific workarounds, instead they use the vendor
 or the device id.

 However the names are sometimes used in configuration files
 to match the user set configuration to a card (and reset if the
 card is changed).

 In general in game settings you will see the name advertised.

 Some apps may even have other usages of the names.

 Besides advertising the Windows like names, we want add in the future
 an easy way to change the card advertised. For example to advertise older
 card
 of your vendor, or advertise another vendor (some games do disable
 some features for some cards).

 Yours,

 Axel Davy

 On 17/08/2015 19:30, Benjamin Bellec write :

 Hello,

 Where does this mapping list come from ? Is this an official map (Vendor
 or Windows drivers) ? Is that used just for information ?
 Because many of them are not really precise, if not completely wrong at
 all (eg. the Radeon R400/R500 series names).

 Regards.

 --
 Benjamin




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


Re: [Mesa-dev] [PATCH 02/71] target/d3dadapter9: Return Windows like card names

2015-08-21 Thread Axel Davy

As far as I know, the mapping is not an official one.

Games usually do not use the card name to apply
card specific workarounds, instead they use the vendor
or the device id.

However the names are sometimes used in configuration files
to match the user set configuration to a card (and reset if the
card is changed).

In general in game settings you will see the name advertised.

Some apps may even have other usages of the names.

Besides advertising the Windows like names, we want add in the future
an easy way to change the card advertised. For example to advertise 
older card

of your vendor, or advertise another vendor (some games do disable
some features for some cards).

Yours,

Axel Davy

On 17/08/2015 19:30, Benjamin Bellec write :

Hello,

Where does this mapping list come from ? Is this an official map 
(Vendor or Windows drivers) ? Is that used just for information ?
Because many of them are not really precise, if not completely wrong 
at all (eg. the Radeon R400/R500 series names).


Regards.

--
Benjamin




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


Re: [Mesa-dev] [PATCH 02/71] target/d3dadapter9: Return Windows like card names

2015-08-17 Thread Benjamin Bellec
Hello,

Where does this mapping list come from ? Is this an official map (Vendor or
Windows drivers) ? Is that used just for information ?
Because many of them are not really precise, if not completely wrong at all
(eg. the Radeon R400/R500 series names).

Regards.

--
Benjamin

2015-08-16 17:27 GMT+02:00 Axel Davy axel.d...@ens.fr:

 From: Patrick Rudolph s...@das-labor.org

 Add support for multiple cards and fill in Windows like card name, driver
 name and version info.
 Use fallback for unknown vendors and unknown card names.

 Reviewed-by: Axel Davy axel.d...@ens.fr
 Signed-off-by: Patrick Rudolph s...@das-labor.org
 ---
  src/gallium/targets/d3dadapter9/Makefile.am   |   1 +
  src/gallium/targets/d3dadapter9/description.c | 324
 ++
  src/gallium/targets/d3dadapter9/drm.c |  76 +++---
  3 files changed, 359 insertions(+), 42 deletions(-)
  create mode 100644 src/gallium/targets/d3dadapter9/description.c

 diff --git a/src/gallium/targets/d3dadapter9/Makefile.am
 b/src/gallium/targets/d3dadapter9/Makefile.am
 index fe5b0b1..e26ca33 100644
 --- a/src/gallium/targets/d3dadapter9/Makefile.am
 +++ b/src/gallium/targets/d3dadapter9/Makefile.am
 @@ -54,6 +54,7 @@ pkgconfigdir = $(libdir)/pkgconfig
  pkgconfig_DATA = d3d.pc

  d3dadapter9_la_SOURCES = \
 +   description.c \
 getproc.c \
 drm.c

 diff --git a/src/gallium/targets/d3dadapter9/description.c
 b/src/gallium/targets/d3dadapter9/description.c
 new file mode 100644
 index 000..c0a8678
 --- /dev/null
 +++ b/src/gallium/targets/d3dadapter9/description.c
 @@ -0,0 +1,324 @@
 +/*
 + * Copyright 2015 Patrick Rudolph s...@das-labor.org
 + *
 + * Permission is hereby granted, free of charge, to any person obtaining a
 + * copy of this software and associated documentation files (the
 Software),
 + * to deal in the Software without restriction, including without
 limitation
 + * on the rights to use, copy, modify, merge, publish, distribute, sub
 + * license, and/or sell copies of the Software, and to permit persons to
 whom
 + * the Software is furnished to do so, subject to the following
 conditions:
 + *
 + * The above copyright notice and this permission notice (including the
 next
 + * paragraph) shall be included in all copies or substantial portions of
 the
 + * Software.
 + *
 + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
 EXPRESS OR
 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 MERCHANTABILITY,
 + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT
 SHALL
 + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
 + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
 THE
 + * USE OR OTHER DEALINGS IN THE SOFTWARE. */
 +
 +#include string.h
 +#include adapter9.h
 +
 +#define DBG_CHANNEL DBG_ADAPTER
 +
 +/* prototypes */
 +void
 +d3d_match_vendor_id( D3DADAPTER_IDENTIFIER9* drvid,
 +unsigned fallback_ven,
 +unsigned fallback_dev,
 +const char* fallback_name );
 +void d3d_fill_driver_version(D3DADAPTER_IDENTIFIER9* drvid);
 +void d3d_fill_cardname(D3DADAPTER_IDENTIFIER9* drvid);
 +
 +enum d3d_vendor_id
 +{
 +HW_VENDOR_SOFTWARE  = 0x,
 +HW_VENDOR_AMD   = 0x1002,
 +HW_VENDOR_NVIDIA= 0x10de,
 +HW_VENDOR_VMWARE= 0x15ad,
 +HW_VENDOR_INTEL = 0x8086,
 +};
 +
 +struct card_lookup_table {
 +const char *mesaname;
 +const char *d3d9name;
 +}
 +cards_amd[] = {
 +{HAWAII,  AMD Radeon R9 290},
 +{KAVERI,  AMD Radeon(TM) R7 Graphics},
 +{KABINI,  AMD Radeon HD 8400 / R3 Series},
 +{BONAIRE, AMD Radeon HD 8770},
 +{OLAND,   AMD Radeon HD 8670},
 +{HAINAN,  AMD Radeon HD 8600M Series},
 +{TAHITI,  AMD Radeon HD 7900 Series},
 +{PITCAIRN,AMD Radeon HD 7800 Series},
 +{CAPE VERDE,  AMD Radeon HD 7700 Series},
 +{ARUBA,   AMD Radeon HD 7660D},
 +{CAYMAN,  AMD Radeon HD 6900 Series},
 +{BARTS,   AMD Radeon HD 6800 Series},
 +{TURKS,   AMD Radeon HD 6600 Series},
 +{SUMO2,   AMD Radeon HD 6410D},
 +{SUMO,AMD Radeon HD 6550D},
 +{CAICOS,  AMD Radeon HD 6400 Series},
 +{PALM,AMD Radeon HD 6300 series Graphics},
 +{HEMLOCK, ATI Radeon HD 5900 Series},
 +{CYPRESS, ATI Radeon HD 5800 Series},
 +{JUNIPER, ATI Radeon HD 5700 Series},
 +{REDWOOD, ATI Radeon HD 5600 Series},
 +{CEDAR,   ATI Radeon HD 5500 Series},
 +

[Mesa-dev] [PATCH 02/71] target/d3dadapter9: Return Windows like card names

2015-08-16 Thread Axel Davy
From: Patrick Rudolph s...@das-labor.org

Add support for multiple cards and fill in Windows like card name, driver name 
and version info.
Use fallback for unknown vendors and unknown card names.

Reviewed-by: Axel Davy axel.d...@ens.fr
Signed-off-by: Patrick Rudolph s...@das-labor.org
---
 src/gallium/targets/d3dadapter9/Makefile.am   |   1 +
 src/gallium/targets/d3dadapter9/description.c | 324 ++
 src/gallium/targets/d3dadapter9/drm.c |  76 +++---
 3 files changed, 359 insertions(+), 42 deletions(-)
 create mode 100644 src/gallium/targets/d3dadapter9/description.c

diff --git a/src/gallium/targets/d3dadapter9/Makefile.am 
b/src/gallium/targets/d3dadapter9/Makefile.am
index fe5b0b1..e26ca33 100644
--- a/src/gallium/targets/d3dadapter9/Makefile.am
+++ b/src/gallium/targets/d3dadapter9/Makefile.am
@@ -54,6 +54,7 @@ pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = d3d.pc
 
 d3dadapter9_la_SOURCES = \
+   description.c \
getproc.c \
drm.c
 
diff --git a/src/gallium/targets/d3dadapter9/description.c 
b/src/gallium/targets/d3dadapter9/description.c
new file mode 100644
index 000..c0a8678
--- /dev/null
+++ b/src/gallium/targets/d3dadapter9/description.c
@@ -0,0 +1,324 @@
+/*
+ * Copyright 2015 Patrick Rudolph s...@das-labor.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the Software),
+ * to deal in the Software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+#include string.h
+#include adapter9.h
+
+#define DBG_CHANNEL DBG_ADAPTER
+
+/* prototypes */
+void
+d3d_match_vendor_id( D3DADAPTER_IDENTIFIER9* drvid,
+unsigned fallback_ven,
+unsigned fallback_dev,
+const char* fallback_name );
+void d3d_fill_driver_version(D3DADAPTER_IDENTIFIER9* drvid);
+void d3d_fill_cardname(D3DADAPTER_IDENTIFIER9* drvid);
+
+enum d3d_vendor_id
+{
+HW_VENDOR_SOFTWARE  = 0x,
+HW_VENDOR_AMD   = 0x1002,
+HW_VENDOR_NVIDIA= 0x10de,
+HW_VENDOR_VMWARE= 0x15ad,
+HW_VENDOR_INTEL = 0x8086,
+};
+
+struct card_lookup_table {
+const char *mesaname;
+const char *d3d9name;
+}
+cards_amd[] = {
+{HAWAII,  AMD Radeon R9 290},
+{KAVERI,  AMD Radeon(TM) R7 Graphics},
+{KABINI,  AMD Radeon HD 8400 / R3 Series},
+{BONAIRE, AMD Radeon HD 8770},
+{OLAND,   AMD Radeon HD 8670},
+{HAINAN,  AMD Radeon HD 8600M Series},
+{TAHITI,  AMD Radeon HD 7900 Series},
+{PITCAIRN,AMD Radeon HD 7800 Series},
+{CAPE VERDE,  AMD Radeon HD 7700 Series},
+{ARUBA,   AMD Radeon HD 7660D},
+{CAYMAN,  AMD Radeon HD 6900 Series},
+{BARTS,   AMD Radeon HD 6800 Series},
+{TURKS,   AMD Radeon HD 6600 Series},
+{SUMO2,   AMD Radeon HD 6410D},
+{SUMO,AMD Radeon HD 6550D},
+{CAICOS,  AMD Radeon HD 6400 Series},
+{PALM,AMD Radeon HD 6300 series Graphics},
+{HEMLOCK, ATI Radeon HD 5900 Series},
+{CYPRESS, ATI Radeon HD 5800 Series},
+{JUNIPER, ATI Radeon HD 5700 Series},
+{REDWOOD, ATI Radeon HD 5600 Series},
+{CEDAR,   ATI Radeon HD 5500 Series},
+{R700,ATI Radeon HD 4800 Series},
+{RV790,   ATI Radeon HD 4800 Series},
+{RV770,   ATI Radeon HD 4800 Series},
+{RV740,   ATI Radeon HD 4700 Series},
+{RV730,   ATI Radeon HD 4600 Series},
+{RV710,   ATI Radeon HD 4350},
+{RS880,   ATI Mobility Radeon HD 4200},
+{RS780,