nv50: mark contexts shareable, compile at creation time
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 30 Oct 2015 03:25:08 +0000 (23:25 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 30 Oct 2015 03:25:08 +0000 (23:25 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nv50/nv50_state.c

index 398abfb97ba752ccb8af666ccceae4ee5bf0aa32..a9e0c478322b6d73bfc32be0f8d6b95974a1269d 100644 (file)
@@ -181,6 +181,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_DEPTH_BOUNDS_TEST:
    case PIPE_CAP_TGSI_TXQS:
    case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
+   case PIPE_CAP_SHAREABLE_SHADERS:
       return 1;
    case PIPE_CAP_SEAMLESS_CUBE_MAP:
       return 1; /* class_3d >= NVA0_3D_CLASS; */
@@ -217,7 +218,6 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
    case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
    case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
-   case PIPE_CAP_SHAREABLE_SHADERS:
       return 0;
 
    case PIPE_CAP_VENDOR_ID:
index 410e6311e604861e26482fe4e28dfb331d5cc466..671c8ab629c98ae01e7030f9ef8bf65bb8d4b5c5 100644 (file)
@@ -725,6 +725,9 @@ nv50_sp_state_create(struct pipe_context *pipe,
    if (cso->stream_output.num_outputs)
       prog->pipe.stream_output = cso->stream_output;
 
+   prog->translated = nv50_program_translate(
+         prog, nv50_context(pipe)->screen->base.device->chipset);
+
    return (void *)prog;
 }