Commit graph

78 commits

Author SHA1 Message Date
kd-11 6a707f515e vk/gl: Factorize shared GLSL code
- prep vulkan for shared glsl backend
2017-08-16 23:58:30 +03:00
kd-11 df8fa74e2a vulkan hotfix (#3046)
* Rework vertex attribute binding for vulkan. Allows always providing a buffer view to the pipeline even if the game has the attribute disabled as long as it is consumed by the vertex shader.
2017-07-22 01:54:28 +03:00
kd-11 05ffb50037 vk/rsx: Bug fixes and improvements
- Improvements to framebuffer usage; Avoid creating new resources every frame
- Handle null fragment program properly
- Collect vertex upload statistics

- vk: Pre-initialize 'unused' varying registers in the vertex shader in case it gets matched with a fs that consumes it
 -- Fixes a crash about fog_c not being declared

gl/dx12/vk: Handle null fragment program

- cleanup - use yield semantic instead of sleep(0) as yield is more cross-platform
 -- sleep(0) is a windows specific scheduler hint
2017-07-19 23:28:33 +03:00
kd-11 a69f19a9ab rsx/decompilers: Avoid std::endl like the plague. It adds extra processing overhead 2017-06-29 13:13:19 +03:00
kd-11 6e578c4fde rsx: Initialize declared but unset varying variables to all ones 2017-06-29 13:13:19 +03:00
kd-11 b2e906f4cc rsx: Code cleanup. Fixes several dozen warnings
- Wrap unused parameters as comments to prevent C1400
- Fix sized variable conversions with explicit casts
2017-06-22 23:36:15 +03:00
kd-11 c5975d5f66 rsx: Vertex program output fixes 2017-05-12 20:10:03 +03:00
Jake ac58953276 Fix typo/spacing from userclip 2017-04-29 01:26:03 +03:00
Jake 60ce85f840 [Render] Userclip for d12/vk/ogl (#2719) 2017-04-25 18:32:39 +08:00
kd-11 9263999ad1 [rsx/vp] Improve BRB opcode implementation
fix merge issues
2017-02-26 10:17:34 +03:00
kd-11 d6159a35aa gl/vk/dx12: Fix texture scaling on unnormalized rtt access 2017-02-11 15:45:59 +03:00
kd-11 7884356e90 gl/vk: Bug fixes and improvements (#2155)
* gl: Fix broken buffer reserve computation

* gl: Texture format fixes

* gl: Two sided lighting

* gl: Always update glsl output registers

* gl: Simplify vertex input declaration

* vk: Always write output registers

* vk/gl: swizzle component read on depth textures

* gl/vk: Use proper MVP matrix

gl: fix broken mvp when window_origin=top

* vk/gl: Move fragment operations block into the proxy function
2016-09-26 20:21:17 +08:00
kd-11 867e9210d7 gl/vk: Enable vertex texture fetch (#2127)
* gl: Enable vertex textures

* rsx: use textureLod instead of generic texture sample

* rsx: handle uploading of W32_X32_Y32_Z32

* gl: Re-enable proper shader logging

remove old logging method that overwrites single file

* gl: Declare texture_coord_scale for vertex samplers

* gl: texture remap fixes; enable remap for vertex textures

* gl: offset texture indices to base layer 16

* rsx: Fix W32_Z32_Y32_X32_FLOAT subresource layout

* vk: Enable vertex textures

* rsx: define special calls for vertex texture fetch

* gl: improved vertex texture fetch setup

* vk: Fix texture formats and component mapping

* vk: Implement vertex texture fetch functions properly

* vk/gl: proper fix for primitive restart index

revert inadvertent decompiler update

* gl: Disable filtering for vertex textures
2016-09-20 22:23:56 +08:00
kd-11 9beb2d8ae0 vk/rsx: Bug fixes (#2092)
* vk: fix separate front and back lighting

* vk: Inlined arrays can have emulated primitives too!

* vk: Use float input attribs for better compatibility

* vk: Free resources during shutdown
2016-08-24 08:50:07 +08:00
Nekotekina a7e808b35b EXCEPTION macro removed
fmt::throw_exception<> implemented
::narrow improved
Minor fixes
2016-08-08 19:19:32 +03:00
raven02 208f4c3e27 vk: front_diff_color typo fix (#2016)
* vk: typo fix

* continue in for loop
2016-08-02 23:54:49 +08:00
Lena e377199e41 Ensure the 'shaderlog' directory exists (#1986)
Should fix #1984
2016-07-26 00:15:14 +03:00
kd-11 2337bf204c vk/dx12: Enable/fix separate back and front lighting (#1927)
* vk: separate specular color

rsx: separate front color output from back color output

re-enable front-back diffuse lighting

vk: fix front face selection and actually enable face culling

* dx12: Hide constant-key blended visuals (by common use of factor, 1-factor)

* dx12: Fix 2 sided lighting when the shader does not compute both outputs

* vk/dx12: confirm that src register exists before copying for 2-sided lighting
2016-07-18 00:57:50 +08:00
raven02 ea528a1ced Write shader log in seperate directory (#1755)
Write shader log in separate directory
2016-06-13 19:53:50 +03:00
kd-11 3956b21cb7 vk/gl/dx12: Dynamic cb flush for vulkan; fix glsl/hlsl vertex shader generation for some games; dx12: ignore fbo textures during flip if no surface target is set (#1766)
* gl/vk/dx12: Fix vertex shader code generation for buggy games

dx12: revert vsh attribute changes

* vk: dynamically flush command buffers if we exceed available resources

* dx12: do not prepare flip texture if it has not been initialized
2016-06-11 16:24:27 +03:00
kd-11 4260f68f85 gl/vk: Fix ub256 and s32k vertex attributes; silence some unnecessary debug errors (#1757)
* gl/vk: Sample integer attribs with integer samplers

* gl: silence useless DPRINTs where behaviour has already proven correct
2016-06-08 12:39:08 +03:00
kd-11 c4102f3b18 vk/gl: Enable alpha test in shaders (#1743) 2016-06-05 20:31:23 +03:00
kd-11 d22672b156 vk: Disable user clip planes
Use // for comments as requested
2016-06-03 17:07:48 +03:00
raven02 214d3d0f1a GL/Vulkan: write shader program log as .glsl and .spirv (#1720)
* GL: write shader program log as .glsl

* VK: write shader program log as .spirv
2016-05-26 21:47:37 +03:00
Nekotekina b85a68e8a1 Partial commit: RSX 2016-04-15 19:22:36 +03:00
Vincent Lejeune 6229733fbb vulkan: Use a shared pipeline layout 2016-03-17 20:03:09 +01:00
kd-11 bd52bcf8d4 Fix nvidia crash (API version). Fix linux builds
Properly set up vulkan API version when creating instance

Fix gcc error about passing function result by reference

Fix alot of warnings in VKGSRender project

More fixes for gcc

Fix texture create function
2016-03-10 23:55:25 +03:00
kd-11 3b6e3fb3b4 Rework vertex upload code and fix indexed renders
Rebase on current master; Refactor vertex upload code

Fix build; Minor fixes

Start preparations for merge

Fix generic indexed drawing bugs

Define WIN32_KHR only for windows

Remove linking against vulkan-1.lib
2016-03-10 23:55:25 +03:00