Coder Social home page Coder Social logo

Comments (13)

MikhailAMD avatar MikhailAMD commented on June 12, 2024 3

OK, the driver crash (TDR) was reproduced and internal ticket logged.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024 2

Hi,
Win 7 has limited support for DX11. In particular, encoder works only using DX9. It is possible to use DX11 surfaces in converter but AMF needs to be programmed certain way:

  1.  InitDX9()
    
  2.  InitDX11()
    
  3.  InitOpenCL()
    
  4.  Force converter to work via OpenCL and return DX9 NV12 surface:
    
  •    AMF_VIDEO_CONVERTER_MEMORY_TYPE = DX9
    
  •    AMF_VIDEO_CONVERTER_COMPUTE_DEVICE = OPENCL
    

    So the logic would be:

  1.  Application submit DX11 texture (should be allocated by AMF or allocated by application with shared handle for performance reasons)
    
  2.  AMF interops input texture into OpenCL
    
  3.  AMF allocated DX9 output surface
    
  4.  AMF interops it into OpenCL
    
  5.  AMF runs converter GPU kernels using OpenCL
    
  6.   AMF un-interops output surface back to DX9 and returns it
    
  7.  Application submits DX9 NV12 surface to the encoder
    

    I will add more error checking for the next release.
    Thanks,
    Mikhail

from amf.

Xaymar avatar Xaymar commented on June 12, 2024 1

@dvv47 You do not have the same crash, your crash is related to using DirectX11 on Windows 7 which is not supported. See #25 for an answer.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

Can you produce and share dumps for crashes?
Crash In Terminate()

  1. Who is calling terminate?
  2. Did you implement Drain() of Flush()
  3. Is it easy to reproduce?

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

Yes, just dump for whole process.
Thanks,
Mikhail

