i965: get outputs read from nir info
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 5 Oct 2016 04:56:21 +0000 (15:56 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 6 Oct 2016 05:03:57 +0000 (16:03 +1100)
This is a step towards dropping the GLSL IR version of
do_set_program_inouts() in i965 and moving towards native nir support.

This is important because we want to eventually convert to nir and
use its optimisations passes before we can call this GLSL IR pass.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c

index 7a39fe275eff3df64b18aae81c9164773eda58d4..d6204fd3e40ac657a2fdae98d6012c5e62858caf 100644 (file)
@@ -31,6 +31,7 @@
   */
 
 
+#include "compiler/nir/nir.h"
 #include "main/api_exec.h"
 #include "main/context.h"
 #include "main/fbobject.h"
@@ -304,7 +305,7 @@ intel_update_state(struct gl_context * ctx, GLuint new_state)
    /* Resolve color buffers for non-coherent framebuffer fetch. */
    if (!ctx->Extensions.MESA_shader_framebuffer_fetch &&
        ctx->FragmentProgram._Current &&
-       ctx->FragmentProgram._Current->Base.OutputsRead) {
+       ctx->FragmentProgram._Current->Base.nir->info.outputs_read) {
       const struct gl_framebuffer *fb = ctx->DrawBuffer;
 
       for (unsigned i = 0; i < fb->_NumColorDrawBuffers; i++) {
index 6ea3b04e140402f82734a33a8d81a0008f44fc69..c84fd5324df94fe990bacd760bbd5f83d74cdbfd 100644 (file)
@@ -1145,7 +1145,7 @@ update_renderbuffer_read_surfaces(struct brw_context *brw)
    /* BRW_NEW_FRAGMENT_PROGRAM */
    if (!ctx->Extensions.MESA_shader_framebuffer_fetch &&
        brw->fragment_program &&
-       brw->fragment_program->Base.OutputsRead) {
+       brw->fragment_program->Base.nir->info.outputs_read) {
       /* _NEW_BUFFERS */
       const struct gl_framebuffer *fb = ctx->DrawBuffer;