Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

little changes on AF value behavior. #754

Merged
merged 2 commits into from Aug 21, 2015
Merged

Conversation

ssakash
Copy link
Member

@ssakash ssakash commented Aug 9, 2015

No description provided.

@turtleli
Copy link
Member

AF commit means you can't turn off AF in the GUI for Linux.

@ssakash
Copy link
Member Author

ssakash commented Aug 11, 2015

@turtleli
AF doesn't have a checkbox for linux ? either way, since the majority of people vote for removing checkbox instead of additional drop down list option I'll be doing that.

@turtleli
Copy link
Member

It doesn't.

@ssakash ssakash force-pushed the patch-45 branch 2 times, most recently from 74c208f to 09aa623 Compare August 11, 2015 16:45
@gregory38
Copy link
Contributor

of course you need to replace all uses of the useless checkbox value. Here a quick list.

./GSTextureFX9.cpp:         ss->Anisotropic[0] = !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0) ? D3DTEXF_ANISOTROPIC : D3DTEXF_LINEAR;
./GSTextureFX9.cpp:         ss->Anisotropic[1] = !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0) ? D3DTEXF_ANISOTROPIC : D3DTEXF_POINT;
./GSDevice9.cpp:D3DTEXTUREFILTERTYPE LinearToAnisotropic = !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0) ? D3DTEXF_ANISOTROPIC : D3DTEXF_LINEAR;
./GSDevice9.cpp:D3DTEXTUREFILTERTYPE PointToAnisotropic = !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0) ? D3DTEXF_ANISOTROPIC : D3DTEXF_POINT;
./GSDeviceOGL.cpp:  if (GLLoader::found_GL_EXT_texture_filter_anisotropic && !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0)) {
./GSLinuxDialog.cpp:    theApp.SetConfig("AnisotropicFiltering", 1);
./GSTextureFX11.cpp:    sd.Filter = !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0) ? D3D11_FILTER_ANISOTROPIC : D3D11_FILTER_MIN_MAG_MIP_POINT;
./GSTextureFX11.cpp:            af.Filter = !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0) ? D3D11_FILTER_ANISOTROPIC : D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT;
./GSDevice11.cpp:   sd.Filter = sd.Filter = !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0) ? D3D11_FILTER_ANISOTROPIC : D3D11_FILTER_MIN_MAG_MIP_LINEAR;
./GSDevice11.cpp:   sd.Filter = !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0) ? D3D11_FILTER_ANISOTROPIC : D3D11_FILTER_MIN_MAG_MIP_POINT;
./GSSettingsDlg.cpp:    CheckDlgButton(m_hWnd, IDC_ANISOTROPIC, theApp.GetConfig("AnisotropicFiltering", 0));
./GSSettingsDlg.cpp:            theApp.SetConfig("AnisotropicFiltering", (int)IsDlgButtonChecked(m_hWnd, IDC_ANISOTROPIC));

Code need to depends on MaxAnisotropy instead. Jobs will be done if AnisotropicFiltering dissapears completely.

@ssakash ssakash force-pushed the patch-45 branch 2 times, most recently from e2735d2 to 75b7d72 Compare August 13, 2015 04:30
@ssakash
Copy link
Member Author

ssakash commented Aug 13, 2015

done 👍 , please refer to the commit messages for information.

@@ -307,7 +307,7 @@ bool GSDevice11::Create(GSWnd* wnd)

memset(&sd, 0, sizeof(sd));

sd.Filter = sd.Filter = !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0) ? D3D11_FILTER_ANISOTROPIC : D3D11_FILTER_MIN_MAG_MIP_LINEAR;
sd.Filter = sd.Filter = theApp.GetConfig("MaxAnisotropy", 1)!=1 && !theApp.GetConfig("paltex", 0) ? D3D11_FILTER_ANISOTROPIC : D3D11_FILTER_MIN_MAG_MIP_LINEAR;

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@turtleli
Copy link
Member

Oh. Browser didn't refresh, didn't see @gregory38 replied. Sounds goods to me.

@ssakash ssakash force-pushed the patch-45 branch 2 times, most recently from cfef381 to 6bd9b20 Compare August 13, 2015 09:23
@ssakash
Copy link
Member Author

ssakash commented Aug 13, 2015

Updated with m_gs_max_anisotropy.push_back(GSSetting(0, "Off", "")); as the option for disabling AF in the drop down list and all those other requested stuffs.

@turtleli
Copy link
Member

You didn't compile/test your changes. And don't add trailing whitespace.

@ssakash
Copy link
Member Author

ssakash commented Aug 13, 2015

nope, I haven't finished it yet. still need to add a commit for reusing the GSDX API functions instead of string duplication for crc hack level. I'll test the changes after finalizing stuffs.

@turtleli
Copy link
Member

I've done the CRC in one of my branches. So don't bother doing that.

@ssakash
Copy link
Member Author

ssakash commented Aug 13, 2015

@turtleli
Thanks, then my PR is complete. :)

PR tested and works as intended with the changes. 👍

