BBC BASIC for Windows
« GPU Mandelbrot Viewer »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:10pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: GPU Mandelbrot Viewer  (Read 1642 times)
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: GPU Mandelbrot Viewer
« Reply #5 on: Nov 17th, 2010, 08:10am »

on Nov 17th, 2010, 06:03am, Michael Hutton wrote:
I haven't come accross this before

I reported the identical error message, which you acknowledged on the group yesterday.

Quote:
I am not quite sure what is going on as it seems that the effect is being properly compiled but then not able to 'FindFirstValidTechnique'

How do you know that the machine has a suitable D3DX9_xx.DLL? For example the highest version on my PC is D3DX9_32.DLL but I've seen several references to D3DX9_42.DLL being required by some programs.

Perhaps it would be helpful if your program reported which DLL it was using, then maybe you could correlate that with success/failure.

Richard.
« Last Edit: Nov 17th, 2010, 09:27am by admin » User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: GPU Mandelbrot Viewer
« Reply #6 on: Nov 17th, 2010, 10:25am »

on Nov 17th, 2010, 08:10am, Richard Russell wrote:
I reported the identical error message, which you acknowledged on the group yesterday.

Yes, I know. I should have said 'come accross it before this end....' <sigh>


on Nov 17th, 2010, 08:10am, Richard Russell wrote:
How do you know that the machine has a suitable D3DX9_xx.DLL? For example the highest version on my PC is D3DX9_32.DLL but I've seen several references to D3DX9_42.DLL being required by some programs.


What is failing is: the ID3DXEffect::FindNextValidTechnique. With a quick search I can't find anything related to different dll versions, but maybe something will get dug up (No doubt by you in a few minutes...).

Code:
      REM ****************************************************************
      REM
      REM Load and compile the Effect file
      REM
      REM ****************************************************************
      IF V% THEN PRINT"Compiling Effect File."
      SYS D3DXCreateEffectFromFile%, pDevice%, ShaderVersion$, 0, 0, 0, 0, ^Effect%, ^Errorlog%
      IF Effect% = 0 THEN
        SYS !(!Errorlog% + 12), Errorlog% TO B%
        ERROR 100, "Failed to Compile Effect. Sorry, you do not appear to be able to compile this shader with your graphics card.."+CHR$13+CHR$13+$$B%
      ENDIF
            
      REM ****************************************************************
      REM
      REM Find the first Valid technique in the Effect file
      REM This is the Mandel effect
      REM
      REM ****************************************************************
      IF V% THEN PRINT"Getting Effect Mandel."
      REM ID3DXEffect::FindNextValidTechnique
      SYS !(!Effect% + 240), Effect%, 0, ^Technique1% TO R%
      IF R% THEN ERROR 100, "Could not find the effect : Mandelbrot"
 


I have recompiled a version to use the _32.dll. If this works for you then that could explain the problem, but it 'works here fine'.

http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/MDCH/MandelGPU/MandelBrotGPU%20v1.00a%20limited%20to%20D3DX9_32.exe

Btw I am uploading as exes at the moment to keep all the code in one place.. I will publish it all but it needs to be tidied. A lot of device querying could be done.


Oh.... and in fact I think I don't even have to use that function at all.

http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/MDCH/MandelGPU/MandelBrotGPU%20v1.00a%20limited%20to%20D3DX9_32%20without%20%27that%27%20fn.exe
Michael
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: GPU Mandelbrot Viewer
« Reply #7 on: Nov 17th, 2010, 1:23pm »

on Nov 17th, 2010, 10:25am, Michael Hutton wrote:
Oh.... and in fact I think I don't even have to use that function at all.

OK, that version produces no error messages, and reports a frame rate of 85 fps (my native hardware refresh rate) but displays only a black window! Absolutely no graphics displayed at all. sad

Richard.
User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: GPU Mandelbrot Viewer
« Reply #8 on: Nov 17th, 2010, 6:25pm »

I'm using XP with DirectX9 on my netbook. No idea about anything else you might need to know. Not sure where to find out about the graphics 'card'.

Matt
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: GPU Mandelbrot Viewer
« Reply #9 on: Nov 18th, 2010, 12:34am »

on Nov 17th, 2010, 1:23pm, Richard Russell wrote:
OK, that version produces no error messages, and reports a frame rate of 85 fps (my native hardware refresh rate) but displays only a black window! Absolutely no graphics displayed at all. :-(


I am on familiar territory here (blank screens) it happened to me a lot during development and may be related to the shader input

Code:
float4 Mandelbrot_PixelShader(float2 texCoord : SV_Position) : COLOR
 


The shader attempts to take the screen co-ordinates and then iterates them in the complex plane. Now this works 'this end'.

but originally the shader tried to take the texture co-ordinates

Code:
float4 MandelShader(float2 texCoord : TEXCOORD0) : COLOR0
 


which didn't work for me.

Changing that (and the offset to -0.5 rather than the screen dimensions) might work.. :P Also changing the shader versions might help... but it may not compile.

The files are at:
http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/MDCH/MandelGPU/MandelBrotGPU%20v1.00a%20limited%20to%20D3DX9_32%20without%20%27that%27%20fn.bbc

and

http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/MDCH/MandelGPU/MandelPixelShader%20v1.00a.fx" target="_blank">
http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/MDCH/MandelGPU/MandelPixelShader%20v1.00a.fx

I have 'tidied' up the code and included all the libraries in the program.

Michael
« Last Edit: Nov 18th, 2010, 12:37am by Michael Hutton » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls