Intel® ARC™ Graphics
Get answers to your questions or issues when gaming on the world’s best discrete video cards with the latest news surrounding Intel® ARC™ Graphics
3300 Discussions

Vulkan Multi viewports overlapped

gearslogy
Novice
932 Views

gearslogy_0-1748443934968.png

src code: LLVK_Beginning/renderer/multi_viewports/MultiViewPorts.cpp at main · gearslogy/LLVK_Beginning

 

Multiple windows overlapped

 

 

geom shader:

#version 460 core
#extension GL_ARB_viewport_array : enable

layout(constant_id = 0 ) const int VIEWPORTS_NUM = 2;
layout (triangles, invocations = 2) in;
layout (triangle_strip, max_vertices = 3) out;

layout (set=0, binding=0) uniform UBO{
    mat4 proj[2];
    mat4 modelView[2];
    vec4 lightPos;
}ubo;

// 输入
layout(location=0) in INPUT{
    vec3 N;
    vec3 T;
    vec2 uv0;
}gs_in[];

// 输出
layout(location=0) out OUTPUT{
    vec3 out_N;
    vec3 out_T;
    vec2 out_uv0;
};

void main(){
    for(int i=0; i <gl_in.length(); i++){
        out_N = mat3(ubo.modelView[gl_InvocationID]) * gs_in[i].N;
        out_T = mat3(ubo.modelView[gl_InvocationID]) * gs_in[i].T;
        out_uv0 = gs_in[i].uv0;

        // 变换position -> P * V * M * p
        vec4 pos = gl_in[i].gl_Position;
        vec4 worldPos = ubo.modelView[gl_InvocationID] * pos;
        gl_Position = ubo.proj[gl_InvocationID] * worldPos;

        // important! viewport
        gl_ViewportIndex = gl_InvocationID;

        gl_PrimitiveID = gl_PrimitiveIDIn;
        EmitVertex();
    }
    EndPrimitive();
}

 

C++

 // set viewports  0 = right(TOP), 1 = left(perspective)
    VkViewport viewports[2]{};
    VkRect2D   scissors[2]{};

    viewports[0] = FnCommand::viewport(width/2, height, width/2, 0); // right TOP view
    viewports[1] = FnCommand::viewport(width/2, height, 0, 0);       // left perspective view

    scissors[0] = FnCommand::scissor(width/2, height, width/2, 0); // right TOP view
    scissors[1] = FnCommand::scissor(width/2, height, 0, 0);       // left perspective view

 

Labels (1)
0 Kudos
7 Replies
VonM_Intel
Moderator
859 Views

Hi, gearslogy.

Thank you for posting in our Community. From analysis of the GLSL geometry shader and Vulkan setup in the provided source, I'm not sure if it is clear that the implementation leverages multi-viewport rendering via geometry shader invocations using GL_ARB_viewport_array. The C++ logic splits the screen horizontally into two distinct halves, assigning: 

Viewport 0 (right side of screen): x = width / 2

Viewport 1 (left side of screen): x = 0


For greater clarity, I’d appreciate your input on a few key points:

  • What specifically do you mean by “overlapped”? Are you referring to actual pixel overdraw, blending artifacts, or unintended culling behavior?
  • What is the exact Intel GPU model and driver version being used?
  • Is this behavior observed in the rendered output (visually), or inferred from debugger/profiler output?
  • Beyond this, have you observed any other issues specific to Intel hardware?


Have a nice day!


Best regards,

Von M.

Intel Customer Support Technician


0 Kudos
gearslogy
Novice
844 Views

gearslogy_0-1748582527606.png

 

above is right result(test at RTX5070TI, same code)

0 Kudos
VonM_Intel
Moderator
825 Views

Hello, gearslogy.

Thanks for confirming that you ran the test on an RTX 5070 Ti. Just to check, are you also using any Intel® Arc™ graphics card in your system, either as your main GPU or alongside the RTX? I ask because the RTX isn't one of our products, and I’d like to make sure we’re looking at the right setup on your end. Additionally, I’d like to better understand your use case. Are you a developer, specifically involved in game or graphics development? This context will help tailor my recommendations more effectively, particularly around driver compatibility and API-level behaviors across different GPU architectures.


Best regards,


Von M.

Intel Customer Support Technician


0 Kudos
gearslogy
Novice
803 Views

I'm a game developer. I tested the B580 graphics card, using the latest driver, and the result came out wrong. The platform used is AMD9950X B580

I use another computer, 7950X 5070TI is no problem, and I run this program on other Nvidia displays

 

I need you to see if there is a problem with the vulkan driver, and there is no problem with the NVIDIA graphics card . Thanks

0 Kudos
VonM_Intel
Moderator
708 Views

Hello, gearslogy.

Since the issue appears to be isolated to the B580 integrated graphics with the latest driver, and does not occur on your 7950X system with the 5070 Ti or other NVIDIA GPUs, this may indicate a potential compatibility or performance concern specific to the Vulkan driver stack on the B580 platform.

 

To investigate this thoroughly and efficiently, I’d like to request a few additional details. Specifically, I’m looking to confirm the exact graphics configuration, driver versions, and any related system behavior or errors. To facilitate this, I kindly ask you to run the Intel® System Support Utility (SSU) tool. This will allow me to gather a comprehensive overview of your system, which is critical to identifying the root cause. For your convenience and data privacy, I’ve already sent you a separate email with instructions on submitting the SSU report. Once I receive it, I’ll be in a better position to further investigate the issue and provide more targeted assistance.

 

Best regards,
Von M.
Intel Customer Support Technician

0 Kudos
VonM_Intel
Moderator
651 Views

Hello, gearslogy.

Have you had a chance to review my previous response? Please let us know if you require any further assistance. I'm here to help.


Best regards,

Von M.

Intel Customer Support Technician


0 Kudos
VonM_Intel
Moderator
601 Views

Hello, gearslogy.

I have not heard back from you, so I will close this inquiry now. If you need further assistance, please submit a new question as this thread will no longer be monitored.


Best regards,

Von M.

Intel Customer Support Technician


0 Kudos
Reply