From: Michael Fabian Dirks [mailto:[email protected]]
Sent: September 9, 2016 2:21 PM
To: GPUOpen-LibrariesAndSDKs/AMF [email protected]
Cc: Mironov, Mikhail [email protected]; Comment [email protected]
Subject: Re: [GPUOpen-LibrariesAndSDKs/AMF] Video Encode API: Driver Crash inside SubmitInput (#12)

Also I'm not sure how to create a dump for amfrt*.dll, do I just dump the full process in case it happens to me?


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-245996535, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWv4D4thyntuEih9RjxrVAz86ApoCTks5qoaOAgaJpZM4JuY6P.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

Hey,

Few small things from the latest code:

  1. There is no need to call surface->Acquire(); surface->Release(); You use smart pointers in the queue and they will do all work.
  2. if you got AMF_INPUT_FULL on SubmItInput() you probably should not exit loop because next attempt to submit will be only when the next frame will be put in the queue. something like res = AMF_OK; will do the job.

Thanks,

Mikhail


From: Michael Fabian Dirks [email protected]
Sent: Friday, September 9, 2016 2:20 PM
To: GPUOpen-LibrariesAndSDKs/AMF
Cc: Mironov, Mikhail; Comment
Subject: Re: [GPUOpen-LibrariesAndSDKs/AMF] Video Encode API: Driver Crash inside SubmitInput (#12)

Also I'm not sure how to create a dump for amfrt*.dll, do I just dump the full process in case it happens to me?

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-245996535, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWv4D4thyntuEih9RjxrVAz86ApoCTks5qoaOAgaJpZM4JuY6P.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

Did you try InitOpenCL()?
SubmitInput has no places to stuck except to wait for CSC and therefore for HW 3D queue.

Mikhail

From: Michael Fabian Dirks [mailto:[email protected]]
Sent: September 12, 2016 2:37 PM
To: GPUOpen-LibrariesAndSDKs/AMF [email protected]
Cc: Mironov, Mikhail [email protected]; Comment [email protected]
Subject: Re: [GPUOpen-LibrariesAndSDKs/AMF] Video Encode API: Driver Crash inside SubmitInput (#12)

  1. Alright. I'll change it back.
  2. The queue so far has always been up to speed with the code so far, nothing really increased past the limit except when encoding literally gets stuck as reported in #19#19. I changed it to try for 5 milliseconds, waiting a single msec between SubmitInput calls and if it still didn't work to just wait for the next signal. I had issues with it forever getting stuck in a AMF_INPUT_FULL loop before.


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-246447138, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWvwp36jdT1IZS1Qfy_pxAj3gVNDM9ks5qpZvdgaJpZM4JuY6P.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

OK, there are two issues:

  1.  OpenCL is slow to start up
    
  2.  Before calling SubmitINput() call surface->Convert(AMF_MEMORY_OPENCL);
    

Mikhail

From: Michael Fabian Dirks [mailto:[email protected]]
Sent: September 12, 2016 2:52 PM
To: GPUOpen-LibrariesAndSDKs/AMF [email protected]
Cc: Mironov, Mikhail [email protected]; Comment [email protected]
Subject: Re: [GPUOpen-LibrariesAndSDKs/AMF] Video Encode API: Driver Crash inside SubmitInput (#12)

Did you try InitOpenCL()?
SubmitInput has no places to stuck except to wait for CSC and therefore for HW 3D queue.

Mikhail

Testing with InitOpenCL resulted in the overloaded/stuck issue happening immediately and upon 2nd run it caused the following error:

20:51:36.034: [AMF Encoder] Plugin::AMD::VCEEncoder::SendInput Input Queue is full, dropping frame...

20:51:36.035: [AMFTrace::AMFEncoderVCE] Error: ..........\runtime\src\components\EncoderVCE\EncoderVCEImpl.cpp(1986):Assertion failed:SubmitInput() - Invalid param

20:51:36.035: [AMF Encoder] Plugin::AMD::VCEEncoder::InputThreadLogic SubmitInput failed with error A (code 4).


You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-246452018, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWv9irJLGfTB0ebKevRmKtrTS8lGY1ks5qpZ9hgaJpZM4JuY6P.

from amf.

Xaymar avatar Xaymar commented on June 12, 2024

Re-encountered just now, here is the dump file:

Additionally I have deleted any on my comments here so it's clean issue again.

from amf.

Xaymar avatar Xaymar commented on June 12, 2024

Seems to have been fixed by 16.10.1 by what I can tell. I have not managed to crash the driver with my usual test setup.

from amf.

MikhailAMD avatar MikhailAMD commented on June 12, 2024

I am not aware of this particular fix (the ticket was not closed) but late we couldn't repro it. There are many other changes that could be responsible. Let's wait for some stats.

Mikhail
On Wed, Oct 05, 2016 at 3:56pm, Michael Fabian Dirks <[email protected]mailto:[email protected]> wrote:

Seems to have been fixed by 16.10.1 by what I can tell. I have not managed to crash the driver with my usual test setup.

You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-251823300, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWv19F2zHJ4GcJIFvc6e6tyojSyMZkks5qxCsNgaJpZM4JuY6P.

from amf.

dvv47 avatar dvv47 commented on June 12, 2024

Hello, i am also got crash after SubmitInput on Windows 7 x64

I use DirectX11 surface B8G8R8A for input, submit it to converter for resize, and then push Data to encoder.
Driver 16.10.1
GPU r9 380
Preset ultra_low_latency

And this code works fine with windows 10 x64

With this crash stack trace
dxva2.dll!000007fef5014fda() Unknown
dxva2.dll!000007fef5014f84() Unknown
dxva2.dll!000007fef5014d26() Unknown
dxva2.dll!000007fef501694d() Unknown
dxva2.dll!000007fef50168a4() Unknown
dxva2.dll!000007fef5014d26() Unknown
amdave64.dll!0000000073f4538f() Unknown
amdave64.dll!0000000073f44f34() Unknown
amdave64.dll!0000000073f43f3c() Unknown
amdave64.dll!0000000073f4111f() Unknown
amfrt64.dll!000007fee44eb4a1() Unknown
amfrt64.dll!000007fee44eac27() Unknown
amfrt64.dll!000007fee44e9897() Unknown
amfrt64.dll!000007fee44f323b() Unknown
amfrt64.dll!000007fee44af730() Unknown

from amf.

Xaymar avatar Xaymar commented on June 12, 2024

OpenCL works like a charm now and I'm no longer able to reproduce this. So this was most likely fixed.

from amf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.