cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

marzRX
Adept I

SPIR-V shader on AMD GPU

I tried latest AMD gpu driver. But my SPIR-V program doesn't work.

fbo_ubo:
This program use uniform block object. SPIR-V route doesn't work correctly.
I think GPU can not receive the data of uniform block. It seems that the data in the uniform block is all zero.

fbo_ubo_result.png

ripple:
I added a dump module to find out what the active attributes and uniform variables are.

NVIDIA SPIR-V (Geforce 750ti)
[Attribute: 2]
Idx Type           Name
  0 vec3           'a_pos'
  1 vec3           'a_uv'
[Uniform: 3]
Idx Type           Name
  0 sampler2d      'image'
  1 vec2           'rippledata.center1'
  2 vec2           'rippledata.img_size'
[UniformBlock: 1]
Idx Name
  0 'rippledata'(block member count: 2)
  |_Idx Type       Offset Name
      0 vec2            8 'rippledata.center1'
      1 vec2            0 'rippledata.img_size'
----------------------------------------------------------------------
AMD SPIR-V (Radeon RX560)
[Attribute: 2]
Idx Type           Name
  0 vec4           ''
  0 vec4           ''
[Uniform: 1]
Idx Type           Name
  0 sampler2d      ''
[UniformBlock: 0]
----------------------------------------------------------------------
AMD GLSL (Radeon RX560)
[Attribute: 2]
Idx Type           Name
  0 vec3           'a_pos'
  1 vec3           'a_uv'
[Uniform: 3]
Idx Type           Name
  0 vec2           'rippledata.img_size'
  1 vec2           'rippledata.center1'
  2 sampler2d      'image'
[UniformBlock: 1]
Idx Name
  0 'rippledata'(block member count: 2)
  |_Idx Type       Offset Name
      0 vec2            0 'rippledata.img_size'
      1 vec2            8 'rippledata.center1'
----------------------------------------------------------------------

ripple_result.png

This program uses uniform block with named-block.  I also tested name-less uniform block and default uniform block(= uniform), but none of them worked.

Am I making something wrong? 🙂

These programs work fine following GPU/GPU driver.
* NVIDIA Geforce GTX 750 Ti, Windows7
* AMD Ryzen3 2200G with Radeon Vega Graphcis x 4, Linux Mint 19.3 Mesa 20.0.0-devel

Thank you.

3 Replies
tim-rex
Adept I

Re: SPIR-V shader on AMD GPU

I don't suppose you managed to get anywhere with this?

I've posted separately about similar problems, but not sure I'm going to get much further..   https://community.amd.com/message/2989582#comments 

0 Likes
Reply
marzRX
Adept I

Re: SPIR-V shader on AMD GPU

I guess it is an AMD driver issue. I'm just waiting for AMD's driver to be fixed.

Today, I tried the 20.8.1 driver. There were no fixes for SPIR-V.

dorisyan
Staff
Staff

Re: SPIR-V shader on AMD GPU

Thanks for your report, marzRX, OK, I see, I will take a look into it soon

0 Likes
Reply