@@ -572,9 +572,10 @@ GLuint GSDeviceOGL::CreateSampler(bool bilinear, bool tau, bool tav)
gl_SamplerParameterf(sampler, GL_TEXTURE_MIN_LOD, 0);
gl_SamplerParameterf(sampler, GL_TEXTURE_MAX_LOD, 6);

if (GLLoader::found_GL_EXT_texture_filter_anisotropic && !!theApp.GetConfig("AnisotropicFiltering", 0) && !theApp.GetConfig("paltex", 0)) {
if (GLLoader::found_GL_EXT_texture_filter_anisotropic && (int)theApp.GetConfig("MaxAnisotropy", 0)>1 && !theApp.GetConfig("paltex", 0))

This comment was marked as spam.

@ssakash ssakash force-pushed the patch-45 branch 4 times, most recently from 1ab0b4c to 0cce918 Compare August 17, 2015 16:12
@ssakash
Copy link
Member Author

ssakash commented Aug 20, 2015

@turtleli
fixed those blank lines and I think I Indented it a little better, please take a look.

@turtleli
Copy link
Member

GSDevice9.cpp and GSDeviceOGL.cpp have a mix of tabs and spaces for indentation. Use only tabs.
GSDeviceOGL.cpp has trailing whitespace on the blank lines.

@ssakash
Copy link
Member Author

ssakash commented Aug 20, 2015

Fixed the indentation and trailing whitespaces on GSDevceOGL.cpp , I don't see any issues of indentation on GSDevice9.cpp. (if there are any issues, please highlight them on the code).

@@ -304,6 +301,8 @@ bool GSDevice9::Create(GSWnd* wnd)

m_convert.bs.BlendEnable = false;
m_convert.bs.RenderTargetWriteMask = D3DCOLORWRITEENABLE_RGBA;
D3DTEXTUREFILTERTYPE LinearToAnisotropic = theApp.GetConfig("MaxAnisotropy", 0) && !theApp.GetConfig("paltex", 0) ? D3DTEXF_ANISOTROPIC : D3DTEXF_LINEAR;
D3DTEXTUREFILTERTYPE PointToAnisotropic = theApp.GetConfig("MaxAnisotropy", 0) && !theApp.GetConfig("paltex", 0) ? D3DTEXF_ANISOTROPIC : D3DTEXF_POINT;

This comment was marked as spam.

This comment was marked as spam.

@ssakash
Copy link
Member Author

ssakash commented Aug 20, 2015

I'd need to hit the Tab often then :p , Fixed 👍

@turtleli
Copy link
Member

Ok. Will test soon.

Side note: You might want to delete some of your unused branches.

@turtleli
Copy link
Member

First commit: The longer messages are clipped even when resized larger. Both Windows and Linux.
Other two commits seem fine.
clippedmessage

@ssakash ssakash changed the title Resizable main window and little changes on GSdx plugin settings. little changes on AF value behavior. Aug 21, 2015
@ssakash
Copy link
Member Author

ssakash commented Aug 21, 2015

I'll remove the first commit for now, I'll handle it later. the Image does look a bit weird after all :p

Removes the checkbox of Anisotropic filtering from the GSDX plugin settings, the checkbox was usually used to enable & disable the AF which is not necessary since there is an option in the drop down list for disabling AF.
the internal function value of "AnisotropicFiltering" has been replaced with "MaxAnisotropy" for detection.
the detection uses the function getconfig("MaxAnisotropy", value)  where value 0 means disabled and value is the default value when no value is set in the INI file.
@ssakash
Copy link
Member Author

ssakash commented Aug 21, 2015

The PR is complete, changed the title relevant to the commits. if there any issues needed to be addressed, please mention. :)

@turtleli
Copy link
Member

Second commit message - change 'D3D11_FILTER_ANISOTROPIC' to 'anisotropic filtering'.

@ssakash
Copy link
Member Author

ssakash commented Aug 21, 2015

No, that is correct. Please refer GSDevice11.cpp. Nevermind, makes sense. The changes are not only for D3D11

@ssakash
Copy link
Member Author

ssakash commented Aug 21, 2015

Updated the commit message 👍

according to some of the internal functions in GSDevice files, Anisotropic Filtering is only done when paltex is disabled. do the same on the GUI for user awareness.
turtleli added a commit that referenced this pull request Aug 21, 2015
gsdx: little changes on AF value behavior.
@turtleli turtleli merged commit 6e826d5 into PCSX2:master Aug 21, 2015
@ssakash ssakash deleted the patch-45 branch August 21, 2015 11:05
@karasuhebi
Copy link
Contributor

Why was it changed from 1x to Off? People should know 1x means no Anisotropic Filtering. :-\

@ssakash
Copy link
Member Author

ssakash commented Sep 1, 2015

Off would make it much more clear for those who don't know 1X is off.

@karasuhebi
Copy link
Contributor

Fair enough. I still don't understand why the checkbox was removed though. Removing it didn't really improve the layout/spacing of the GSdx Plugin Settings window at all. What it did do was remove a convenience that certain users (such as myself) used. Is there anywhere I can go to lobby to get it put back? :D

@ssakash ssakash restored the patch-45 branch September 6, 2015 10:01
@ssakash ssakash deleted the patch-45 branch September 16, 2015 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants