Browse Source
Merge pull request #555 from Subv/gpu_sysregs
GPU: Convert the gl_InstanceId and gl_VertexID variables to floats when reading from them.
pull/15/merge
bunnei
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/video_core/renderer_opengl/gl_shader_decompiler.cpp
|
|
@ -538,7 +538,7 @@ private: |
|
|
// vertex shader, and what's the value of the fourth element when inside a Tess Eval
|
|
|
// vertex shader, and what's the value of the fourth element when inside a Tess Eval
|
|
|
// shader.
|
|
|
// shader.
|
|
|
ASSERT(stage == Maxwell3D::Regs::ShaderStage::Vertex); |
|
|
ASSERT(stage == Maxwell3D::Regs::ShaderStage::Vertex); |
|
|
return "vec4(0, 0, gl_InstanceID, gl_VertexID)"; |
|
|
|
|
|
|
|
|
return "vec4(0, 0, uintBitsToFloat(gl_InstanceID), uintBitsToFloat(gl_VertexID))"; |
|
|
default: |
|
|
default: |
|
|
const u32 index{static_cast<u32>(attribute) - |
|
|
const u32 index{static_cast<u32>(attribute) - |
|
|
static_cast<u32>(Attribute::Index::Attribute_0)}; |
|
|
static_cast<u32>(Attribute::Index::Attribute_0)}; |
|
|
|