Kaydet (Commit) 372bef89 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Split driver version specification into a range

Change-Id: I1f26b47054e70e54ce81d3ec4cbc5ff58c1aeea3
üst 4554e71e
...@@ -1401,7 +1401,7 @@ ...@@ -1401,7 +1401,7 @@
<info> <info>
<desc>Like OpenCLWhiteList, but for combinations known to be bad.</desc> <desc>Like OpenCLWhiteList, but for combinations known to be bad.</desc>
</info> </info>
<value oor:separator=";">Windows/*/Intel(R) Corporation/*/9.17.10.2884;SuperOS/*/Big Corp, Inc./Whizz\Grafix/4.2%2Fbeta%3B3</value> <value oor:separator=";">Windows/*/Intel(R) Corporation/*/9.17.10.2884/;SuperOS/*/Big Corp, Inc./Whizz\Grafix/4.2%2Fbeta%3B3/4.4</value>
</prop> </prop>
</group> </group>
<group oor:name="Syntax"> <group oor:name="Syntax">
......
...@@ -47,7 +47,8 @@ struct SC_DLLPUBLIC ScCalcConfig ...@@ -47,7 +47,8 @@ struct SC_DLLPUBLIC ScCalcConfig
OUString maOSVersion; OUString maOSVersion;
OUString maPlatformVendor; OUString maPlatformVendor;
OUString maDevice; OUString maDevice;
OUString maDriverVersion; OUString maDriverVersionMin;
OUString maDriverVersionMax;
OpenCLImplMatcher() OpenCLImplMatcher()
{ {
...@@ -57,12 +58,14 @@ struct SC_DLLPUBLIC ScCalcConfig ...@@ -57,12 +58,14 @@ struct SC_DLLPUBLIC ScCalcConfig
const OUString& rOSVersion, const OUString& rOSVersion,
const OUString& rPlatformVendor, const OUString& rPlatformVendor,
const OUString& rDevice, const OUString& rDevice,
const OUString& rDriverVersion) const OUString& rDriverVersionMin,
const OUString& rDriverVersionMax)
: maOS(rOS), : maOS(rOS),
maOSVersion(rOSVersion), maOSVersion(rOSVersion),
maPlatformVendor(rPlatformVendor), maPlatformVendor(rPlatformVendor),
maDevice(rDevice), maDevice(rDevice),
maDriverVersion(rDriverVersion) maDriverVersionMin(rDriverVersionMin),
maDriverVersionMax(rDriverVersionMax)
{ {
} }
...@@ -72,7 +75,8 @@ struct SC_DLLPUBLIC ScCalcConfig ...@@ -72,7 +75,8 @@ struct SC_DLLPUBLIC ScCalcConfig
maOSVersion == r.maOSVersion && maOSVersion == r.maOSVersion &&
maPlatformVendor == r.maPlatformVendor && maPlatformVendor == r.maPlatformVendor &&
maDevice == r.maDevice && maDevice == r.maDevice &&
maDriverVersion == r.maDriverVersion; maDriverVersionMin == r.maDriverVersionMin &&
maDriverVersionMax == r.maDriverVersionMax;
} }
bool operator!=(const OpenCLImplMatcher& r) const bool operator!=(const OpenCLImplMatcher& r) const
{ {
...@@ -88,7 +92,9 @@ struct SC_DLLPUBLIC ScCalcConfig ...@@ -88,7 +92,9 @@ struct SC_DLLPUBLIC ScCalcConfig
(maPlatformVendor == r.maPlatformVendor && (maPlatformVendor == r.maPlatformVendor &&
(maDevice < r.maDevice || (maDevice < r.maDevice ||
(maDevice == r.maDevice && (maDevice == r.maDevice &&
(maDriverVersion < r.maDriverVersion))))))))); (maDriverVersionMin < r.maDriverVersionMin ||
(maDriverVersionMin == r.maDriverVersionMin &&
maDriverVersionMax < r.maDriverVersionMax))))))))));
} }
}; };
......
...@@ -44,8 +44,8 @@ void ScCalcConfig::setOpenCLConfigToDefault() ...@@ -44,8 +44,8 @@ void ScCalcConfig::setOpenCLConfigToDefault()
maOpenCLSubsetOpCodes.insert(ocSum); maOpenCLSubsetOpCodes.insert(ocSum);
maOpenCLSubsetOpCodes.insert(ocAverage); maOpenCLSubsetOpCodes.insert(ocAverage);
maOpenCLSubsetOpCodes.insert(ocSumIfs); maOpenCLSubsetOpCodes.insert(ocSumIfs);
maOpenCLBlackList.insert(OpenCLImplMatcher("Windows", "*", "Intel(R) Corporation", "*", "9.17.10.2884")); maOpenCLBlackList.insert(OpenCLImplMatcher("Windows", "*", "Intel(R) Corporation", "*", "9.17.10.2884", ""));
maOpenCLBlackList.insert(OpenCLImplMatcher("SuperOS", "*", "Big Corp, Inc.", "Whizz\\Grafix", "4.2/beta;3")); maOpenCLBlackList.insert(OpenCLImplMatcher("SuperOS", "*", "Big Corp, Inc.", "Whizz\\Grafix", "4.2/beta;3", "4.4"));
} }
void ScCalcConfig::reset() void ScCalcConfig::reset()
...@@ -89,7 +89,7 @@ std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig::OpenCLImplMa ...@@ -89,7 +89,7 @@ std::ostream& operator<<(std::ostream& rStream, const ScCalcConfig::OpenCLImplMa
"OSVersion=" << rImpl.maOSVersion << "," "OSVersion=" << rImpl.maOSVersion << ","
"PlatformVendor=" << rImpl.maPlatformVendor << "," "PlatformVendor=" << rImpl.maPlatformVendor << ","
"Device=" << rImpl.maDevice << "," "Device=" << rImpl.maDevice << ","
"DriverVersion=" << rImpl.maDriverVersion << "DriverVersion=[" << rImpl.maDriverVersionMin << "," << rImpl.maDriverVersionMax << "]"
"}"; "}";
return rStream; return rStream;
......
...@@ -292,7 +292,8 @@ css::uno::Sequence<OUString> SetOfOpenCLImplMatcherToStringSequence(std::set<ScC ...@@ -292,7 +292,8 @@ css::uno::Sequence<OUString> SetOfOpenCLImplMatcherToStringSequence(std::set<ScC
(*i).maOSVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" + (*i).maOSVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maPlatformVendor.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" + (*i).maPlatformVendor.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maDevice.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" + (*i).maDevice.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maDriverVersion.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B"); (*i).maDriverVersionMin.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B") + "/" +
(*i).maDriverVersionMax.replaceAll("%", "%25").replaceAll("/", "%2F").replaceAll(";", "%3B");
} }
return result; return result;
...@@ -335,7 +336,8 @@ std::set<ScCalcConfig::OpenCLImplMatcher> StringSequenceToSetOfOpenCLImplMatcher ...@@ -335,7 +336,8 @@ std::set<ScCalcConfig::OpenCLImplMatcher> StringSequenceToSetOfOpenCLImplMatcher
m.maOSVersion = getToken(*i, index); m.maOSVersion = getToken(*i, index);
m.maPlatformVendor = getToken(*i, index); m.maPlatformVendor = getToken(*i, index);
m.maDevice = getToken(*i, index); m.maDevice = getToken(*i, index);
m.maDriverVersion = getToken(*i, index); m.maDriverVersionMin = getToken(*i, index);
m.maDriverVersionMax = getToken(*i, index);
result.insert(m); result.insert(m);
} }
......
...@@ -149,7 +149,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi ...@@ -149,7 +149,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
get(mpOSVersion, "osversion"); get(mpOSVersion, "osversion");
get(mpPlatformVendor, "platformvendor"); get(mpPlatformVendor, "platformvendor");
get(mpDevice, "opencldevice"); get(mpDevice, "opencldevice");
get(mpDriverVersion, "opencldriverversion"); get(mpDriverVersionMin, "opencldriverversionmin");
get(mpDriverVersionMax, "opencldriverversionmax");
get(mpListEditButton, "listbox-edit"); get(mpListEditButton, "listbox-edit");
get(mpListNewButton, "listbox-new"); get(mpListNewButton, "listbox-new");
get(mpListDeleteButton, "listbox-delete"); get(mpListDeleteButton, "listbox-delete");
...@@ -166,7 +167,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi ...@@ -166,7 +167,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
mpOSVersion->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl)); mpOSVersion->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpPlatformVendor->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl)); mpPlatformVendor->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpDevice->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl)); mpDevice->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpDriverVersion->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl)); mpDriverVersionMin->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpDriverVersionMax->SetModifyHdl(LINK(this, ScCalcOptionsDialog, EditModifiedHdl));
mpOpenCLWhiteAndBlackListBox->set_height_request(4* mpOpenCLWhiteAndBlackListBox->GetTextHeight()); mpOpenCLWhiteAndBlackListBox->set_height_request(4* mpOpenCLWhiteAndBlackListBox->GetTextHeight());
mpOpenCLWhiteAndBlackListBox->SetStyle(mpOpenCLWhiteAndBlackListBox->GetStyle() | WB_CLIPCHILDREN | WB_FORCE_MAKEVISIBLE); mpOpenCLWhiteAndBlackListBox->SetStyle(mpOpenCLWhiteAndBlackListBox->GetStyle() | WB_CLIPCHILDREN | WB_FORCE_MAKEVISIBLE);
...@@ -314,7 +316,10 @@ OUString format(const ScCalcConfig::OpenCLImplMatcher& rImpl) ...@@ -314,7 +316,10 @@ OUString format(const ScCalcConfig::OpenCLImplMatcher& rImpl)
rImpl.maOSVersion + " " + rImpl.maOSVersion + " " +
rImpl.maPlatformVendor + " " + rImpl.maPlatformVendor + " " +
rImpl.maDevice + " " + rImpl.maDevice + " " +
rImpl.maDriverVersion); (rImpl.maDriverVersionMax != "" ?
OUString("[") + rImpl.maDriverVersionMin + "," + rImpl.maDriverVersionMax + "]" :
rImpl.maDriverVersionMin)
);
} }
void fillListBox(ListBox* pListBox, const ScCalcConfig::OpenCLImplMatcherSet& rSet) void fillListBox(ListBox* pListBox, const ScCalcConfig::OpenCLImplMatcherSet& rSet)
...@@ -794,9 +799,13 @@ void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl) ...@@ -794,9 +799,13 @@ void ScCalcOptionsDialog::EditFieldValueChanged(Control *pCtrl)
{ {
newImpl.maDevice = sVal; newImpl.maDevice = sVal;
} }
else if (pEdit == mpDriverVersion) else if (pEdit == mpDriverVersionMin)
{ {
newImpl.maDriverVersion = sVal; newImpl.maDriverVersionMin = sVal;
}
else if (pEdit == mpDriverVersionMax)
{
newImpl.maDriverVersionMax = sVal;
} }
else else
assert(false && "pEdit does not match any of the Edit fields"); assert(false && "pEdit does not match any of the Edit fields");
...@@ -905,7 +914,8 @@ IMPL_LINK(ScCalcOptionsDialog, OpenCLWhiteAndBlackListSelHdl, Control*, ) ...@@ -905,7 +914,8 @@ IMPL_LINK(ScCalcOptionsDialog, OpenCLWhiteAndBlackListSelHdl, Control*, )
mpOSVersion->SetText(impl.maOSVersion); mpOSVersion->SetText(impl.maOSVersion);
mpPlatformVendor->SetText(impl.maPlatformVendor); mpPlatformVendor->SetText(impl.maPlatformVendor);
mpDevice->SetText(impl.maDevice); mpDevice->SetText(impl.maDevice);
mpDriverVersion->SetText(impl.maDriverVersion); mpDriverVersionMin->SetText(impl.maDriverVersionMin);
mpDriverVersionMax->SetText(impl.maDriverVersionMax);
return 0; return 0;
} }
......
...@@ -80,7 +80,8 @@ private: ...@@ -80,7 +80,8 @@ private:
Edit* mpOSVersion; Edit* mpOSVersion;
Edit* mpPlatformVendor; Edit* mpPlatformVendor;
Edit* mpDevice; Edit* mpDevice;
Edit* mpDriverVersion; Edit* mpDriverVersionMin;
Edit* mpDriverVersionMax;
PushButton* mpListEditButton; PushButton* mpListEditButton;
PushButton* mpListNewButton; PushButton* mpListNewButton;
PushButton* mpListDeleteButton; PushButton* mpListDeleteButton;
......
...@@ -214,8 +214,7 @@ ...@@ -214,8 +214,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="label" translatable="yes">_OS</property> <property name="label" translatable="yes">OS</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">os:border</property> <property name="mnemonic_widget">os:border</property>
</object> </object>
<packing> <packing>
...@@ -238,8 +237,7 @@ ...@@ -238,8 +237,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="label" translatable="yes">OS _Version</property> <property name="label" translatable="yes">OS Version</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">osversion:border</property> <property name="mnemonic_widget">osversion:border</property>
</object> </object>
<packing> <packing>
...@@ -263,7 +261,6 @@ ...@@ -263,7 +261,6 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Platform Vendor</property> <property name="label" translatable="yes">OpenCL Platform Vendor</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">openclvendor:border</property> <property name="mnemonic_widget">openclvendor:border</property>
</object> </object>
<packing> <packing>
...@@ -287,7 +284,6 @@ ...@@ -287,7 +284,6 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Device</property> <property name="label" translatable="yes">OpenCL Device</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">opencldevice:border</property> <property name="mnemonic_widget">opencldevice:border</property>
</object> </object>
<packing> <packing>
...@@ -306,13 +302,12 @@ ...@@ -306,13 +302,12 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel" id="opencldriverversionlabel"> <object class="GtkLabel" id="opencldriverversionminlabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Driver Version</property> <property name="label" translatable="yes">OpenCL Driver Version Lower Bound</property>
<property name="use_underline">True</property> <property name="mnemonic_widget">opencldriverversionmin:border</property>
<property name="mnemonic_widget">opencldriverversion:border</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -320,7 +315,7 @@ ...@@ -320,7 +315,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry" id="opencldriverversion:border"> <object class="GtkEntry" id="opencldriverversionmin:border">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
</object> </object>
...@@ -329,6 +324,29 @@ ...@@ -329,6 +324,29 @@
<property name="top_attach">9</property> <property name="top_attach">9</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="opencldriverversionmaxlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">OpenCL Driver Version Upper Bound</property>
<property name="mnemonic_widget">opencldriverversionmax:border</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">10</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="opencldriverversionmax:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">11</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment